Nodes/comfyui_cv/CV Select Component At Point
ComfyUI Node

CV Select Component At Point

Keeps only the connected component(s) of a binary image that touch a given point (or a small disk around it) - 'the blob at this location'. E.g. the clock hands are the only dark blob connected to the dial center; numerals, ticks and the rim are separate components and disappear. Failure-tolerant: no foreground at the point yields found=false and an empty mask instead of an error.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Select Component At Point
  • image
  • mask
  • found
x0.00
y0.00
search_radius0.00
Categoryimage/CV/contours

Inputs (4)

NameTypeDefaultDescription
imageCOMFY_MATCHTYPE_V3Binary image (or MASK); non-zero = foreground. The mask comes back in this input's format. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
xFLOAT0.00-1000000–1000000X pixel coordinate of the probe point.
yFLOAT0.00-1000000–1000000Y pixel coordinate of the probe point.
search_radiusFLOAT0.000–1000000Also accept components that touch a disk of this radius around (x, y). 0 = the exact pixel only.

Outputs (2)

NameTypeDescription
maskCOMFY_MATCHTYPE_V30/255 mask of the selected component(s), in the image input's format.
foundBOOLEAN