Motion detection algorithm vs. auto-exposure

Questions? Suggestions? Need help? Talk about anything related to Yawcam...
Post Reply
element
Posts: 2
Joined: Sun Feb 06, 2011 12:01 pm

Motion detection algorithm vs. auto-exposure

Post by element »

My webcam (Microsoft LifeCam) has auto-exposure, which causes problems for motion detection. As the sun and clouds move across the sky, a big shadow of the neighboring house moves in the cam's view, causing auto-exposure to adjust every 15 min or so. This changes the overall brightness from frame to frame, triggering motion. Seems like the motion algorithm simply counts the total number of pixels that have changed from frame to frame. Such algorithm will always be triggered by a jump in brightness across the whole image, even if the jump is small. Wouldn't it be better to detect motion by using the maximum difference in values of corresponding pixels between two frames? If auto-exposure kicks in, the max difference in pixel values between frames will be small, because the adjustment is done in small steps. OTOH, if a man or a car moves into a picture, the max pixel difference will be much higher.
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

A similar feature has already been requested here.

Malun has already approved it. Which means it will be coming up in a release in the future, maybe not the next one, but it's being worked on.
kvrajan
Posts: 33
Joined: Wed Dec 29, 2010 2:36 pm

Motion detection controlled by motion percentage

Post by kvrajan »

Hi..
While on this, I was thinking while we have the feature to control the detection by 'sensitivity' and 'tolerance' percentage to be set, why not have a 'motion' percentage as well.

Basically, when we see the motion captured events in the Motion Detection window, a motion percentage as identified by the SW is indicated to know, what percentage of motion was encountered for each event.

This info. made me think, if we can also indicate the desired motion percentages to be captured then, diff. settings can be done for diff. cameras.

I'm eager to see this coming out.
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

I added this thread as a secondary thread to the first false positive request in the suggestion list.

I do agree that being able to specify the % of motion would be nice, but i'm wondering whether this isn't what we already were doing by modifying the tolerance.
kvrajan
Posts: 33
Joined: Wed Dec 29, 2010 2:36 pm

Motion detection controlled by motion percentage

Post by kvrajan »

Nope. We are not able to specify this either directly or indirectly, now.
We can only see what was the motion percentage of an event and from the window information, this does not appear to have any relation to the other two parameters - Sensitiviy & Tolerence being set.

I don't understand how this motion percentage is calculated. But if we can have a feature to the desired motion percentage from the events list, then it will be helpful. Now setting the Sensitivity & Tolerence percentages are done by trial & error from the events list.
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

The current method of calculating the % of motion is based on the number of pixels that changed since the last frame. So in a frame that is 320x240, you have 76800 pixels. So if you set the tolerance to 20%, it in fact means that it will not create a motion until the motion % has been over 20%. If, like me, you have problems with the lighting causing the motion to trip, set the sensitivity lower and raise the tolerance. My settings are currently 60% Sensitivity and 25% tolerance, I get only about half as much false positives as I used to with the default 80 Sens and 20 Tol.

Most people mentioned tat their false positive due to lighting were reporting motion % above 80%, which is why a feature has been requested to be able to set a low tolerance and high tolerance, such as 20% Low and 80% High. This way, most false positive will be ruled out by the High tolerance filter and the rest of your motion caught by the Low tolerance filter.

If you look at a picture from your webcam, and measure 4 even squares in it, whenever anything fills one of those squares entirely, you get 25% of motion and the motion is tripped. It is just a simple way of measuring approx. how much motion is needed to trigger it.

The Sensitivity measures of how much the pixel has to change in order to be counted as a changed pixel. so a variation of 20 colors on a 24-bit system would not be enough to trigger a change.
kvrajan
Posts: 33
Joined: Wed Dec 29, 2010 2:36 pm

Motion detection controlled by motion percentage

Post by kvrajan »

Hi..

Thanks a million to let me get the idea of how the motion % is calculated by the system. This is certainly a valuable input to me to set my alerts fairly right.
malun
Site Admin
Posts: 1593
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

In the help section you can read this:
(http://www.yawcam.com/help/help_motion_set.php)

Sensitivity - This slider specifies how sensitive Yawcam are for changes in the image area. A higher percentage will mark more pixels as changed. (Notice how the first bar below the preview area gets higher values when the sensitivity is increased.)

Tolerance - This slider specifies how much motion in the image that are allowed before the actions are taken. (Notice how the blue tolerance bar below the preview area changes according to the changes of the slider.) A higher percentage will tolerate more changes in the image before actions are taken.

As z3r0c00l12 has explained, tolerance is the percentage of changed pixels in the image that are allowed before an action is taken.

/malun
Post Reply