Three rules that get called the same thing
"Intrusion detection" covers at least three distinct rules, and choosing the wrong one is a common cause of a system nobody trusts.
- Line crossing (tripwire) — fires when a track crosses a drawn line, usually with a direction. It is an instantaneous rule: one moment decides it.
- Zone presence — fires when a subject is inside a region at all. Useful for spaces nobody should ever enter.
- Zone dwell — fires when a subject has been inside a region for longer than a threshold. This is the rule most real sites actually want, and the one most often skipped because it is slightly harder to implement.
The distinction matters because the failure modes differ. A tripwire has one chance to be right. A dwell rule accumulates evidence, which means noise has to persist coherently for seconds to fool it — and noise almost never does.
Why line-crossing alone over-fires
A tripwire evaluated on motion rather than on a confirmed person will fire on everything that moves across it, which at three in the morning includes a great deal:
- Headlights and the sweeping shadows they throw on a wall.
- Rain and snow lit by the camera's own infrared illuminator.
- Insects and spiders, which sit close to the lens and are therefore enormous in frame.
- Vegetation moving in wind, and the shadow of vegetation moving in wind.
- A person who stops on the line — producing a burst of crossings as the track wobbles.
The fix is not a higher threshold. Raising sensitivity thresholds suppresses genuine intruders at distance along with the noise, which is the worst of both outcomes. The fix is confirmation: require that the thing crossing the line be verified as a person, and that the track exist coherently before and after the crossing. See Reducing False Alarms for the general form of that argument.
Where to actually draw the boundary
The instinct is to trace the legal boundary — the fence, the property line, the doorway. In practice that is usually the worst place to put the rule.
- Subjects are smallest at the boundary. A fence is typically the far edge of the camera's useful range, where a person occupies the fewest pixels and detection is least reliable.
- Boundaries attract loitering. People stand at fences, gates and doors. A track that hovers on the line oscillates across it and generates repeat alerts.
- Intent is clearer a few metres in. A rule drawn slightly inside the boundary catches someone who has committed to entering, is fully visible, and is far harder to argue with when the clip is reviewed later.
The same logic applies vertically. Rules drawn across the top of the frame — the horizon, a distant road — get evaluated on subjects rendered a few pixels tall. If a person is not resolvable there, no rule placed there can work, and drawing one anyway simply converts a camera limitation into a nightly alert. Camera Placement for Perception covers the geometry side of this in more detail.
Perimeter rules are site policy, not code
Zones, thresholds and schedules change constantly in a live deployment — a new store opens, a gate is relocated, a festival changes which areas are public for three days. If changing a dwell threshold from ten seconds to forty requires a developer, the thresholds will not get tuned, and an untuned perimeter is an ignored perimeter.
Treating rules as configuration rather than code has a second benefit: the rule set becomes reviewable. Someone can read what the system is actually watching for, which is exactly the question an auditor, an insurer or a nervous committee will eventually ask.
Schedules matter as much as geometry
Most perimeter rules are only meaningful at certain times. A loading bay that is busy all day and forbidden after eight in the evening needs the same zone with different behaviour, not two different systems. Time-of-day scheduling removes far more false alarms than any detection tuning, because it removes the legitimate activity that was never an alert in the first place.
Beware the opposite failure: a schedule so aggressive that the system is effectively off during the hours an incident is most likely. Schedules should be written down and reviewed, not inherited from whoever configured the system originally.
A practical design sequence
- Decide what you would actually act on. If nobody would respond to an alert, do not create the rule.
- Choose the rule type by intent: crossing for direction, presence for forbidden space, dwell for everything else.
- Draw the zone where a person is fully resolvable, not where the boundary legally sits.
- Require person confirmation before the rule is allowed to fire.
- Set a dwell threshold that excludes ordinary transit through the space.
- Add a schedule, and write down why those hours were chosen.
- Review a week of real alerts with the people who receive them — not with the person who configured it.
Where ManasaView fits
ManasaView builds its rules on presence and dwell rather than on raw pixel change: a rule evaluates a person whose presence has been confirmed and sustained, so a swaying shadow never accumulates dwell time and a stationary person does. Rules are configuration rather than code, and every alert carries a clip, so the people receiving alerts can judge a boundary decision for themselves instead of trusting a label. See it on your own cameras.
Frequently asked questions
What is the difference between a tripwire and a zone?
A tripwire fires on a single event — a track crossing a line in a particular direction. A zone is a region a subject can be inside for a length of time, which allows rules based on duration rather than on one instant. Tripwires answer whether something crossed; zones answer whether someone is inside, and for how long.
Why does my perimeter detection fire all night with nothing there?
Usually because the rule is evaluated on pixel change rather than on a confirmed person. Headlights sweeping a wall, rain lit by the infrared illuminator, moving shadows, insects near the lens and swaying vegetation all cross a line. Requiring that the crossing object be confirmed as a person, and that the track be sustained over several seconds, removes most of it.
Should the detection line sit on the fence itself?
Usually not. A line drawn exactly on a boundary catches subjects at their smallest and most occluded, and anything that loiters near the fence will oscillate across it. Placing the rule a little inside the boundary, where a person is fully visible and clearly committed, produces far fewer ambiguous alerts.
How long should a dwell threshold be?
Long enough to exclude legitimate transit and short enough to catch intent. A few seconds suits a restricted doorway nobody should stop at; thirty seconds or more suits a public area where passing through is normal. The threshold is a site policy question, and it should be tunable without changing code.
Do I need a separate camera for perimeter detection?
Not necessarily, but the camera has to resolve a person at the distance the rule is drawn. A wide overview camera that renders an intruder twenty pixels tall cannot support a reliable rule at the far end of its view, whatever the software claims. Match the rule to the part of the frame where the subject is genuinely resolvable.
← Back to Knowledge