ComfyUI Node
cv2.Canny (1/2)
Raw wrapper of cv2.Canny(image, threshold1, threshold2, apertureSize?, L2gradient?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.Canny (1/2)
- image
- result
◄threshold10.0000►
◄threshold20.0000►
◄apertureSize3►
◄L2gradientfalse►
Categoryimage/CV/low-level/cv2 C
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMFY_MATCHTYPE_V3 | 8-bit input image. The image output(s) echo 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. | |
| threshold1 | FLOAT | 0.0000-1e+38–1e+38 | first threshold for the hysteresis procedure. |
| threshold2 | FLOAT | 0.0000-1e+38–1e+38 | second threshold for the hysteresis procedure. |
| apertureSizeopt | INT | 3-2147483648–2147483647 | aperture size for the Sobel operator. Preset to the OpenCV default (3). |
| L2gradientopt | BOOLEAN | false | a flag, indicating whether a more accurate $L_2$ norm $=\sqrt{(dI/dx)^2 + (dI/dy)^2}$ should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the default $L_1$ norm $=|dI/dx|+|dI/dy|$ is enough ( L2gradient=false ). Preset to the OpenCV default (False). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | COMFY_MATCHTYPE_V3 | Echoes the 'image' input's format: an IMAGE link comes back as IMAGE, MASK as MASK, NPARRAY stays NPARRAY. |