ComfyUI Node
CV Points To Contour
Bridges a plain NPARRAY point array back to the CV_CONTOURS type, so a cv2-computed polygon (a cv2.convexHull hull, a cv2.intersectConvexConvex intersection, 'CV Points' corners...) can feed the contour nodes - most usefully 'CV Draw Contours' to render it. Coordinates are rounded to the int32 grid contours live on. The inverse bridge is 'CV Contour To Points'. None/empty input yields an empty set (count = 0), not an error.
CV Points To Contour
- points
- contours
- count
Categoryimage/CV/contours
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| points | NPARRAY | (N,2), (N,1,2) or (1,N,2) point array, any numeric dtype (subpixel coordinates are rounded). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| contours | CV_CONTOURS | A 1-contour set (empty when the input is None/empty). |
| count | INT | How many points the contour holds. |