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.
CV Array → Image
- nparray
- image
- alpha
◄channel_orderBGR (OpenCV default)►
Categoryimage/CV/low-level
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| nparray | NPARRAY | Gray [H,W], BGR/RGB [H,W,3] or BGRA [H,W,4] ndarray (uint8/uint16/float). Use 'Inspect CV Data' if unsure. | |
| channel_order | COMBO | BGR (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)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| alpha | MASK | — |