Nodes/comfyui_cv/cv2.demosaicing
ComfyUI Node

cv2.demosaicing

Raw wrapper of cv2.demosaicing(src, code, dstCn?). 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.demosaicing
  • src
  • result
codeCOLOR_BayerRGGB2RGB
dstCn0
Categoryimage/CV/low-level/cv2 D

Inputs (3)

NameTypeDefaultDescription
srcCOMFY_MATCHTYPE_V3input image: 8-bit unsigned or 16-bit unsigned. 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.
codeCOMBOCOLOR_BayerRGGB2RGBColor space conversion code (see the description below).
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. The function can do the following transformations: - Demosaicing using bilinear interpolation #COLOR_BayerBG2BGR , #COLOR_BayerGB2BGR , #COLOR_BayerRG2BGR , #COLOR_BayerGR2BGR #COLOR_BayerBG2GRAY , #COLOR_BayerGB2GRAY , #COLOR_BayerRG2GRAY , #COLOR_BayerGR2GRAY - Demosaicing using Variable Number of Gradients. #COLOR_BayerBG2BGR_VNG , #COLOR_BayerGB2BGR_VNG , #COLOR_BayerRG2BGR_VNG , #COLOR_BayerGR2BGR_VNG - Edge-Aware Demosaicing. #COLOR_BayerBG2BGR_EA , #COLOR_BayerGB2BGR_EA , #COLOR_BayerRG2BGR_EA , #COLOR_BayerGR2BGR_EA - Demosaicing with alpha channel #COLOR_BayerBG2BGRA , #COLOR_BayerGB2BGRA , #COLOR_BayerRG2BGRA , #COLOR_BayerGR2BGRA Preset to the OpenCV default (0).

Outputs (1)

NameTypeDescription
resultCOMFY_MATCHTYPE_V3Echoes the 'src' input's format: an IMAGE link comes back as IMAGE, MASK as MASK, NPARRAY stays NPARRAY.