How to understand stats from an alarm?

Forum for questions and support relating to the 1.31.x releases only.
Locked
maxiedaniels
Posts: 23
Joined: Sat Mar 10, 2018 1:34 am

How to understand stats from an alarm?

Post by maxiedaniels »

I'm trying to calibrate a zone, and I have a number of false alarms now along with appropriate alarms to look at stats from. The 'max score' is showing between 1 and 10 for false alarms, and appropriate alarms are all over 100 or so. But I don't know how that actually applies to the zone parameters for alarm min and max, filter, blob, etc. Is there any way to see what the actually alarm min/max are for a frame or video, etc?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: How to understand stats from an alarm?

Post by knight-of-ni »

Since no one else responded, I'll give you some information to chew on.

The basic idea behind motion detection is a sum of the number of pixels that have changed their RGB color value from one frame to the next.
In ZoneMinder, the RGB threshold (the difference) between the color values is called minimum pixel threshold. That number is usually a number between 20-25.

The next fields to know about are the minimum alarmed/filtered/blob areas. By default, the units in these fields are in percent, so if I put a 5 in the minimum alarmed pixels (again these are pixels zm noticed the RGB color difference changed) that means ZoneMinder will trigger a motion alarm if the number of pixels counted is > 5%. The Filtered and Blob fields work the same, only we've tried to make an attempt to filter out unwanted events or noise and then we count pixels again.

So now we have arrived at your question. If you get an alarm, and the stats say a particular frame has a score of 10, that means 10% of the pixels in the camera's field of view changed their RGB color value enough to cause ZoneMinder to count them as "motion". In your event stats, this value is going to match the percent value found in either alarm, filtered, or blob pixels depending on which of three options you have enabled. The logic goes something like this:

if ( blobs enabled ) {
score = % blob pixels
} else if ( filtered enabled ) {
score = % filtered pixels
} else if ( alarmed enaled ) {
score = % alarmed pixels
}

When you are configuring a camera's motion zone for the first time, here are some general rules to follow:
  • The presets work ok for indoor fields of view, but don't expect them to work outside with a wide field of view
  • change your units from percent to pixels for greater precision. Highly recommended for outdoor cameras.
  • Begin with a zone that is highly sensitive so it picks up unwanted events. Then tune the zone to become less sensitive. Going the other way (less sensitive -> more sensitive) is more difficult because zoneminder does not record stats for non-alarmed events.
  • Start off simple! Start off with *one* active zone (and no other zone types), test it, then make small changes. Tuning your zones is a process of days/weeks. Make a change then observe how it works through changing light/weather conditions.

This is explained further in our documentation:
https://wiki.zoneminder.com/Defining_Zones
https://wiki.zoneminder.com/How_to_setu ... _detection
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
maxiedaniels
Posts: 23
Joined: Sat Mar 10, 2018 1:34 am

Re: How to understand stats from an alarm?

Post by maxiedaniels »

Thank you for the detailed response! One question - many of the scores on my events are over 100, often around 170. What does that mean? Is that due to hitting multiple zones? (170%?)
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: How to understand stats from an alarm?

Post by knight-of-ni »

Good question. That does sound abnormal. I'd have to see a how you've got your zones configured.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked