Page 1 of 1

False Positives

Posted: Thu Jan 22, 2004 2:52 pm
by qwe10730
Hi,

Does anyone know how I can get Zoneminder to ignore events that last for only one frame and only trigger on longer events? I'll explain my problem.

I've got Zoneminder up and running but I am encountering two main problems when it detects an event despite there being no movement in the frame.

In the first case the view of my back garden has no view of the sky, just the grass and fence. However Zoneminder triggers constantly on a lighter section of the grass and fence. I think it's light levels that cause this. I am unable to divide the picture into zones reliably because of the shape of the objects.

In the second case, I moved the camera to look out of the front of my house. This area is divided into 2 inactive zones (sky and a tree) and one active zone covering 70% of the picture. Every few minutes Zoneminder will capture a very distored picture with strange colours (green and purple) and parts of the picture in the wrong place. Usually the parts of the picture corrresponding to different zones will be affected differently. Mostly it's just the active zone that's chopped up.

In both cases the problem only lasts for one frame but triggers the event anyway. Is there any way that I can get Zoneminder to ignore an event that lasts for only one frame?

Russell.

Re: False Positives

Posted: Thu Jan 22, 2004 3:35 pm
by victor_diago
Yes, i think you should configure your Warm-up frames.

in the readme :

"Warm-up Frames - This specifies how many frames the analysis daemon should process but not examine when it starts. This allows it to generate an accurate reference image from a series of images before looking too carefully for any changes. I use a value of 25 here, too high and it will take a long time to start, too low and you will get false alarms when the analysis daemon starts up."

so, if ou are capturing at 1 fps, 1 warm-up frame will skip one tiny alarm one second ... two, for two seconds..
thats it. And about the lightining :

"Alarm Threshold - This represents the difference in value between a pixel and its predecessor in the reference image. For greyscale images this is simple but for colour images the colours are averaged first, originally this used an RMS (root mean squared) algorithm but calculating square roots mugs performance and does not seem to improve detection. Using an average does means that subtle colour changes without any brightness change may go undetected but this is not the normal circumstance. There is also the option to use a more sophisticated integer algorithm to calculate a Y (or brightness) value from the colours themselves."

so you can control this, also, if you want to improve a little more, you can use the filtered pixels and min blob size.

Cheers

Victor Diago

Re: False Positives

Posted: Thu Jan 22, 2004 4:50 pm
by qwe10730
Hi Victor,

thanks for your reply.

I think the Warm-up Frames parameter is only used on startup whereas the problems I'm getting are whilst the system is running normally. My alarms are triggers on events that last for only 1 frame regardless of the number of frames per second that I'm capturing. They happen every few minutes. I have managed to reduce the number by decreasing the Maximum Alarmed Area to 20%

I've tried fiddling with the Alarm threshold but it doesn't seem to be the right adjustment either. With the default value of 25 it will trigger on the fence and grass every few minutes whilst it will not trigger when I walk in front of the camera. Setiing this value much higher than 30 stops triggering on any event whilst setting it lower than 20 makes it trigger continuously off the fence and grass.

Russell.

Re: False Positives

Posted: Thu Jan 22, 2004 5:19 pm
by zoneminder
Hi Russell,

There are a couple of things you can look at that might help.

Firstly go into on of the events listings and click on the frame counts for the event you are interested in. This will bring up a listing of the frames with the alarmed frames highlighted in red. If you have ZM_RECORD_EVENT_STATS on (in options) then clicking on the score for the frame will bring up another window with some basic stats about what caused the event. There may be something in there that might stand out, maybe a large number of blobs or something along those lines. If you're not sure feel free to mail or post the values and I will have a look.

Secondly, you are correct about the warm-up frames, that is only on system start.

Thirdly, I am curious about why you are getting the events in the first place. Does the lighting change that much that frequently or is it all down to the strange colour changes? I have seen colour changes and flickering like that a couple of time and it is generally down to the hardware or drivers. Sometimes dropping the maximum capture rate can eliminate it and then you can increase it again to the point just below where the effect occurs. I am going to be putting a debug element in the software soon which will capture and document more fully why an event occured which I may send you an early drop of if you still have this problem in a few days.

