ComfyUI Node
cv2.distanceTransformWithLabels
Raw wrapper of cv2.distanceTransformWithLabels(src, distanceType, maskSize, labelType?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.distanceTransformWithLabels
- src
- dist
- labels
◄distanceTypeDIST_L2►
◄maskSize0►
◄labelTypeDIST_LABEL_CCOMP►
Categoryimage/CV/low-level/cv2 D
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY,IMAGE,MASK | - - - 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. | |
| distanceType | COMBO | DIST_L2 | - - - |
| maskSize | INT | 0-2147483648–2147483647 | - - - |
| labelTypeopt | COMBO | DIST_LABEL_CCOMP | - - - |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| dist | NPARRAY | — |
| labels | NPARRAY | — |