Suggestions for configuring motion detection zones

Add any particular hints or tricks you have found to help with your ZoneMinder experience.
Post Reply
kkrofft
Posts: 41
Joined: Sun Mar 16, 2014 9:55 pm

Suggestions for configuring motion detection zones

Post by kkrofft »

I have been having a great time getting my four cameras setup and configured. Basically I am watching my yard, driveway and porch for human activity after a family whose kids are known vandals moved into the neighborhood.

It has taken a bit to get the system to properly recognize what I want it to and to reduce false positives. The Wiki page at http://www.zoneminder.com/wiki/index.php/Defining_Zones is a big help but I feel it could use examples to aid in understanding and perhaps provide a methodology for debugging settings. Below are the steps I took to get my setup to a reliable state of function. This may have been obvious to others but it took me a while to come up with this simple method.

1.First define the basic zones.
(One of the most difficult for me was my main side yard. It is monitored by a 5 megapixel camera mounted 10 to 12 feet
above the ground and covers an area close to 50'H X 100'V. The camera faces the side of the detached garage which
has a short driveway at the right end that ends in an alley. Roughly 2/3 of the foreground is open grass with a sidewalk
on the left edge that displays as vertical from the walk-in garage door to the house.)


My initial pass at zones was to make one across the top extending from the top of the frame to just below the gutter on the garage. (Why monitor an area that no one can access?) A second zone was added as a rectangle over the driveway area with the last zone being the rest of the frame. I tried to match the edges of existing zones as I added new ones and not allow them to overlap but I don't know how important that is. I used percentages and Blobs as my initial settings looking at the presets to see what the settings should look like, then referring to the Wiki page to understand what they meant.

2. Evaluate the results.

My initial settings resulted in my being able to walk across the yard undetected but capturing the shadow of every cloud that passed. Also had lots of false positives where looking at the alarm frame showed large numbers of small blobs or large blobs with lots of holes.

3. The solution

After several weeks of playing with settings I came up with a plan. I set the min pixel threshold to 30 and set all the remaining minimums to 1% and the maximums for the areas to 70%. My reasoning was that I needed to be sure to capture a person moving through the zone so I could generate an event, then look at the alarm frames and the associated stats to see what an actual individual in the frame looks like to Zoneminder. Setting the maximums to 70 percent or so should make Zoneminder ignore large changes that can't be a person such as a cloud shadow or a lightning flash.

Next I walked though the zones to generate motion captures. Review of the capture frames told the story. By effectively ignoring all the filters except the pixel threshold, I was able to set the minimum threshold vale to a point where a person is registered but other smaller motions will be ignored. For most of my zones this is 35 to 45%.

Once the initial capture is tuned reliably, the rest of the filters can be set to eliminate false positives. The stats window for an alarm frame showed the values seen by Zoneminder for a frame with me walking through it. This pointed out the next problem.

In my initial attempts to set the Alarm, Filter and Blob percentages, I found that my large zone representing the grassy area did not have enough filter resolution. Meaning that if I set the alarm percentage low to capture me when I was far from the camera close to the garage where I was a small percentage of the large zone, changes closer to the camera tended to generate false positives. Of course this makes perfect sense, the closer object is larger in the frame and so is a larger percentage of the zone. As I walked away from the camera, my image got smaller and was a proportionately smaller percentage of the view.

So the obvious solution was to break up the view into more zones. I added 2 horizontal zones so that I could fine tune the percentages based on the distance from the camera. I made the zones about man height. A few more walkthroughs and I was able to tweak the settings very nicely. Most are set to 4,3 and 1 respectively.

Note that the Pixel Threshold setting will be different for different contrast levels so probably best to tune with clothing on that is close to the background colors and be sure to verify the settings at night or in low light. As a safety measure I set the values for all fields a few points lower than the numbers generated by the stats report.

I hope this helps others to get things working a little faster than I did and improves their Zoneminder experience.
Attachments
Final zone config.
Final zone config.
main_yard_zones.jpg (34.07 KiB) Viewed 8559 times
Post Reply