Nodes/comfyui_cv/CV Array → Image
ComfyUI Node

CV Array → Image

Converts a raw OpenCV ndarray back to a ComfyUI IMAGE. Handles gray/BGR/BGRA inputs and uint8/uint16/float dtypes automatically. The alpha channel (if any) is also returned as a MASK. 'RAW' mode preserves float32 values as-is with no uint8 conversion or [0,1] clipping — for HDR radiance maps. RAW mode does NOT convert channels: the input must already be RGB-order (ComfyUI IMAGE format). Use a cv2.cvtColor node upstream for BGR→RGB conversion.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Array → Image
  • nparray
  • image
  • alpha
channel_orderBGR (OpenCV default)
Categoryimage/CV/low-level

Inputs (2)

NameTypeDefaultDescription
nparrayNPARRAYGray [H,W], BGR/RGB [H,W,3] or BGRA [H,W,4] ndarray (uint8/uint16/float). Use 'Inspect CV Data' if unsure.
channel_orderCOMBOBGR (OpenCV default)How to interpret 3/4-channel input data. 'RAW' skips uint8 conversion and does NOT convert channels — the input NPARRAY must already be RGB-order (ComfyUI IMAGE convention). Use a cv2.cvtColor upstream for BGR→RGB if needed. Use for HDR radiance and other float data where [0,1] would destroy information.

Outputs (2)

NameTypeDescription
imageIMAGE
alphaMASK