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.
CV To Blob
- nparray
- blob
◄scale1.00►
◄target_width0►
◄target_height0►
Categoryimage/CV/low-level
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| nparray | NPARRAY | HWC float32 array (H, W, C). | |
| scale | FLOAT | 1.00 | Multiplier applied to each pixel. Use 1.0 for already-scaled or normalized data. |
| target_width | INT | 0 | Target width in pixels. 0 = keep input size. |
| target_height | INT | 0 | Target height in pixels. 0 = keep input size. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| blob | NPARRAY | 4-D float32 blob shaped (1, C, H, W) ready for cv2.dnn.Net.setInput(). |