ComfyUI Node
cv2.meanShift
Raw wrapper of cv2.meanShift(probImage, window, criteria). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.meanShift
- probImage
- iterations
- window
◄window_x0►
◄window_y0►
◄window_w0►
◄window_h0►
◄criteria_typemax count or epsilon (whichever first)►
◄criteria_max_count30►
◄criteria_epsilon0.00►
Categoryimage/CV/low-level/cv2 M
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| probImage | NPARRAY,IMAGE,MASK | Back projection of the object histogram. See calcBackProject for details. 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. | |
| window_x | INT | 0-2147483648–2147483647 | Rectangle top-left corner X in pixels. |
| window_y | INT | 0-2147483648–2147483647 | Rectangle top-left corner Y in pixels. |
| window_w | INT | 00–2147483647 | Rectangle width in pixels (>= 0). |
| window_h | INT | 00–2147483647 | Rectangle height in pixels (>= 0). |
| criteria_type | COMBO | max count or epsilon (whichever first) | When to stop iterating: after max_count iterations, when the change drops below epsilon, or whichever comes first. |
| criteria_max_count | INT | 301–2147483647 | Maximum iterations (ignored when 'epsilon only'). |
| criteria_epsilon | FLOAT | 0.000–1e+38 | Target accuracy / smallest change worth continuing for (ignored when 'max count only'). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| iterations | INT | — |
| window | BOUNDING_BOX | - - - A cv2 Rect as core BOUNDING_BOX data ({x, y, width, height}, nested one group per frame) - feed 'Crop By Bounding Boxes', 'Draw BBoxes', or 'CV Split Tuple' for x/y/w/h. |