ComfyUI Node
cv2.dnn.blobFromImage
Raw wrapper of cv2.dnn.blobFromImage(image, scalefactor?, size?, mean?, swapRB?, crop?, ddepth?). Parameters marked '?' are optional; blank means OpenCV default. From the opencv-contrib 'dnn' module. See the OpenCV documentation for details.
cv2.dnn.blobFromImage
- image
- size
- nparray
◄scalefactor►
◄mean►
◄swapRB►
◄crop►
◄ddepthsame as input►
Categoryimage/CV/low-level/dnn
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY,IMAGE,MASK | - - - Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. | |
| scalefactoropt | STRING | - - - Optional - leave blank to use the OpenCV default. Accepts a Python literal, e.g. 3, 1.5, true, or (3, 3). | |
| sizeopt | CV_TUPLE | 0,0 | One value with 2 components (w, h) - it travels as a whole, so it cannot arrive half-connected. Wire it from 'CV Tuple' or type the components in place. |
| meanopt | STRING | - - - cv2 Scalar as a literal, e.g. "(0, 255, 0)" (BGR) or "(0, 255, 0, 64)" (BGRA). A bare number broadcasts to every component, so "255" means (255, 255, 255, 255). Components past the target's channel count are ignored by OpenCV. Leave blank for the OpenCV default. | |
| swapRBopt | STRING | - - - Optional - leave blank to use the OpenCV default. Accepts a Python literal, e.g. 3, 1.5, true, or (3, 3). | |
| cropopt | STRING | - - - Optional - leave blank to use the OpenCV default. Accepts a Python literal, e.g. 3, 1.5, true, or (3, 3). | |
| ddepthopt | COMBO | same as input | - - - |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |