Line crossing — sometimes called a tripwire — is a behavioural rule that fires when a tracked object crosses a virtual line drawn on the scene, optionally only in a chosen direction. An operator draws the line across a doorway, a fence, or a lane in the VMS, sets which way matters, and the system alerts when a person or vehicle passes it. It is one of the most used analytics in security because it maps so directly to "don't go past here".

It is also one of the standardised analytics: the ONVIF Analytics specification defines a normative Line Detector, so a conformant camera and VMS can share the rule and its events rather than relying on a proprietary integration. Because it acts on tracks rather than raw motion, and can be limited to a direction and an object class, a well-placed line generates far fewer false alarms than blanket motion detection — alerting on "a person crossed outward" instead of "pixels changed".

The pitfalls are geometric and contextual. Perspective matters: a line that looks right on screen may sit at the wrong depth in the real scene, so objects trip it early or late; placement near where people loiter or where two paths merge invites false or missed crossings; and direction logic must match the real geometry or it will alert on the wrong way. Combine line crossing with object classification and sensible placement, and tune it against the cost of a miss — it reduces false alarms but never eliminates them.