Nodes/comfyui_cv/Image → CV Array
ComfyUI Node

Image → CV Array

Converts a ComfyUI IMAGE to a raw OpenCV ndarray (NPARRAY) for use with the low-level cv2.* nodes.

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

Inputs (4)

NameTypeDefaultDescription
imageIMAGEIMAGE to convert. Only one frame is taken (see batch_index) since raw cv2 nodes work on single images.
color_formatCOMBOBGR (OpenCV default)Most cv2 functions expect BGR; functions like Canny or threshold require a single-channel GRAY image.
dtypeCOMBOuint8 (0-255)Most cv2 functions expect uint8.
batch_indexINT00–4095Which image of the batch to convert (raw cv2 functions operate on single images). Clamped to the batch size.

Outputs (1)

NameTypeDescription
nparrayNPARRAY