Tuning motion detection for speed and accuracy.

Forum for questions and support relating to the 1.25.x releases only.
Locked
pedrocr
Posts: 3
Joined: Wed Dec 08, 2010 5:55 pm

Tuning motion detection for speed and accuracy.

Post by pedrocr »

I'm using a Foscam IP camera with zoneminder that can deliver 640x480 at 15fps in mjpeg. Zoneminder can use it just fine and I've gotten it up with motion detection. There are a couple of things I'd like to improve:

1) Motion detection is consuming a very substantial amount of CPU (around 20% for just this one camera). Since I'm planning to have a few more cameras and the machine is used for more than zoneminder I'd love to be able to do the motion detection at 5fps instead of the full 15. Skipping 2 out of 3 frames would be fine by me. I'd still want the monitor and the recordings to use the full 15fps just not the motion detection code.

2) Any time there's a uniform brightness change because the camera has adjusted the image automatically the motion detection detects an event. Is there any way to avoid this?

3) Sometimes bugs fly around the camera and set off a motion event. Is there any threshold I can change to avoid that, like the number of frames of motion required to form an event?

Thanks,

Pedro
Carrier82
Posts: 96
Joined: Sat Jul 28, 2012 8:30 pm

Re: Tuning motion detection for speed and accuracy.

Post by Carrier82 »

1) You can also try the ZM 1.25.0 performance patch: http://www.zoneminder.com/forums/viewto ... =9&t=17652.
2) Perhaps completely, no. But you can use the "Reference Image Blend %ge" in source settings and "Overload Frame Ignore Count" in zone settings, these may help and there is additional info on this forum.
3) Source / Buffers / Alarm frame count setting does this but will usually only eliminate part of bug problems.
pedrocr
Posts: 3
Joined: Wed Dec 08, 2010 5:55 pm

Re: Tuning motion detection for speed and accuracy.

Post by pedrocr »

The performance branch looks great, is that being integrated into the mainline anytime soon? Thanks for the other two tips, I'm trying those out.

As for doing motion detection at a lower framerate than capture, is that possible? It seems capture and analysis are split into zma and zmc so wouldn't this just be telling zma to drop images?

By the way, all the settings seem to be in terms of number of images, so if I change from say 15fps to 5fps all the settings would be pretty different in terms of their timebase, right?
Dopey
Posts: 2
Joined: Fri Aug 24, 2012 8:17 am

Re: Tuning motion detection for speed and accuracy.

Post by Dopey »

Carrier82 wrote:1) You can also try the ZM 1.25.0 performance patch: http://www.zoneminder.com/forums/viewto ... =9&t=17652.
+1 this is the best patch ever for zoneminder. I don't know why it's not already in the mainline because it has been tested for a long time by many users.

To the author of zoneminder : please add that patch to the official source code, it will benefit to everyone ! If you need some testing we can do it before a release.
Locked