Nodes/comfyui_cv/CV To Blob
ComfyUI Node

CV To Blob

Converts an HWC float32 image array into a 4-D NCHW (1, C, H, W) DNN blob using cv2.dnn.blobFromImage. Unlike the DNN Blob From Image node, this accepts float32 arrays directly (no uint8 cast), so it works on pre-normalized data (e.g. after ImageNet normalization). Can also resize to a target size.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV To Blob
  • nparray
  • blob
scale1.00
target_width0
target_height0
Categoryimage/CV/low-level

Inputs (4)

NameTypeDefaultDescription
nparrayNPARRAYHWC float32 array (H, W, C).
scaleFLOAT1.00Multiplier applied to each pixel. Use 1.0 for already-scaled or normalized data.
target_widthINT0Target width in pixels. 0 = keep input size.
target_heightINT0Target height in pixels. 0 = keep input size.

Outputs (1)

NameTypeDescription
blobNPARRAY4-D float32 blob shaped (1, C, H, W) ready for cv2.dnn.Net.setInput().