Fourthly, unfortunately there is no setting allowing you to set how many alarm frames need to occur before an alarm is triggered. I've looked at it a couple of times and there was no simple way of doing it previously. I may well take another look as I agree that it might be useful in some circumstances.

Fifthly, there is some semi-good news. You can create a filter that will delete single alarm frame events very shortly after they occur. You might still see a few if you look right after they have taken place but otherwise the only evidence of them will be the gaps in the event id numbers.

Regards,

Phil,

Re: False Positives

Posted: Thu Jan 22, 2004 5:42 pm
by qwe10730
Hi Phil,

I've just done as you suggested and throttled back the max fps to see what happens. I'll have to wait until tomorrow now as the strange flickering/colour events only happen during the day time. It's a bit weird as bits of the picture appear in the wrong colours and in the wrong place. Sometimes split down the middle horizontally or vertically and the pieces reversed or inverted. But only for one frame and then everything is OK again. I suspect that you may be right about the max fps as i notice that I get 7.5 fps during the day but only 5fps at night. I've reduced it to 3fps so we'll see what happens.

The other problem with the light levels varying in the back garden is possibly because the garden is pretty dull at this time of year but there are some areas (not the triggering areas) that are very bright. The camera (Logitech Quickcam Express) is probably trying to adjust the light levels incorrectly because of the very high contrast in the garden when the sun is shining.

Cheers,

Russell.

Re: False Positives

Posted: Thu Jan 22, 2004 11:04 pm
by snakebyte
A problem that my camera used to have prior to 1.17 was a random all-black frame... when ever that happened, an event would trigger. My solution was to add a little exclusive zone in a place where there normally isn't any motion. Any time the screen goes completely black, that zone triggers too and zoneminder then drops the event.

