ComfyUI Node
cv2.pyrMeanShiftFiltering
Raw wrapper of cv2.pyrMeanShiftFiltering(src, sp, sr, maxLevel?, termcrit?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.pyrMeanShiftFiltering
- src
- result
◄sp0.0000►
◄sr0.0000►
◄maxLevel3►
◄termcrit_typemax count or epsilon (whichever first)►
◄termcrit_max_count30►
◄termcrit_epsilon0.00►
Categoryimage/CV/low-level/cv2 P
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| src | COMFY_MATCHTYPE_V3 | The source 8-bit, 3-channel image. The image output(s) echo this input's format. 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. | |
| sp | FLOAT | 0.0000-1e+38–1e+38 | The spatial window radius. |
| sr | FLOAT | 0.0000-1e+38–1e+38 | The color window radius. |
| maxLevelopt | INT | 3-2147483648–2147483647 | Maximum level of the pyramid for the segmentation. Preset to the OpenCV default (3). |
| termcrit_typeopt | 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. |
| termcrit_max_countopt | INT | 301–2147483647 | Maximum iterations (ignored when 'epsilon only'). |
| termcrit_epsilonopt | FLOAT | 0.000–1e+38 | Target accuracy / smallest change worth continuing for (ignored when 'max count only'). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | COMFY_MATCHTYPE_V3 | Echoes the 'src' input's format: an IMAGE link comes back as IMAGE, MASK as MASK, NPARRAY stays NPARRAY. |