Nodes/comfyui_cv/cv2.spatialGradient
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.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
cv2.spatialGradient
  • src
  • dx
  • dy
ksize3
borderTypeBORDER_DEFAULT
Categoryimage/CV/low-level/cv2 S

Inputs (3)

NameTypeDefaultDescription
srcNPARRAY,IMAGE,MASKinput 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.
ksizeoptINT3-2147483648–2147483647size of Sobel kernel. It must be 3. Preset to the OpenCV default (3).
borderTypeoptCOMBOBORDER_DEFAULTpixel extrapolation method, see #BorderTypes. Only #BORDER_DEFAULT=#BORDER_REFLECT_101 and #BORDER_REPLICATE are supported.

Outputs (2)

NameTypeDescription
dxNPARRAY
dyNPARRAY