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.
CV Select Contour
- contours
- contour
- found
◄index0►
Categoryimage/CV/contours
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| contours | CV_CONTOURS | From 'CV Find Contours'. | |
| index | INT | 00–100000 | Rank in the incoming order (Find Contours sorts by area, largest first - 0 = biggest). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| contour | CV_CONTOURS | A 1-contour set (empty if not found). |
| found | BOOLEAN | — |