Raspberry Pi Camera Counter | Track Each Object Once
Counting every detection in every video frame can count the same object dozens of times. A camera counter can track objects and count a defined crossing event once per track.
The key idea
Assign detections across successive frames to the same track and record when its position crosses the counting line. Occlusion or an identity switch can break that association and change the total.
What to remember
- Define the counting line and direction.
- Remember which tracks have already produced a crossing event.
Check your understanding
Why does frame-by-frame detection produce an inflated count?
Show the explanation
A single moving object remains visible and can be detected in many frames.