Manufacturing & Industrial Vision// definition

Drawing a restricted zone on a camera view: what the polygon means

In short

A restricted zone is not a shape you draw. It is a polygon in image coordinates, a rule about which point of a person counts as inside, a dwell condition, and a schedule for when the zone is live. The polygon corresponds to real floor area only if the system knows where the floor is, which is why zones drawn by eye alarm on people standing 3 m behind them.

Key takeaways

  • A zone is 4 things: a polygon, an entry rule, a dwell condition and an activation schedule. Only the 1st is drawn.
  • A polygon lives in image coordinates. It becomes floor area only through an assumption about the ground plane.
  • Foot point and box overlap are different zones. Overlap fires on a passing arm; foot point misses a leaning torso.
  • Walk the taped boundary, then walk 1 m outside it. The 2nd walk should produce nothing, and usually produces plenty.
  • Nudge a camera 2 degrees at 15 m and the projected boundary moves about 0.5 m. Zones do not survive re-mounting.

A restricted zone is a polygon plus 3 things nobody draws: a rule about which part of a person counts as being inside it, a dwell condition, and a schedule for when the zone is live at all. The polygon is drawn in image coordinates — pixels on a camera view — and describes floor only because the system assumes something about where the floor is. Get that assumption wrong and the zone is still a valid shape, just a shape over the wrong part of the plant.

This is why a zone drawn carefully by eye alarms on people who never crossed the line, and why the fix is almost never a better model.

Four parts, and only one of them is the polygon

PartWhat it decidesUsual mistake
PolygonWhich pixels, and by projection which floor, the rule coversDrawn to the painted line on the image rather than checked against the floor
Entry ruleWhich point of a detected person or vehicle counts as insideLeft at the vendor default, so the zone behaves differently than described
Dwell conditionHow long the condition holds before an event existsSet to zero, so every walk-through and every flicker of a box becomes an event
Activation schedule or stateWhen the zone is live — shift, hours, machine stateAlways-on, so maintenance work with the machine locked out alarms all weekend
What each part of a zone definition decides, and the mistake each one invites

Those 4 together are the rule. A record naming only the zone is under-specified, which is why a PPE violation is a record with an owner carries a rule version beside the zone id.

The floor is flat and the image is not

A camera flattens 3 dimensions into 2. To turn a pixel back into a location, the system assumes the thing it is looking at stands on the floor and that the floor is planar. Under that assumption a mapping between image and floor follows from 4 known points, and the polygon becomes a genuine area.

Without it, depth is guesswork. A worker 3 m beyond a taped boundary, seen from a camera at 4 m with a shallow tilt, has feet landing inside the drawn polygon: along the line of sight the image cannot separate beyond from inside. The alarm is right about the shape and wrong about the plant.

  1. Tape 4 measured points on the actual floor, forming a quadrilateral that spans the hazard rather than hugging it. Bay corners work; 4 points in a line do not.
  2. Capture a frame, mark those 4 points in it, derive the mapping, then draw the zone against the mapping rather than against what looks right.
  3. Walk the boundary. Someone follows the taped line while the system logs inside and outside, and the log is compared with where they were.
  4. Walk again 1 m outside the line at 3 or 4 points, including the point furthest from the camera. This walk should generate nothing.
  5. Re-run the check after any camera move, zoom change or re-mount, and after scaffolding or a new rack changes what the camera sees of the floor.

Which pixel decides that you are inside

  • Foot point. The bottom-centre of the box, nearest where the person stands. Right for people on a floor; it fails when feet are hidden by a pallet or a machine base.
  • Bounding-box overlap. Any intersection fires. Correct for machine guarding, where an arm entering the danger area is the hazard, and unusable beside a walkway.
  • Overlap fraction. Fires on some proportion of the box, and behaves differently for a crouching person than a standing one, because box shape follows posture.
  • Vehicle geometry. A forklift's box includes forks and load, so it overlaps a pedestrian zone before the wheels do. Vehicles need their own entry rule.

An entry-rule mismatch is a standard explanation for a flag nobody can justify, separated from the model-side causes in wearing a hard hat and still flagged. Write the rule in words and have safety approve it before it fires — the discipline behind the defect class list before any model training.

A zone that is only a zone while the press is running

Most restricted areas are not restricted all the time. The floor around a press is lethal while it cycles and a legitimate workplace during changeover. A zone ignoring that gets switched off for maintenance and never switched back on, or runs until its alarms are ignored — the drift in three hundred alerts a shift and nobody opens them.

  • Gate on machine state where a signal exists. A zone conditioned on the running state is honest about the hazard in a way a clock is not.
  • Otherwise gate on a schedule, versioned with the rule, so a change is recorded rather than absorbed.
  • Set dwell against the hazard: 1 to 2 seconds where entry is the hazard, 10 to 15 where crossing is part of the job.

A polygon on a camera image is a hypothesis about the floor. Until someone has walked the line, it is an untested one, and every alarm it raises inherits the error.

What the polygon cannot express

  • Height. The zone has no 3rd dimension, so a person on a mezzanine above the hazard is inside it as far as the geometry knows.
  • Direction. Crossing in and crossing out are the same overlap; where direction matters, an oriented line-crossing rule is a different primitive.
  • Precedence. 2 overlapping zones with different rules need a stated order, or the event carries whichever evaluated first.
  • Severity. Zone entry is a rule breach with a duration, not a near miss — a distinction drawn in what a camera may call a near miss.

None of this is exotic, but it makes the zone editor real product surface rather than a checkbox: it has to capture the mapping, the entry rule, the dwell and the schedule, and version all 4 — built properly in an MVP and product build, bolted on badly afterwards. The cluster sits under safety, PPE and site monitoring, part of our industrial vision practice.

Frequently asked questions

Short answers to the follow-ups this page tends to raise.

How are restricted zones configured in a video analytics system?

By drawing a polygon on a camera image and attaching 3 rules: which point of a detected object counts as inside, how long that must hold before an event exists, and when the zone is live. Drawing is the quick part. Accuracy comes from the mapping between image and floor, derived from 4 known floor points rather than from judgement.

Should a zone trigger on the whole bounding box or just the feet?

Feet for people-on-a-floor rules, whole box for machine guarding. The foot point matches where the person stands, so it behaves near boundaries, but fails when feet are occluded. Box overlap fires as soon as any part of the detection enters: right around a moving hazard, intolerable where people legitimately pass.

Why does the system alarm on people who never entered the zone?

Because the polygon is in image coordinates and the person is in the plant. Along the line of sight, someone standing behind the boundary projects into the same pixels as someone inside it, so the rule fires on a person 3 m away. Walking the line, then walking 1 m outside it, exposes the error in about 10 minutes.

Can a restricted zone be active only at certain times?

Yes, and most should be. Gate on machine state where a signal exists, on a schedule otherwise, so maintenance with the machine isolated does not alarm all weekend. Version the schedule with the rule, or a quiet change will move every count already reported.

  • restricted zones
  • camera geometry
  • machine guarding
  • video analytics
// shipped work

The work behind this page

Builds from our portfolio that this page draws on.

Working on something in this space?

Tell us where you are in a sentence or two. We'll tell you honestly whether we're the right team, and what a sensible first slice of the work looks like.

Start the conversation