ZM missing motion

Support and queries relating to all previous versions of ZoneMinder
Locked
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

ZM missing motion

Post by SyRenity »

Hi.

I recently noticed that ZM misses significant motion in frames. The most visible symptom is people appearing and dis-appearing in recordings, without any recordings of how they entered or left the watched area. The people figures are large enough, and should have triggered the detection the moment they have entered the area.

I double-checked my logs, and didn't see there any buffer overruns, nor daemon crashes. It simply seems as ZM ignores the motion.

I'm using version 1.22. Were any related bugs fixed since then?

Thanks in advance.
haus
Posts: 213
Joined: Thu Oct 11, 2007 5:10 am

Post by haus »

People appearing in the middle of an event sounds like dropped frames to me - like your CPU is overloaded perhaps. I'm just learning about ZM so this is all new to me, but by default there's a pre- and post-event buffer of 10 frames that gets prepended and appended to each event. If the significant event is someone walking across the monitor viewing area, the pre-event frames should capture them coming into the detection area unless you're at 1fps and/or they're moving really fast (or it's a telephoto lens with a narrow field of view). Dropped frames caused by the process of activating the alarm on an underpowered CPU might cause the person to appear out of thin air.

But I'm a total newbie and that's just a guess. :) What's your hardware like and your CPU load during an alarm?
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity »

Thanks for the reply, your guess as good as mine :).

The hardware is dual CPU, dual-core Opteron 2 Ghz, 2 GB RAM.

I increased the post and pre buffers to 50 frames each, but still it doesn't help.

The load is about 5-7 in peaks, which AFAIK fine for such configuration. Moreover, if the CPU had not enough power, buffer overrun warnings should have appear, and there non such.

The recorded people, after movement, stay in the watched area, they don't exit it immediately. (I guess it doesn't catch these who exit at all!)

It simply seems as person appears from no where, and then sometimes dis-appears as well.
haus
Posts: 213
Joined: Thu Oct 11, 2007 5:10 am

Post by haus »

5-7 seems really high to me despite your system being a powerhouse compared to mine. :) Anything over 2 (1 per core/CPU) means there's more than the current system can handle without making something wait. At least as I understand load, which is probably "not that well".

I'm keeping my loads under 0.4 in a non-alarmed state (having a montage window open with Firefox does raise that). Granted I only have 5 cams and I'm limiting them to 3fps normally, 4 or 5 during alarmed states. .

I'd try getting that load average down below 2 and see if your problem disappears. If you're running X, try not running X and see if you can get the loads down. You may need to actually uninstall GDM for full effect. Also define motion zones other than the entire image if possible. Are you running 320x240? Larger image sizes take a great deal more processing power, AIUI. Also try reducing the pre/post buffers. Maybe processing 50 images is too much. If you're running 10fps, that's still 5 seconds of pre-buffer, which may be more than you need?

I know the docs say loads above 10 for brief periods are OK, but IMHO anything over 1 per CPU during a non-alarm state means the CPUs are busier than they should be for a mission critical system.

Hope that helps some. I'm pretty amazed with ZM so far and I've only been playing with it during evenings for a week or so.

(edited to change "loads under 10" to "loads above 10")
Last edited by haus on Mon Oct 22, 2007 4:34 pm, edited 1 time in total.
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity »

Hi.

Thanks for the answer.

AFAIK I know ZM, it stores the frames in circular buffers, and allows the CPU to analyze them for motion. If the CPU has not enough time to process them all, the older frames overwritten by new ones, and you get the "buffer overrun" error.

This is not the case here, I don't see any such errors. I also switched the motion sensitivity to best, but it still seems to miss frames. Any idea?

Thanks in advance.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

id say 5-7 load is not fine, i have had issues with systems that spike at 3-4. Yes it will work but whatever is causing your load to hit 7 is the problem as i dont see why it should.

But as you say its isnt under running lol

Whats the 15 min load on it?

And is it just a sensitivity issue ie its not sensitive enough? (just thought your load is it 0.5-0.7?) as opposed to 5-7?

Is the box public?

James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Hey SyRenity,
Always good to see you back ;)
Might it be that you have the blend to low?
If you have it set to low and there is allot of movement covering allot of the image It might be creating the reference image so that it does not qualify for the zone settings kinda like having a black hole in your reference.....
Hmm, seems like it would be great tool to have the ability to look at the reference image in memory maybe.
The only other thing that comes to mind would be like the others have suggested, and you might not see errors if you have it set so zma can drop frames to catchup (ZM_OPT_ADAPTIVE_SKIP) But I might be misinterpreting this feature as well.

Regards,
Corey
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity »

Hi Cordel.

I actually checking the forums often, but usually just lurking in shadows :).

The blend reference is the default 7%, perhaps it should be increased?

I thought that fast movements might cause these issues. Could it be, that if person moves too fast, its entry to the watched area won't be captured? Or if alternatively after standing some time the person moves away, it won't be captured as well?


About ZM_OPT_ADAPTIVE_SKIP, it seems as this feature is designed to help prevent dropped frames, and is enabled by default. I will turn it off, and see if it helps.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

The way it works is zma checks the amount of pixels that is different from the reference image. Each scan though the input blends that image by the amount you have set. Generaly you would want a slower blend on a faster fps camera and higher blends on slower fps cameras. These are not stedfast rules however because it depends on how you want the detection to behave and of coarse for an alarm to be created, the difference between the reference image and the current snapshot have to suit your zone settings.
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity »

If I have a moderately fast camera (~10 fps), should the % blend be lower or higher?
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity »

I tried to set the zone to best, high sensitivity - and it stopped recording anything altogether. Only when I restored the default zone settings, it started recording again.

I thought it should actually improve the sensitivity, not to worsen it?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

it may be constantly in alarm when you up the sens by lowing the alarm pixels etc. Did you use best high sens or fast? And did it create 1 long event?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity »

Best, High sensitivity - no events at all.

The default setting works fine.
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity »

Hi.

I started logging event stats to try and tune the zone. Are there any instructions how to use these stats?
Locked