Line Crossing Best Practices
Accurate Line Crossing Setup
- Do not rely on the visible box alone
Line crossing is triggered by the bottom-center point of the detection box (person or vehicle). When drawing lines, position the lower part of the line closer to the bottom of the frame so it consistently intersects with that point on the bounding box, ensuring accurate event detection.
Example: The bottom center of the person detection box crosses the line drawn across where traffic enters and exits.

- Avoid placing lines too close to frame edges
Position lines with enough space inside the scene. Placing them at the very edge can result in objects being detected as already past the line.
- Do not place lines directly in doorways or tight entry points
This can cause detection boxes to appear beyond the line too quickly, leading to missed or inaccurate events.
- Ensure proper camera angle and positioning
Cameras should be angled to clearly capture movement across the line, not directly facing traffic head-on.
- Minimize object overlap (stacking)
Avoid views where people or objects stack on top of each other (e.g., straight-on entrance views), as this reduces tracking accuracy.
- Optimize field of view for tracking movement
Position the camera so motion occurs across the frame rather than directly toward or away from it for better line-cross detection.
CAUTION: The person detection boxes stack when the camera views an exit straight on with traffic moving directly away.

Keep in Mind
- Line crossing accuracy depends heavily on how detection zones and camera perspectives are configured.
- Small adjustments to placement and angle can significantly improve detection reliability.
