Manual point input: run the workflow once to load the image into the node, then LEFT-CLICK the preview to add a point (drag to move it), SHIFT+CLICK to remove the nearest one. Once the outline is closed (3 or more points) a click is INSERTED into the nearest edge - the highlighted one - so a shape can be refined where it is wrong instead of in click order; ALT+CLICK appends at the end instead. The points are stored normalized (0-1 of the image size) in the 'points' field - editable by hand too - and come out in pixel coordinates, in ring order. The mask output fills the polygon the points enclose (3 or more, any count). Pair with 'CV Quad Warp' (4 corners), 'CV Select Component At Point' (a seed), 'OpenCV Draw Points', ... Zero points is a valid output (count = 0).
By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Annotate Points
image
points
count
mask
◄points[]►
Categoryimage/CV/points
Inputs (2)
Name
Type
Default
Description
image
NPARRAY,IMAGE
The image to annotate; it is shown inside the node after the first run. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
points
STRING
[]
Normalized [[x, y], ...] JSON, 0-1 of the image size. Maintained by clicking the preview below; hand-editing works as well.
Outputs (3)
Name
Type
Description
points
NPARRAY
Nx1x2 float32 PIXEL coordinates, in click order.
count
INT
—
mask
NPARRAY
uint8 image-sized mask, 255 inside the polygon the points enclose (click order, any count >= 3; fewer points -> all zeros).