Page 1 of 2

Sunlight and shadows

Posted: Fri Apr 02, 2004 5:04 pm
by lazyleopard
The weather's brightening up, and consequently I'm seeing lots of false alarms as the sun shines on the lawn, or reflects off a window onto the wall, or finds some other means of fooling ZoneMinder into thinking someone's prowling....

I've been experimenting with various types of zones, but so far I've not managed to find a set-up that reliably ignores sun-coming-out and sun-going-in events without also ignoring someone-at-the-door events. I tried using a small preclusive zone, but maybe I didn't make it small enough, or get the sensitivity correct, or put it in a sensible place. Any hints, anyone?

Re: Sunlight and shadows

Posted: Thu Apr 08, 2004 1:50 am
by karlg
Looks like i'm starting to have the same problem. i had 250 alarms just yesterday alone. Sunny and windy days makes a long nights digging thru alarms. haven't found a definitive pattern yet in the scores, however, with playing around with filters, looks like i can catch about 60% with minimum false positives by setting a low duration and low score filter...

something that would be useful tho, is if the playback window remembered your rate and scale settings for quick scanning and deleting.

Re: Sunlight and shadows

Posted: Sat Apr 10, 2004 2:45 am
by fernando
the thing with sun shines is the cameras. if you use less then 1 lux cameras you will get shines and some thimes thae camera whill get all white.
some cameras are not designed for outdoors. thats why the use of autoiris. it s a mecanic iris that work acording with light brigtness. this give you a perfect sight at nigth and day.. even if you have the sun dirctly to the lens.
carefull with color cameras becouse then will loose colors if they are esposed to wrigth ligts..

Re: Sunlight and shadows

Posted: Mon Apr 12, 2004 1:40 pm
by zoneminder
Hi Karl,

Your request <i>"if the playback window remembered your rate and scale settings"</i> will be in the next release.

Phil,

Re: Sunlight and shadows

Posted: Wed Apr 14, 2004 2:33 am
by gnuorder
I seem to be having the oppostite problem although today I saw some false triggers due to clouds or high winds causing movement, had a lot of both. But the main problem has been at night when its mostly dark and when I'me not recieving an image at all I get false triggers. What I have is a cheap, as in cheaply built, GE wireless camera and monitor setup. I have that hooked up to a VCR and from the video out, to a bttv card. I had the zone set for alarmed pixels at first and that produced a couple thousand false triggers, mostly at night. I then switched to glob mode but it wouldn't trigger at all. I then set the monitor to turn off unless there is an alarm from its own motion detectors thinking the image turning on would trigger the globs. Nothing would trigger. I switched back to alarmed pixels and started getting false triggers on the blank blue output of the VCR. I have it working a little better now by making the whole image inclusive and a smaller part active but when it triggers, I get a lot of smaller events instead of one or a few longer ones. I will be getting better cameras and equipment but for now is there anything I should check to cut down on false triggers?

Posted: Sat Apr 17, 2004 4:36 pm
by lazyleopard
Today ZoneMinder's having a field day. There's bright sunlight which occasionally gets dimmed by the small fleeting clouds that are scattered around the sky, and the wind is blowing quite a bit too. The shadows of the trees and shrubs move in the wind. They're small events, and my system is mostly looking for smaller events. Over 600Mb of events captured so far today....

Here are trigger frame stats from a couple of interesting events:

Code: Select all

Zone  Alarm Px  Filter Px  Blob Px  Blobs  Blob Sizes  Alarm Limits     Score
Lawn   3111       1403      953       1       0-0      339,236-500,349     0
Drive  3319       2601     2482       3     579-1740   514,402-637,441     3

Code: Select all

Zone  Alarm Px  Filter Px  Blob Px  Blobs  Blob Sizes  Alarm Limits     Score
Lawn   3602       1981     1918       2    1094-1094   260,182-296,242     1
Here's a trigger fram from a shadows moving in the wind event:

Code: Select all

Zone  Alarm Px  Filter Px  Blob Px  Blobs  Blob Sizes  Alarm Limits     Score
Lawn   5600        357      244       1       0-0      215,194-288,232     0
A sun coming out event:

Code: Select all

Zone  Alarm Px  Filter Px  Blob Px  Blobs  Blob Sizes  Alarm Limits     Score
Lawn  10067       2787     2345       1       0-0      501,541-99,159      1
Drive  3346        484      406       2     292-292    500,236-699,430     0
Trouble is I've already cut the maximum sizes of events down so far that really big events like a car arriving or leaving sometimes get missed altogether, and even the interesting events are getting very low scores. Any ideas, anyone?

