What is a polygon ROI editor?
A polygon ROI (region of interest) editor is a tool for drawing closed polygon shapes on top of an image and exporting their vertex coordinates. In computer vision workflows, polygons are the most precise way to define irregular zones — a doorway, a stairwell, a conveyor section — that a rectangle cannot capture accurately.
RegionKit is a browser-based polygon editor built specifically for this task. You draw polygons on a reference frame (a camera still, a floor plan, a satellite image), assign labels, and export the coordinates in JSON, COCO, or YOLO format.
Why polygons for ROI definition?
Rectangles miss corners. A camera watching an L-shaped corridor needs two rectangles or one polygon. A polygon covers it in a single shape without false positives from the area that shouldn't be covered.
Bounding boxes accumulate area. The tighter your zone fits the real geometry, the fewer false detections you'll get from objects that are technically inside the bounding box but outside the meaningful area.
Polygon coordinates export directly. Most CV frameworks — OpenCV, YOLO, Detectron2, supervision — accept polygon zone configurations as lists of (x, y) points. RegionKit's native JSON export gives you exactly that structure.
Polygon drawing in RegionKit
Click-to-place vertices. Press P or click the polygon icon. Each click adds a vertex. The polygon closes when you click the first vertex again, double-click, or press Enter. No drag-to-draw friction — each vertex lands exactly where you click.
Edge midpoint insertion. Select a completed polygon and drag any midpoint handle (the smaller circles between vertices) to add a new vertex without redrawing the whole shape.
Vertex removal. Hold Alt and click any vertex handle to remove it. If removing the vertex would leave fewer than three vertices, the entire annotation is deleted instead.
Shared vertices. When two polygons share a boundary edge, you can link their shared vertices so they stay consistent. Drag one vertex and both polygons update — essential for floor plans where rooms share walls.
Exporting polygon coordinates
After drawing your regions, click Export and choose:
- Native JSON — full scene with polygon point arrays, layer assignments, labels, tags, and metadata. The
pointsfield is a flat[x0, y0, x1, y1, …]array in image pixels. - COCO JSON —
segmentationarrays in COCO instance segmentation format, includingbbox,area, and category mapping. - YOLO TXT — normalised polygon coordinates in one text file per image.
All coordinate values are in image pixels (not screen pixels), so they remain valid across different zoom levels and display sizes.
Use cases
- Detection zones — define where a person or object detector should run
- Exclusion areas — tell the system which regions to ignore
- Floor plan zones — annotate rooms, corridors, and functional areas
- Camera coverage boundaries — document the actual field of view
- Tripwire boundaries — use polylines for line-crossing detection