ComfyUI Node
CV Contour To Points
Bridges the CV_CONTOURS type to a plain NPARRAY point array so ONE contour can feed the raw cv2 geometry wrappers (cv2.convexHull, cv2.convexityDefects, cv2.intersectConvexConvex, cv2.pointPolygonTest, cv2.fitEllipse, cv2.contourArea...) or the point-set nodes. The inverse bridge is 'CV Points To Contour'. Failure-tolerant: an index past the end yields found=false and an empty (0,1,2) array instead of an error.
CV Contour To Points
- contours
- points
- count
- found
◄index0►
◄dtypeint32 (native contour)►
Categoryimage/CV/contours
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| contours | CV_CONTOURS | From 'CV Find Contours'. | |
| index | INT | 00–100000 | Which contour of the set to convert (Find Contours sorts by area, largest first - 0 = biggest). |
| dtype | COMBO | int32 (native contour) | Element type. Keep int32 for cv2.convexityDefects (it requires the ORIGINAL integer contour); float32 for subpixel geometry (cv2.intersectConvexConvex). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| points | NPARRAY | (N,1,2) point array - the layout every cv2 geometry function and draw node expects. |
| count | INT | — |
| found | BOOLEAN | — |