ComfyUI Node
cv2.spatialGradient
Raw wrapper of cv2.spatialGradient(src, ksize?, borderType?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.spatialGradient
- src
- dx
- dy
◄ksize3►
◄borderTypeBORDER_DEFAULT►
Categoryimage/CV/low-level/cv2 S
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY,IMAGE,MASK | input image. 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. | |
| ksizeopt | INT | 3-2147483648–2147483647 | size of Sobel kernel. It must be 3. Preset to the OpenCV default (3). |
| borderTypeopt | COMBO | BORDER_DEFAULT | pixel extrapolation method, see #BorderTypes. Only #BORDER_DEFAULT=#BORDER_REFLECT_101 and #BORDER_REPLICATE are supported. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| dx | NPARRAY | — |
| dy | NPARRAY | — |