Feature Request: Reduce changed pixel count by the amount of changed masked pixels
Description
I am having trouble with sunlight causing many false alarms.
My thought was:
Changing sunlight causes my black-masked pixels to probably change in the same ratio as my white-masked pixels. It would be great if there was a option that makes motion ignore such frames, even if there were changes on my white-masked area.
I am unsure if the changed-pixel-count should be reduced, or if a simple threshold of changed-black-mask-pixels would be defined.
Perhaps a reduction like this could work:
total_black_pixels = number of black pixels in the mask PGM. This would be counted from the mask file during startup.
changed_black_pixel_count = number of changed pixels in the captured image. This count would be calculated from every frame.
mask_pixel_correction_factor = factor of how strong changing masked pixels should be weighted (this would be the new property. 0.0 would be disabled)
Calculation for every frame:
float correction = (total_black_pixels - (changed_black_pixel_count*mask_pixel_correction_factor)) / total_black_pixels;
boolean trigger_event = (changed_pixel_count * correction) > threshold;
kind regards,
Christian
--
ChristianSp - 09 Mar 2016
Follow up