Nodes/comfyui_cv/CV Points To Contour
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.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Points To Contour
  • points
  • contours
  • count
Categoryimage/CV/contours

Inputs (1)

NameTypeDefaultDescription
pointsNPARRAY(N,2), (N,1,2) or (1,N,2) point array, any numeric dtype (subpixel coordinates are rounded).

Outputs (2)

NameTypeDescription
contoursCV_CONTOURSA 1-contour set (empty when the input is None/empty).
countINTHow many points the contour holds.