ComfyUI Node
CV Tuple
Authors one composite cv2 value - a Size (width, height), a Point (x, y), a 3-D point, a Rect - from typed number widgets, and emits it as ONE wire. Wire 'tuple' into any cv2 node's composite input (dsize, ksize, center, patternSize, winSize, ...): both components travel together, so a half-connected size is impossible. One instance can drive many nodes. 'array' is the same numbers as an NPARRAY vector, and 'literal' is the '(a, b)' string the few params that are still free-text literals take (and what a subgraph boundary can carry). This is also the way to set a composite input on a SUBGRAPH instance: a promoted input is a bare socket with no widget behind it.
CV Tuple
- a
- b
- c
- d
- tuple
- array
- literal
◄count2►
◄dtypeint►
Categoryimage/CV/low-level
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| count | INT | 22–4 | How many components to emit: 2 for a Size / 2-D point, 3 for a 3-D point or an iteration-stop tuple, 4 for a Rect / Scalar. |
| dtype | COMBO | int | Component type. 'int' for pixel sizes, kernel sizes and pixel coordinates (cv2 rejects a float Size); 'float' for subpixel coordinates and world units. |
| a | FLOAT,INT | 0-1e+38–1e+38 | First component - width / x. The socket takes an INT or a FLOAT link, so an image width and a subpixel coordinate both wire in directly. |
| b | FLOAT,INT | 0-1e+38–1e+38 | Second component - height / y. Takes an INT or a FLOAT link. |
| copt | FLOAT,INT | 0-1e+38–1e+38 | Third component (used when count >= 3) - z / width. |
| dopt | FLOAT,INT | 0-1e+38–1e+38 | Fourth component (used when count = 4) - height. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| tuple | CV_TUPLE | The whole composite as one value - wire it into a cv2 node's composite input. |
| array | NPARRAY | The same components as a 1-D NPARRAY vector, for the sockets that take an array (cv2.inRange bounds, arithmetic operands). |
| literal | STRING | The '(a, b)' literal string, for the composite params that are still free-text (Scalar, RotatedRect, Moments) and for STRING subgraph boundaries. |