Nodes/comfyui_cv/CV Select Contour
ComfyUI Node

CV Select Contour

Picks a single contour by rank from a contour set - 'the largest one', 'the third largest'. 'CV Find Contours' emits them sorted by area (largest first), so index 0 is the biggest blob. The output is still a CV_CONTOURS set (with one contour), ready for any other contour node, e.g. as the reference of 'CV Filter Contours By Shape'. Failure-tolerant: an index past the end yields found=false and an empty set instead of an error.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Select Contour
  • contours
  • contour
  • found
index0
Categoryimage/CV/contours

Inputs (2)

NameTypeDefaultDescription
contoursCV_CONTOURSFrom 'CV Find Contours'.
indexINT00–100000Rank in the incoming order (Find Contours sorts by area, largest first - 0 = biggest).

Outputs (2)

NameTypeDescription
contourCV_CONTOURSA 1-contour set (empty if not found).
foundBOOLEAN