Analytics rules
Add Zone intrusion, Line crossing, Loitering, and Overcrowding rules to a camera, limit them to object types and areas, and keep parts of the picture private.
Contents
Analytics is an add-on, enabled per camera. It finds people and vehicles in the camera's picture and raises an alarm when a rule matches. Rules are set by a tenant administrator in the camera's Detection tab.
Before you start
Analytics uses a dedicated secondary stream from the camera and never falls back to the main stream. Set up the camera's secondary stream first: the Optional secondary stream URL for an RTSP camera, or the secondary stream publisher for a push camera (see Connect a camera by RTMPS push). When the stream is missing, the Detection tab says what to change.
Bridge Agent cameras have no analytics yet: the agent relays only the main stream.
Add a rule
- Open the camera's Detection tab, Detection & alarms, and select Add rule.
- Enter a Rule name and choose the Trigger.
- Set the Minimum confidence, from 5% to 99%, 50% by default.
- Optionally, under Restrict to specific objects, tick the object types the rule counts.
- Draw the zone or line on the picture, then select Save rule.
Rule types
| Trigger | Matches when |
|---|---|
| Zone intrusion | An object enters the zone. |
| Line crossing | An object crosses the line in the Crossing direction you choose: A → B, B → A, or Both ways. |
| Loitering | One object stays in the zone for the Dwell time (seconds). |
| Overcrowding | At least the Minimum objects in zone are inside the zone. |
The object types are Person, Bicycle, Car, Motorcycle, Bus, and Truck.
When a rule matches
- Raise alarm turns the rule's alarm on or off.
- Severity is Info, Low, Medium, High, or Critical.
- Cooldown (seconds) is the minimum time between alarms from the same rule.
Alarms from rules carry video evidence where your package includes it; see Alarms and incidents. In Monitor, Detection boxes draws the objects found on live video.
Leave areas out
Two further rule types limit where detection counts objects:
- Ignore area leaves out the objects inside it.
- Region of interest limits detection to the objects inside it.
Either can apply to some object types only. Objects left out raise no alarm, draw no box in live view, are not stored for search, and do not trigger detection-based recording. Motion-based recording still reacts to movement there.
Privacy masks
An administrator can black out parts of a camera's picture, for example a neighbor's window, in the camera's Privacy tab: select Add mask, draw it, give it a Mask name, and select Save masks. A camera can have at most 8 masks.
The portal masks the camera's snapshots and the alarm snapshots taken after you save, and detection ignores objects inside a mask.
Live view, recordings, playback, alarm clips, and exports are not masked. To keep an area out of the video itself, set a privacy mask on the camera.
Search detected objects
Detected objects can be searched in Investigate; see Live view and playback.