Nodes/comfyui_cv/cv2.pyrMeanShiftFiltering
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.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
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)

NameTypeDefaultDescription
srcCOMFY_MATCHTYPE_V3The 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.
spFLOAT0.0000-1e+38–1e+38The spatial window radius.
srFLOAT0.0000-1e+38–1e+38The color window radius.
maxLeveloptINT3-2147483648–2147483647Maximum level of the pyramid for the segmentation. Preset to the OpenCV default (3).
termcrit_typeoptCOMBOmax 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_countoptINT301–2147483647Maximum iterations (ignored when 'epsilon only').
termcrit_epsilonoptFLOAT0.000–1e+38Target accuracy / smallest change worth continuing for (ignored when 'max count only').

Outputs (1)

NameTypeDescription
resultCOMFY_MATCHTYPE_V3Echoes the 'src' input's format: an IMAGE link comes back as IMAGE, MASK as MASK, NPARRAY stays NPARRAY.