Draw Polygon Zones and Lines
Draw a polygon zone or line on an image online and get its polygon coordinates. The Roboflow Workflow editor replaces the PolygonZone tool.
Draw a polygon zone or line on an image in the Roboflow Workflow editor, and get its polygon coordinates as a list of [x, y] points. Blocks use these zones to count objects that cross a line or time how long people stay in an area. The editor replaces the standalone PolygonZone tool (polygonzone.roboflow.com): you draw a polygon online, on a frame from your camera or video, and the editor fills in the polygon points for you.
Blocks That Use Polygon Zones
Draw a Polygon Zone
Add one of the blocks above to your Workflow and select it.
Under the line or zone field, click "Set Line" (for lines and paths) or "Set Polygon Zone" (for polygons).

Upload a frame from your camera or video, or drag one onto the canvas. You can also upload a video file, and the editor uses its first frame. If you don't have a frame, pick a canvas size (ex: HD, Full HD) and draw on a blank canvas.
Click on the image to place points:
Line with 2 points: click the start and end. The line finishes on the second click.
Path: click each point, then press Enter or click the last point again to finish.
Polygon: click each corner, then click the first point or press Enter to close the shape.
Drag any point to adjust it, then click "Save".

Copy Polygon Coordinates
After you save, the field holds the shape as a list of [x, y] pixel coordinates (ex: [[84,408],[777,408]] for a line). Click the copy icon next to the field to copy the polygon coordinates for use in code or another Workflow.

Editor Controls
Snap the next segment to 45 degree angles
Hold Shift
Finish the shape
Enter
Cancel an unfinished shape
Esc
Undo
Ctrl/Cmd + Z, or "Undo"
Redo
Ctrl/Cmd + Shift + Z, or "Redo"
Remove the shape
"Clear All"
Draw on a different image
"New Image"
The editor keeps your image while you build the Workflow, so you can draw shapes for several blocks on the same frame.
Last updated
Was this helpful?