brunoklein99 / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

Ignore luminosity #243

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I get a lot of false positives from clouds moving across the sky and causing 
brightness changes in the room - it'd be great if the movement detector could 
ignore changes based on luminosity levels. Is there a way to do that already, 
or is it something that could be added into the framework?

Original issue reported on code.google.com by ad...@activeunlimited.com on 15 Aug 2011 at 1:15

GoogleCodeExporter commented 8 years ago
>> Is there a way to do that already
No, not for now.

Original comment by andrew.k...@gmail.com on 15 Aug 2011 at 8:25

GoogleCodeExporter commented 8 years ago
I found this:
http://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb
-color

that might help - I'd have a go at writing it myself but I think you'd probably 
do a much better job of it! Is this something you see adding at any point or 
should I get my hands dirty with it?

Original comment by ad...@activeunlimited.com on 16 Aug 2011 at 3:43

GoogleCodeExporter commented 8 years ago
Probably the easiest way to do this is to utilize a rolling median filter.  
Basically, the median is robust against outliers, and "motion" or "movement" 
generally consists of outliers.  However, in the event of whole scene change, 
the median will be affected since there's significant change across the entire 
image.  

So what you can do is augment a foreground/background filter with this rolling 
median filter.  Basically, the rolling median consists of a history of the last 
10-20 frames or so.  Whenever you get a new frame, compute the median of that 
frame.  Then find the median value of your rolling history.  Then subtract the 
two, and that's how much you should adjust the image by.  Essentially the 
filter will clip out "whole scene change" from the image.

Original comment by kid...@gmail.com on 6 Sep 2011 at 1:37