ComfyUI Node
CV Batch → Image Batch
Converts a batched NPARRAY ([B,H,W,C] or [B,H,W]) back to a ComfyUI IMAGE batch. The inverse of 'Image Batch → CV Batch'. For BGR uint8 input (the standard cv2 path) the default settings work directly. 'RGB' keeps the channel order for data that is already RGB-ordered; both BGR and RGB round-trip through uint8. 'RAW' converts nothing and passes values as-is (for HDR or out-of-range data). 4-channel BGRA input yields an IMAGE batch plus an alpha MASK batch. A single [H,W] mask is wrapped to a one-frame batch; a 3-D [H,W,C] single frame is read as a [B,H,W] gray batch — use 'CV Array → Image' for single color frames.
CV Batch → Image Batch
- nparray
- image
- alpha
◄channel_orderBGR (OpenCV default)►
Categoryimage/CV/low-level
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| nparray | NPARRAY | Batched ndarray: [B,H,W,C] or [B,H,W]. A single [H,W] mask is wrapped to a one-frame batch; a 3-D [H,W,C] single frame is read as a [B,H,W] gray batch — use 'CV Array → Image' for single color frames. | |
| channel_order | COMBO | BGR (OpenCV default) | How to interpret 3/4-channel data. BGR: standard cv2→IMAGE conversion (BGR→RGB, uint8→float32 0..1). RGB: skip channel swap, clamp to 0..1 — for float32 BGR from cv2 arithmetic where values stay in range. RAW: no conversion at all, values as-is — for HDR or arithmetic results outside 0..1. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | IMAGE batch [B,H,W,C] float32 RGB 0..1 (RAW mode may exceed 0..1). |
| alpha | MASK | Alpha MASK batch from BGRA input (all-255 opaque when input is RGB/BGR). |