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
| Command | Description |
| Get Count | Writes the current in, out, and net counts to variables. |
| Reset Count | Resets all counts to 0. |
Settings
| Setting | Description |
| Counting Line | Drawn 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
| Field | Type | Value |
| In Count | Number | Cumulative crossings in the IN direction. |
| Out Count | Number | Cumulative crossings in the OUT direction. |
| Net Count | Number | Current occupancy, In Count minus Out Count. |
| JSON Result | Text | A 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 }
]
}