ComfyUI Node
CV Fill Holes
Fills interior holes of a binary mask - background pixels fully enclosed by foreground become foreground (flood-fill from the border, then OR the unreachable interior back in). Turns a ring into a solid disk, or a motion mask with gaps over an object's low-texture regions into a solid blob - essential before eroding it into a GrabCut seed, so the seed does not punch holes in the object. Objects touching the image edge are handled (the mask is padded before the flood) and an empty mask stays empty.
CV Fill Holes
- image
- mask
Categoryimage/CV/contours
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMFY_MATCHTYPE_V3 | Binary 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. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | COMFY_MATCHTYPE_V3 | 0/255 mask with interior holes filled, in the image input's format. |