Posted: Wed May 05, 2004 11:53 am
by lazyleopard
The spring sun and showers has given ZoneMinder lots to do today. It's running at well over 20 events per monitor per hour. Most of them are triggered either by the sun coming out and going in, or by the wind moving shadows on the lawn. Any tips on how to reduce the false alarms would be welcome.

Posted: Wed May 05, 2004 1:38 pm
by tech_fixer
This usually happens when you use a single camera to cover a big field of view. The bigger the field of view, the more elements that can cause flase alarms.

The solution was for me to use more cameras in a more specific way. Such as, looking at a door, as opposed as looking at a door and a driveway. Also, try positioning your camera at a different place, as changing the view itself also changes the way it is affected by sunlight and shadows.

Lastly, if your camera is looking outdoors, try using a sun hood. You may sacrifice some of field of view, but you'll get some time back from not having to check all the false alarms all night.

Regards,
Jose Rodriguez.

Posted: Wed May 05, 2004 1:40 pm
by zoneminder
I've changed my setup to get this kind of event also so I can investigate it further. I'm still curious about the strange blob counts that you have posted so I wonder if there's a deeper issue somewhere.

Returning to your question however, a first step to eliminating false events is to describe in English (or a language of your choice) what a false positive event and a true positive event look like. How big they are, how long they might last, how many fragments, what the colour constrast would be etc etc. Then it's a case of trying to express those details in terms of the zones. Sorry it's a bit woolly, but I tend to find that just playing with the number right away tends to make things worse whereas an expression of what the events look like makes it easier to enumerate.

Phil,

Posted: Wed May 05, 2004 3:05 pm
by zoneminder
Having had a look I have definitely found a bug, though I don't know what effect it might have on your motion detection, if any.

It was actually something that was pointed out on another thread I think but which I hadn't got around to looking at yet.

Basically, in zm_zone.cpp you should change the line

Code: Select all

for ( int i = WHITE; i > 0; i-- )
to

Code: Select all

for ( int i = (WHITE-1); i > 0; i-- )
At present it creates a blob indexed as 255 which never gets merged out or eliminated resulting in the bogus counts. These could potentially be enough to trigger an alarm when otherwise one would not be generated.

I would recommend making that change and seeing if you get anywhere, otherwise we'll keep proceeding down the path of seeing what zone settings would be best for you.

Phil,[/code]

Posted: Wed May 05, 2004 5:22 pm
by lazyleopard
I pointed out that out-by-one, but fixed it the other way round, by changing all the loops to use

Code: Select all

for ( int i = WHITE; i > 0; i-- )
I'll use your fix instead and see what happens....

I guess the code above uses elements 1...255 in blob_stats (which is declared as having 256 elements) while

Code: Select all

for ( int i = 1; i < WHITE; i++ )
and

Code: Select all

for ( int i = (WHITE-1); i > 0; i-- )
use elements 1...254. The end elements 0 and 255 have some special function, presumably?

Posted: Wed May 05, 2004 7:22 pm
by zoneminder
Yes, not the most self-documented code you've ever seen.

It's checking the 'difference' image so black (0x00) areas have no differences and white (0xff) ones are tagged as being different. As it goes through the white areas it categorises them into contiguous areas and tags them with one of the intermediate colours.

Phil,

Posted: Thu May 06, 2004 8:52 am
by lazyleopard
I'm running with the code fixed as you suggest now. Doesn't seem to have affected the number of false alarms, but the blob sizes are sane.

Posted: Thu May 06, 2004 9:58 am
by zoneminder
1.19.3 also now expresses the various sizes and counts in %ge terms which you might find more useful in terms of setting sensible limits.

Phil,

Posted: Thu Jul 15, 2004 5:07 pm
by lazyleopard
Two months down the line...

There are two different types of sun-and-shadows events that plage my cameras.

First, there's the "shadow of a moving object" event. The primary sources for these on my cameras are the shadows cast by trees. Depending on time of day these can appear almost anywhere in the cameras field, so carefully chozen zones are no help. It's almost impossible to distinguish these from real movement events. The only partly successful approach is based on numbers of blobs, and that only works when there are enough shadows to cause thhe maxBlobs limit to cut things off.

Second, there's the "rapid light level change" event. This is usually accompanied by appearance or disappearance of shadows. The peak of the event can usually be ignored by setting a maxPixels value, but there are always point at the beginning and end where the number of affected pixels falls below the maxPixels limit. I've tried to use preclusive zones to stop these as well, but havn't been able to find preclusive zone placements and sizes that suppress the unwanted events without also suppressing some real events.

Anyone else have any hints or tips on zone settings to help avoid these unwanted events?