Nodes/comfyui_cv/cv2.cvtColor
ComfyUI Node

cv2.cvtColor

Raw wrapper of cv2.cvtColor(src, code, dstCn?, hint?). 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.cvtColor
  • src
  • nparray
codeCOLOR_BGR2GRAY
dstCn0
hintALGO_HINT_DEFAULT
Categoryimage/CV/low-level/cv2 C

Inputs (4)

NameTypeDefaultDescription
srcNPARRAY,IMAGE,MASKinput image: 8-bit unsigned, 16-bit unsigned ( CV_16UC... ), or single-precision floating-point. 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.
codeCOMBOCOLOR_BGR2GRAYcolor space conversion code (see #ColorConversionCodes).
dstCnoptINT0-2147483648–2147483647number of channels in the destination image; if the parameter is 0, the number of the channels is derived automatically from src and code. Preset to the OpenCV default (0).
hintoptCOMBOALGO_HINT_DEFAULTImplementation modification flags. See #AlgorithmHint

Outputs (1)

NameTypeDescription
nparrayNPARRAY