One other problem I've been having happens when my camera uses its' auto adjustments... like when a cloud goes by. (I'm right at a point where the fog from the ocean dissipates, so there are quick jumps from light to dark to light again). I still haven't been able to correctly filter that. Also, headlights from cars driving by at night is another one I'm still trying to work on, but I haven't played around with the new filtering abilities yet, so there's probably a nice way to do something there... Anyway, give the exclusive zone a try.. it might work for ya.

Re: False Positives

Posted: Fri Jan 23, 2004 12:00 am
by zoneminder
This is a good suggestion. You might find that changing your zone to a 'preclusive' zone rather an exclusive one will be slightly quicker. An alarm in a preclusive zone prevents any actual alarm being generated and can be a good approach to wholesale changes if placed, as suggested, where motion would not normally occur. The zone does not have to be large, a few pixels each way will probably be enough.

Phil,

Re: False Positives

Posted: Fri Jan 23, 2004 12:34 pm
by qwe10730
Some very useful suggestions there. Thanks chaps.

I think I may have misunderstood preclusive zones. I now have my view divided into 5 zones. The top and bottom 1 percent are defined as preclusive zones. The next 15-20% are defined as inactive and finally the middle section of the view is active. However I am getting pictures captured with red lines drawn around the areas that include the preclusive zones. I thought that events in the preclusive zones prevented an alarm being raised at all for that frame.

The picture distortions that i get vary but most often involve the top 10% or so of the picture being cut off and appearing divided into 2 swapped sections at the bottom of the picture. This is often accompanied by colour and position shifts in the active part of the picture.

Surely my preclusive zones at the top and bottom of the view should stop frames suffering from this kind of distortion triggering an alarm.

Russell.

Re: False Positives

Posted: Fri Jan 23, 2004 1:20 pm
by qwe10730
Some very useful suggestions there. Thanks chaps.

I think I may have misunderstood preclusive zones. I now have my view divided into 5 zones. The top and bottom 1 percent are defined as preclusive zones. The next 15-20% are defined as inactive and finally the middle section of the view is active. However I am getting pictures captured with red lines drawn around the areas that include the preclusive zones. I thought that events in the preclusive zones prevented an alarm being raised at all for that frame.

The picture distortions that i get vary but most often involve the top 10% or so of the picture being cut off and appearing divided into 2 swapped sections at the bottom of the picture. This is often accompanied by colour and position shifts in the active part of the picture.

Surely my preclusive zones at the top and bottom of the view should stop frames suffering from this kind of distortion triggering an alarm.

Russell.

Re: False Positives

Posted: Fri Jan 23, 2004 6:07 pm
by mikep
I get ONLY positives,
I set the settings to
minimum x 0
minimum Y 0
maximum X 100
maximum Y 100
alarm colour 255
threshold 255
min alarmed area 20
max 100
filter width 100x100
min filtered area 20
max 100
minimum blob 20
max 100

and it still just records everything all the time,

the only way I know this is once i go to change the settings I get a huge long event once the changes take place, oif the time between changing settings.

anyone have a clue whats going on here?
it looks like its always recording no matter what.

Re: False Positives

Posted: Fri Jan 23, 2004 8:27 pm
by zoneminder
I think you need to check the documentation a bit more when doing your settings. For instance the README says about filter width "should be fairly small, and an odd number, three or five is a good value to choose", so a value of 100 which is neither odd nor small will not do anything to help.

Which mode have you set you monitors to? If it's 'mocord' or 'record' then it will record all the time

Also check the /var/log/messages file as there is information in there about events and what is triggering then and also by going to the stats view from the single frame view of an event.

There is more information on what the Zone configuration settings mean in <a href="http://www.zoneminder.com/forum_general ... 112&">this thread</a> which is probably worth a read, as well as the whole README and the FAQ section of this site.

Cheers,

Phil,

Re: False Positives

Posted: Fri Jan 23, 2004 9:17 pm
by mikep
Now I have the exact opposite problem, I set it to "Monitor" and setup the settings like this

minimum x 0
minimum Y 0
maximum X 100
maximum Y 100
alarm colour 255
threshold 15
min alarmed area 3
max 100
filter width 3x3
min filtered area 3
max filtered area 3
minimum blob 2
max 25

and I get zero events, even with 2 people running around in the view.

I read the readme, so hopefully these new numbers reflect that.

I also tries setting the threshold to 4 and it didnt alarm.

-Mike

Re: False Positives

Posted: Fri Jan 23, 2004 9:18 pm
by mikep
The only info I get in messages is
Jan 23 16:10:40 zoneminder zmc-d0[23956]: INF [ITD_Front_record: 43000 - Capturing at 29.41 fps]
Jan 23 16:11:13 zoneminder zmc-d0[23956]: INF [ITD_Front_record: 44000 - Capturing at 30.30 fps]
Jan 23 16:11:47 zoneminder zmc-d0[23956]: INF [ITD_Front_record: 45000 - Capturing at 29.41 fps]
Jan 23 16:12:20 zoneminder zmc-d0[23956]: INF [ITD_Front_record: 46000 - Capturing at 30.30 fps]
Jan 23 16:12:53 zoneminder zmc-d0[23956]: INF [ITD_Front_record: 47000 - Capturing at 30.30 fps]
Jan 23 16:13:27 zoneminder zmc-d0[23956]: INF [ITD_Front_record: 48000 - Capturing at 29.41 fps]

Re: False Positives

Posted: Fri Jan 23, 2004 9:31 pm
by mikep
I set it to MoDetect, as it is supposed to be I now realise, but still no alarms, even with a threshold of 2.

Re: False Positives

Posted: Fri Jan 23, 2004 9:55 pm
by zoneminder
A couple things here.

I assume you are using 'percent' rather than 'pixels' as the units as that will make a big difference.

Secondly, your max filtered area of 3 will prevent any motion whose filtered pixels exceed 3% from causing an alarm. I would recommend setting this to 100 for now.

Phil,