ComfyUI Node
cv2.moments
Raw wrapper of cv2.moments(array, binaryImage?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.moments
- array
- moments
◄binaryImagefalse►
Categoryimage/CV/low-level/cv2 M
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| array | 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. | |
| binaryImageopt | BOOLEAN | false | - - - Preset to the OpenCV default (False). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| moments | CV_MOMENTS | - - - The 24 NAMED image moments (m00 ... nu03) - wire straight into cv2.HuMoments. cv2 reads them by name, so this stays a moments value rather than a list of numbers. |