Masking for motion detection

1,239 views
Skip to first unread message

Brett K

unread,
Jun 18, 2022, 2:02:16 PM6/18/22
to motioneye
I cannot seem to figure out motion detection masking. It is windy today and the trees in the shot are moving a lot. I have tried turning the squares red for the area of exclusion or inclusion, and ME basically detects motion constantly. I made sure to save the mask and apply each time. What basic concept have I missed here?
Thanks!

Dewey

unread,
Jun 18, 2022, 2:11:32 PM6/18/22
to motioneye
While you didn't go into thorough details on what you've done, it sounds like you have done what is necessary.  My suggestion would be to turn on "Show Frame Changes" under motion detection.  That will cause a red box to display around any detected motion, which will enable you to see exactly what is triggering the camera.

Dewey

StarbaseSSD

unread,
Jun 18, 2022, 2:14:44 PM6/18/22
to motioneye
Turn on Show Frame Changes to see where it is seeing motion.

StarbaseSSD

unread,
Jun 18, 2022, 2:15:46 PM6/18/22
to motioneye
Just a touch faster than me, Dewey!

Brett K

unread,
Jun 18, 2022, 2:22:17 PM6/18/22
to motioneye
great advice. I am still getting motion calls from I don't know what. As you know, thin red line defines area of motion.
lower mask.png
upper mask.png

Dewey

unread,
Jun 18, 2022, 2:30:21 PM6/18/22
to motioneye
You've covered the tree and the two planters pretty well, so my bet would be the shadows for those two planters.

Dewey

Brett K

unread,
Jun 18, 2022, 2:33:41 PM6/18/22
to motioneye
Thanks. Why would that trigger full-frame motion?

Brett K

unread,
Jun 18, 2022, 2:37:11 PM6/18/22
to motioneye
here is the adjusted mask. No change. 
more bushes.png
not in mask editing mode.png

StarbaseSSD

unread,
Jun 18, 2022, 2:38:15 PM6/18/22
to motioneye
The percentage in Frame Change Threshold controls the amount that can trigger the event. Most of my cameras are set to 0.1%, you may want to increase yours from whatever you have it set to.

Brett K

unread,
Jun 18, 2022, 2:38:26 PM6/18/22
to motioneye
here are the motion detection settings
motion detection settings.png

StarbaseSSD

unread,
Jun 18, 2022, 2:39:38 PM6/18/22
to motioneye
Did you turn on Show Frame Changes?

Brett K

unread,
Jun 18, 2022, 2:41:58 PM6/18/22
to motioneye
I had set auto threshold tuning. That clearly isn't kicking in. give it more time or go to manual?
On Saturday, June 18, 2022 at 2:38:15 PM UTC-4 StarbaseSSD wrote:

Brett K

unread,
Jun 18, 2022, 2:42:45 PM6/18/22
to motioneye
Yes. it created the thin red line in the images that I posted. 

StarbaseSSD

unread,
Jun 18, 2022, 2:43:48 PM6/18/22
to motioneye
Aha! Turn off Auto Threshold Tuning
Turn On Despeckle Filter.
Then adjust Frame Threshold (Start at 0.1% and move up until you get the triggering you want.


On Saturday, June 18, 2022 at 2:39:38 PM UTC-4 StarbaseSSD wrote:

Brett K

unread,
Jun 18, 2022, 2:54:22 PM6/18/22
to motioneye
I am concerned that masking is not working. I get indications of large areas being triggered at 7.5% threshold. I also see motion in the street when I kid crosses the street, which is in the excluded area. This is on an Amcrest camera, for which I have the app that sends me notifications of movement, and it isn't picking up any on the low sensitivity setting. Any idea what threshold that would be equal to?  

Brett K

unread,
Jun 18, 2022, 2:56:25 PM6/18/22
to motioneye
Ah, I missed the despeckle filter. I think that might be helping.

StarbaseSSD

unread,
Jun 18, 2022, 2:57:39 PM6/18/22
to motioneye
Which Pi, and which version of motionEyeOS, or what hardware, OS and which versions of motion and motionEye?

Dewey

unread,
Jun 18, 2022, 3:27:07 PM6/18/22
to motioneye
Let me add that on *extremely* windy days, there is almost nothing you can do short of setting the triggering percentage to an insanely high amount that will stop the false detection.  Depending on how high the winds aloft, I have had days where the wind blowing the clouds triggered motion on my cameras.
 
A brief story:

I run 14 cameras that are tied together by a 15th headless RPi.  I used to have all of the cameras send pictures with all of the trigger events.  One historically windy day, the cameras sent so many pictures that my ISP sent me notice that I had exceeded my outbound allocation of emails for the day (I think it was something like 5,000), and that I... actually, our household... could not send any more emails until the next day.  My lesson from that was to first, stop sending emails for every trigger.  What I ended up doing is having my server query the cameras via cron job ever hour and then just send me an hourly log file of how many pictures each camera had.  I already know what is normal and what is not, and if I see unusual numbers for any of the cameras, I can remote in if not home and see what happened.  While this may be way beyond what you're interested in doing, I've still attached yesterday's log file just in case you are interested.  What the log file shows is the first entry starting from the bottom, everyday at midnight, the camera counters start over while also showing me the total count of pictures in parenthesis for the day before.  Then, each hour after midnight, I am sent a new log with that hour on top of the previous hour showing the total number of pictures thus far.  As a visual aid, the amount of pictures added since the previous hour is listed in parenthesis so I can see at a glance how many pictures I had for that hour without having to do the math.  There are still what I consider critical cameras that send pictures when triggered, but my number of out-of-the-ordinary picture emails is now near zero, if not zero on most days.  The numbers in yesterday's attached log file as well as the numbers showing at midnight from the day before is from a couple of windy days (today included), so even those numbers are MUCH higher that what is normal for my day.  On a normal quiet weather day, none of my cameras will have more that 2,000 to 3,000 pictures.

Dewey
2022-06-17_DailyCamCount.log
Reply all
Reply to author
Forward
0 new messages