{"id":794,"date":"2018-08-04T16:07:04","date_gmt":"2018-08-04T08:07:04","guid":{"rendered":"https:\/\/www.techcoil.com\/blog\/?p=794"},"modified":"2018-08-04T16:07:34","modified_gmt":"2018-08-04T08:07:34","slug":"how-to-configure-motioneye-to-only-capture-video-if-there-are-movements-in-particular-sections-of-the-surveillance-area","status":"publish","type":"post","link":"https:\/\/www.techcoil.com\/blog\/how-to-configure-motioneye-to-only-capture-video-if-there-are-movements-in-particular-sections-of-the-surveillance-area\/","title":{"rendered":"How to configure motionEye to only capture video if there are movements in particular sections of the surveillance area"},"content":{"rendered":"<p>Undeniably, <a href=\"https:\/\/github.com\/ccrisan\" rel=\"noopener\" target=\"_blank\">Calin Crisan<\/a> had created one of the best way for us to build a <a href=\"https:\/\/www.techcoil.com\/blog\/tag\/raspberry-pi\" rel=\"noopener\" target=\"_blank\">Raspberry Pi<\/a> security camera. In addition to the ease of setup via <a href=\"https:\/\/github.com\/ccrisan\/motioneyeos\/wiki\" rel=\"noopener\" target=\"_blank\">motionEyeOS<\/a>, the <a href=\"https:\/\/github.com\/ccrisan\/motioneye\" rel=\"noopener\" target=\"_blank\">motionEye<\/a> web-based frontend is also easy to use.<\/p>\n<p>Since a Raspberry Pi security camera is used for surveillance, we will want it to record videos of things that happened when we were not looking. <\/p>\n<p>However, recording footages of the surveillance area when there were no motion being detected is wasteful. Moreover, it is hard to get to the video recording of a stranger moving your flower pot when there are too many redundant video clips in your Raspberry Pi security camera.<\/p>\n<p>Even if we switched on motion detection for the entire video frame, there could be motion detected outside of the area of interest. For example, we may be interested in birds resting on our plant rather than birds flying in the sky. <\/p>\n<p>So how do we configure motionEye to only capture video if there are movements in a particular section of the surveillance area? <\/p>\n<p>This post will show you how to do so.<\/p>\n<h2>Setting up a Raspberry Pi security camera<\/h2>\n<p>In case you are looking for some references on setting up a Raspberry Pi security camera, you can refer to one of the following guides:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.techcoil.com\/blog\/how-i-setup-a-cctv-camera-with-raspberry-pi-zero-w-and-motioneyeos-image-for-home-surveillance\/\" rel=\"noopener\" target=\"_blank\">Setup a CCTV camera with Raspberry Pi Zero W and motionEyeOS image for home surveillance<\/a><\/li>\n<li><a href=\"https:\/\/www.techcoil.com\/blog\/how-i-setup-a-raspberry-pi-zero-w-cctv-camera-with-motioneye-and-raspbian-stretch-lite\/\" rel=\"noopener\" target=\"_blank\">Setup a Raspberry Pi Zero W CCTV camera with motionEye and Raspbian Stretch Lite<\/a><\/li>\n<li><a href=\"https:\/\/www.techcoil.com\/blog\/how-i-built-my-home-raspberry-pi-3-cctv-using-a-motion-eye-os-image-from-home-surveillance\/\" rel=\"noopener\" target=\"_blank\">Setup a Raspberry Pi 3 CCTV camera with motionEyeOS<\/a><\/li>\n<\/ul>\n<p>Unless you want to run some other applications on your Raspberry Pi, it is recommended to setup your security camera with <a href=\"https:\/\/github.com\/ccrisan\/motioneyeos\/wiki\" rel=\"noopener\" target=\"_blank\">motionEyeOS<\/a>.<\/p>\n<h2>Steps to create mask on motionEye to ignore motion detection on certain parts of the camera view<\/h2>\n<p>The following is a view from my <a href=\"https:\/\/www.techcoil.com\/blog\/how-to-make-your-raspberry-pi-zero-w-camera-see-an-ultra-wide-view\/\" rel=\"noopener\" target=\"_blank\">Raspberry Pi Zero W security camera equipped with a Fisheye lens<\/a>:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/motionEye-0.39.2-sample-camera-footage.jpg\" alt=\"motionEye 0.39.2 sample camera footage\"\/><\/p>\n<p>This view was shown after I had logged in as the <strong>admin<\/strong> user.<\/p>\n<p>In the top area of the footage, there is a road that is relatively busy. In this situation, I would not want my Raspberry Pi Zero W security camera to record a video every time a vehicle passes my building. In addition, I do not want video footages of my window grill shaking while I am cleaning it.<\/p>\n<p>Therefore, I applied a <strong>mask<\/strong> over the top and bottom areas of the camera view.<\/p>\n<p>Firstly, I clicked on the icon at the top left corner. <\/p>\n<p>After the settings panel appears, I scrolled to the <strong>Motion Detection<\/strong> section, clicked on the arrow to show the Motion Detection settings.<\/p>\n<p>Next, I turned on <strong>Mask<\/strong> and choose <strong>Editable<\/strong> as the <strong>Masking Type<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/motionEye-0.39.2-with-motion-detection-settings-collapsed.jpg\" alt=\"motionEye 0.39.2 with Motion Detection settings collapsed\" \/><\/p>\n<p>After that, I clicked on <strong>Edit Mask<\/strong> and grids appeared on the camera view.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/motionEye-0.39.2-view-after-clicking-the-edit-mask-button.jpg\" alt=\"motionEye 0.39.2 view after clicking the Edit Mask button\"><\/p>\n<p>I then hid the settings panel by clicking on the top left icon again so that I could display the camera view in its entirety.<\/p>\n<p><strong>I then clicked on all the grids that I wanted to have motion detection disabled<\/strong>. Alternatively, I can also hold the left-click button of my mouse while dragging the pointer over the areas that I want to mask.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/motionEye-0.39.2-view-after-selecting-the-areas-to-mask.jpg\" alt=\"motionEye 0.39.2 view after selecting the areas to mask\" \/><\/p>\n<p>After I was satisfied with the mask that I had selected, I clicked on the icon on the top left corner. Once the settings panel appeared, I scrolled back to the <strong>Motion Detection<\/strong> section and clicked <strong>Save Mask<\/strong> and then <strong>Apply<\/strong>. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/motionEye-0.39.2-view-after-saving-mask-and-apply-changes.jpg\" alt=\"motionEye 0.39.2 view after saving mask and applying changes\" \/><\/p>\n<p>With the mask, my Raspberry Pi Zero W security camera only record videos of people walking past my unit.<\/p>\n\n      <ul id=\"social-sharing-buttons-list\">\n        <li class=\"facebook\">\n          <a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwp.me%2Fp245TQ-cO\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n            <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Facebook.png\" alt=\"Facebook icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"twitter\">\n          <a href=\"https:\/\/twitter.com\/intent\/tweet?text=&url=https%3A%2F%2Fwp.me%2Fp245TQ-cO&via=Techcoil_com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Twitter.png\" alt=\"Twitter icon\"> Tweet\n          <\/a>\n        <\/li>\n        <li class=\"linkedin\">\n          <a href=\"https:\/\/www.linkedin.com\/shareArticle?mini=1&title=&url=https%3A%2F%2Fwp.me%2Fp245TQ-cO&source=https:\/\/www.techcoil.com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/linkedin.png\" alt=\"Linkedin icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"pinterest\">\n          <a href=\"https:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fwww.techcoil.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F794&description=\" class=\"pin-it-button\" target=\"_blank\" role=\"button\" rel=\"nofollow\" count-layout=\"horizontal\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Pinterest.png\" alt=\"Pinterest icon\"> Save\n          <\/a>\n        <\/li>\n      <\/ul>\n    ","protected":false},"excerpt":{"rendered":"<p>Undeniably, <a href=\"https:\/\/github.com\/ccrisan\" rel=\"noopener\" target=\"_blank\">Calin Crisan<\/a> had created one of the best way for us to build a <a href=\"https:\/\/www.techcoil.com\/blog\/tag\/raspberry-pi\" rel=\"noopener\" target=\"_blank\">Raspberry Pi<\/a> security camera. In addition to the ease of setup via <a href=\"https:\/\/github.com\/ccrisan\/motioneyeos\/wiki\" rel=\"noopener\" target=\"_blank\">motionEyeOS<\/a>, the <a href=\"https:\/\/github.com\/ccrisan\/motioneye\" rel=\"noopener\" target=\"_blank\">motionEye<\/a> web-based frontend is also easy to use.<\/p>\n<p>Since a Raspberry Pi security camera is used for surveillance, we will want it to record videos of things that happened when we were not looking. <\/p>\n<p>However, recording footages of the surveillance area when there were no motion being detected is wasteful. Moreover, it is hard to get to the video recording of a stranger moving your flower pot when there are too many redundant video clips in your Raspberry Pi security camera.<\/p>\n<p>Even if we switched on motion detection for the entire video frame, there could be motion detected outside of the area of interest. For example, we may be interested in birds resting on our plant rather than birds flying in the sky. <\/p>\n<p>So how do we configure motionEye to only capture video if there are movements in a particular section of the surveillance area? <\/p>\n<p>This post will show you how to do so.<\/p>\n","protected":false},"author":1,"featured_media":1095,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":""},"categories":[4],"tags":[275,474,411,240,410,409],"jetpack_featured_media_url":"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/motionEye-0.39.2-view-after-selecting-the-areas-to-mask.jpg","jetpack_shortlink":"https:\/\/wp.me\/p245TQ-cO","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/794"}],"collection":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/comments?post=794"}],"version-history":[{"count":0,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/794\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media\/1095"}],"wp:attachment":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media?parent=794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/categories?post=794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/tags?post=794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}