Page 1 of 1

How do you handle the over-night squigglies?

Posted: Mon Feb 25, 2008 4:15 pm
by sck_nogas
Okay, bad description for what happens to my cameras overnight... When the sun is down and the lights are off, the cameras pickup ALOT of noise and movement in the images. Like these...

Image Image

So, I get ALOT of overnight noise, and have a filter to show "overnight" items, but since there may be things in there I need to know, I have to manually review them.

So, what I was thinking is a filter that could detect the content of the images, like if the image is darker than 0.02 lumens then it's "black" and thus can be purged. Or a method for detecting the brightness/contrast in the changed image, and if it's only 1-2 shades of color off, then ignore.

Any other ideas on how to solve?

Scott

Posted: Mon Feb 25, 2008 7:57 pm
by MJN
You could probably solve it by simply increasing the minimum pixel threshold. To the naked eye the colour of your detected blobs don't look all that different to the surrounding areas hence the colour difference must only be slight - increasing the minimum pixel threshold should avoid these false triggers whilst still detecting 'real' activity by virtue of the colour change of such activities usually being quite significant.

Mathew

Posted: Mon Feb 25, 2008 8:19 pm
by sck_nogas
I'll check into this tonight (have made some tweaks today)

But, I am worried that if the minimum is set too high would it miss other images, since at night the image is 90+% dark. But, during the day the settings are "just right" for capturing movement.

So, if we could have a day/night setting so you could change the sensitivity on cameras depending on the time, that might also be the trick. Plus, while I'm kvetching, I REALLY want to have a filter that says "from [dusk] to [dawn]" without having to specify the time, since it changes year round. But, that would mean we'd have to tell ZM where it is, and it would have to calculate the dawn/dusk times per day and could slow things down... Or, maybe we have a table that gets generated based on location on install?

Just thinking out loud.

Scott

Posted: Mon Feb 25, 2008 11:30 pm
by timcraig
Yes, I agree having the ability to change the sensitivity of motion detection would be a nice feature to have. In fact, I working on modding 1.23.1 to add this feature.

I came up with the idea of "zone groups." Current in ZM each monitor has a set of zones. In my zone group idea, each monitor will have a set of zone groups. A zone group is a set of zones just like the set of zones a monitor has in the current version of ZM. The user selects a zone group of a monitor to be the active group and ZM will do motion detection based on the zones in that group.

For example, if a user wants to do daytime motion detection different than night time motion detection, the user can create 2 zone groups 'daytime' and 'nighttime'. Then add zones to the different two groups based on the needs of the different time periods. When it is daytime the user will set the the active zone group to be 'daytime' and when it's nighttime the user will set active zone group to be 'nighttime'.

Modify ZM's run states to save and load the active zone group and you can schedule the active zone group changes in a cron job.

I plan to change the current Zones windows (the window you get when you click on a 'Zones' column cell in the Console). Bellow the "<Monitor> Zones" label on the page I plan to add a section for zone groups. It will have a label "Zone Group: <Zone>" and bellow that will have the buttons 'Change', 'Rename', 'Delete', 'New', 'Clone'. The rest of the Zones window bellow the zone group section will remain the same as before. The 'Change' button will bring up a popup with a selector that lets you change the active zone group to another group in the monitor. 'Rename' renames the current zone group. 'Delete' deletes the current zone group. 'New' creates a new zone group. 'Clone' creates a new zone group with a copy of the zones of the current zone group.

The zones you see in the Zones windows are the zones of the current zone group. The users edits the zones the same why they are edited in ZM now.


I'm currently working on adding zone groups to ZM and tying them to run states in my free time. I don't know when I I'll have it done. I'm pretty busy right now with my job and family. Once I do have it done, I'll post the changes I made in the user contribution form. I'll try to include a perl script that modifies the database structure and another that undoes the changes should the user wish to undo the changes.

Posted: Wed Feb 27, 2008 1:09 am
by linuxsense
One option to deal with issues like this is to use a different 'run state' for day and one for night....you just setup each state to work best with the conditions for that time of day then setup a cron job to switch between the run states at the correct time. It takes a little tinkering, but using that method you can make sure ZM is capturing important events while ignoring the light changes and other things you dont care about. For outdoor camera installations set for fairly high sensitivity using day/night settings is almost a must IMO.

Posted: Thu Feb 28, 2008 4:38 pm
by sck_nogas
Oooooh, elegant idea....

Plus, I could use "sunrise_time" and the "at" service to have total control!

http://www.sccon.ca/sccon/linux/sunshine.htm

BWAH HA Ha ha! Okay, not as elegant as ZM doing it, itself, but I could also have the exterior lights be triggered via the same at script.

Thanks for the idea!

Scott

Posted: Sun Mar 02, 2008 6:55 pm
by zoneminder
The use of 'zone sets' (the same as the zone groups mentioned above) is a feature that I started but, for some reason, never got round to finishing or merging into the trunk. I will have a look and revisit.

Posted: Mon Mar 10, 2008 8:17 pm
by hrabe
Zone sets is very fine feature for day/night. Phil, please try compute switching time for sunset/sunrise from gps coordinate with time offset like as http://www.sccon.ca/sccon/linux/sunshine.htm
Thanks you very much for your great software!

Posted: Tue Mar 11, 2008 5:24 am
by timcraig
That's great Phil. Being able to tie zone configurations to run states would be a great feature. :D