Nodes/comfyui_cv/CV Filter Contours
ComfyUI Node

CV Filter Contours

Keeps the contours whose measured property lies in [min_value, max_value] - 'round things' (circularity close to 1), 'wide things' (aspect ratio), 'solid blobs vs. squiggles' (solidity)... Chain several to combine criteria. The 'values' output holds the property of each KEPT contour, aligned with the output set - to tune the range, widen it and read the values with 'Inspect CV Data'. Zero matches is a valid result (count = 0), not an error.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Filter Contours
  • contours
  • contours
  • count
  • values
propertyarea (px^2)
min_value0.00
max_value1000000000.00
Categoryimage/CV/contours

Inputs (4)

NameTypeDefaultDescription
contoursCV_CONTOURSFrom 'CV Find Contours'.
propertyCOMBOarea (px^2)What to measure on each contour. Circularity, extent and solidity are scale-free ratios in 0-1; area/perimeter are in pixels.
min_valueFLOAT0.00-1000000000–1000000000Smallest accepted property value (inclusive).
max_valueFLOAT1000000000.00-1000000000–1000000000Largest accepted property value (inclusive).

Outputs (3)

NameTypeDescription
contoursCV_CONTOURSThe kept contours, in the incoming order.
countINT
valuesNPARRAYfloat32 property value per kept contour (aligned with the contour output).