Get Started
Line Crossing Counter
On this page
  1. Commands
  2. Settings
  3. Output Variables
  4. JSON Output

Line Crossing Counter

Automatically counts people entering and exiting across a virtual line drawn on the camera preview. Used for entrance footfall and store visitor counting.

Commands

CommandDescription
Get CountWrites the current in, out, and net counts to variables.
Reset CountResets all counts to 0.

Settings

SettingDescription
Counting LineDrawn by dragging on the camera preview. The arrow shown on the line is the IN (entry) direction; crossings in the opposite direction count as OUT (exit).
Confidence (%)10 to 100, default 50. Only people detected at or above this value are counted.

Output Variables

FieldTypeValue
In CountNumberCumulative crossings in the IN direction.
Out CountNumberCumulative crossings in the OUT direction.
Net CountNumberCurrent occupancy, In Count minus Out Count.
JSON ResultTextA JSON object with the three counts and the list of tracked people.

JSON Output

tracks holds, per tracked person, the track ID, class, center x and y, size w and h, crossing direction (in or out), and whether it has crossed.

{
  "in_count": 5,
  "out_count": 3,
  "current_count": 2,
  "tracks": [
    { "id": 1, "class": "person", "x": 320, "y": 240, "w": 80, "h": 200, "direction": "in", "crossed": true }
  ]
}