Sunlight and shadows

Support and queries relating to all previous versions of ZoneMinder
User avatar
floyd_2
Posts: 13
Joined: Thu Jul 22, 2004 1:34 am

Possible Assistance

Post by floyd_2 »

I have had problems with shadows/sunlight as well for exactly the same reasons as you...placing a camera to monitor a fairly large outdoor area. I have reduced my alarm count significantly by using adjoining inclusive zones with various sensitivities depending on what they are covering (a bush, the roof line, a skylight that lights up when a light is turned on at night, a clothes line - covered by 3 inclusive zones, the grass - subject to extreme shadowing - covered by 3 adjoining inclusive zones etc). I assume that you've already been down this path, and I can see that you've already tried altering your max and min pixel thresholds to assist. My backyard camera looks like a jigsaw of zones now. But thanks to a mixture of inclusive and active zones (and various sensitivities throught those zones tuned over time), no single zone that is affected by extreme shadow will cause an alarm for the most part. My zones are small enough that any person would have to cross at least two of them to get anywhere interesting, so I still capture people every time. I still get a few bogus alarms, but not nearly as many as before.

Not really sure if I can help, but if you wanna try ur luck, send me a pic taken with the camera in question and I'll take a look to see if I can assist.

Floyd
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

I tried the inclusive zone trick, and also experimented with preclusive zones and exclusive zones, but didn't find them useful. The preclusive zone should work for the sudden light level change type of event, but I've never been able to figure satisfactory settings.

I also tried fiddling with the way the score is calculated so that there's an optimum blob size, and massive events get low scores. That helps a bit, not by suppressing events, but by making them relatively easy to delete...

There's still the problem that in certain types of event the area triggered grows, so at some point the blobs are almost bound to hit optimal size....

At the moment I can't think of a strategy that would discriminate between the moving shadows and the moving target events. The resultant blobs are the same sorts of size. Some moves can be very similar too, so analysing the track of a blob wouldn't always help. The contrast may be a bit different. Moving shadows sometimes produce more blobs, but not always...
Rick Hewett
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Today is one of those days...

65 events in the last hour just on my back garden camera alone. Fewer on the other cameras mainly because there are fewer trees casting shadows over their active fields of view at the moment...
Rick Hewett
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

...and an interesting side-effect now that the sun is a bit lower is that it's triggering alarms in all zones simultaneously. This gives the total score field the occasional problem, as somewhere there's something that's limiting the total score to a maximum of 255 but I got one image that reports a total score of 260. Must have a hunt through the score code. It seems that the maximum score for a zone is limited to 100, but if you have 3 or more zones then it is possible for the total to exceed 255.
Rick Hewett
itsthemedication
Posts: 33
Joined: Mon Jul 12, 2004 3:11 pm

This is a feature!

Post by itsthemedication »

This is like a modern day Stonehenge! We can calculate the seasons based on event scores!

Sorry - couldn't resist. I know it's frustrating. I've been watching your thread carefully hoping for some fixes.

Good Luck - and I promise no more misplaced humor...
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

1.19.5 allows you to specify the minimum number of consecutive alarmed frames that will cause an event. If the sunlight event is caused by only one or two alarmed frames this may help you to filter.

I'm nearly done with it and it should be out later tonight or tomorrow.

Phil,
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Sounds interesting. I'll look forward to it.
Rick Hewett
gnuorder
Posts: 35
Joined: Fri Apr 02, 2004 5:38 pm

Post by gnuorder »

Yes, I noticed this consecutive alarmed frames feature when I upgraded and have been playing with it. It does help a lot. I still will get some false alarms when a cloud blows over or something but not nearly as many as before. It still triggers on me walking the dog or doing yard work with a setting of 10. At night I get some strange false triggers around objects in the yard. I think that may just be because my cameras are poor for low light. I will eventually get some better low light cameras for the yard and use these in well lighted areas.
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

I think part of the trouble I have is that I'm running at relatively low frame-rates. (To run with higher frame-rates I'd need much more memory and disk space.) This means that real events are often (but not always) very short, and single-frame events are not un-common. Light-on and light-off events tend to be spread into many frames because of the "Reference Image Blend %ge" effect, and sunlight fade and brighten events are also intrinsically many frames long. I think I'll have to gather some examples together....
Rick Hewett
endeitz
Posts: 3
Joined: Tue Oct 05, 2004 6:56 pm

Bayesian filter?

Post by endeitz »

I think a neat feature would be to be able to manually mark events as "true positives" and "false positives" and then have a bayesian analysis run on the stats from the events to see something can be "mined" from the statistics to discriminate the two types. This would be a similar approach as to the spam filter I use. It might be able to "calibrate" your zone settings in a way that you could not perceive manually.

I'm doubt I'm smart enough to implement this though.

Speaking of which, is there some way to dump out all of the stats into a single table by event number? The only way I've found to get at the stats is through two clicks per event. Are they kept in an ascii file somewhere?

Ed.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I started on the 'learning' feature months ago. I got so far with it and then got a bit stuck as there's so many variables. If you grep for 'learn' you'll find the traces of it dotted around. I guess I should revisit it and see if it can be resurrected.

The stats are kept in the Stats table so you can get all of them for an event by doing a 'select * from Stats where EventId = 1342;' etc or using the MySQL export to csv functions. There is one row per zone per frame though so you might get quite a few returned.

Phil,
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

The image-mask zone definition you were talking about a while back might help, because by using one irregularly shaped zone rather than several small ones, I could filter out more of the dappled-shadows events using a Max Blobs limit.

The other holy grail would be full motion detection - actually tracking a moving object from frame to frame. That is, of course, considerably more tricky. ;)
Rick Hewett
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

The image mask feature is still partially complete. The motion detection code to use irregular masks is finished but the web part about how to load and overlay masks is waiting to be done.

Motion tracking would be interesting to do. That's partly the motivation behind blobs in that a blob indicates you have one continuous 'thing' of a certain size and with a certain midpoint. If in the next frame you have a similarly sized blob with a midpoint that hasn't moved too far then it's likely to be the same thing so you can determine what has moved and where, and maybe even direct your camera. I think the potential is there I've just not found an application for it yet.

Phil,
Locked