What is a detection zone editor?
A detection zone editor is a spatial configuration tool for computer vision systems. Before deploying an object detector, line-crossing counter, or occupancy monitor, you need to tell it where to look. That spatial configuration — detection zones, exclusion areas, tripwires, coverage boundaries — is what a zone editor produces.
Most annotation tools are optimised for training data: labelling thousands of images so a model can learn. Zone definition is different. You're configuring a deployed system, not training one. You typically work with a handful of reference frames and need to draw a small number of precisely positioned regions.
Zone types and when to use each
Detection zones (polygons or rectangles) — Areas where the system should actively detect objects. Draw these wherever you want detections to count. Everything outside a detection zone is implicitly excluded from reporting, though the model may still run on the full frame depending on your implementation.
Exclusion zones (polygons, usually dashed) — Areas to explicitly filter out. Common examples: a window showing the street behind the monitored area (removes traffic false positives), an air conditioning unit that triggers motion detection, a maintenance worker area.
Tripwires (polylines) — Open paths used for line-crossing detection. When an object's centroid or bounding box edge crosses the line, your system triggers an event. Two closely spaced parallel tripwires enable in/out direction detection.
Coverage boundaries — Closed polygons that document the actual field of view of a camera. Used in planning documents, site surveys, and audit trails.
Working with layers
RegionKit's layer system is what makes complex zone configurations manageable. Create named layers — one per zone type — and assign each region to the appropriate layer.
Benefits:
- Toggle visibility per layer to focus on one zone type at a time
- Lock a layer to prevent accidental edits while working on another
- Export the full scene and filter by layer in your pipeline code
- The visual separation makes it immediately clear what each region represents
A typical multi-layer setup: Detection (indigo), Exclusion (red, dashed), Tripwires (green), Coverage (blue, low opacity).
Exporting for your pipeline
The native JSON export gives you everything: polygon coordinates in image pixels, layer assignments, labels, tags, and style metadata. Each polygon annotation's data.points field is a flat array of alternating x/y values: [x0, y0, x1, y1, …].
Filter by label in your inference code to apply each zone type appropriately — detect within detection zones, suppress within exclusion zones, count crossings of tripwire lines.
See the OpenCV detection zones guide for a complete Python implementation.