class
MedianBlur
extends
PhotometricTransform[KSizeParam]MedianBlur(blur_limit: int = 7, p: float = 0.5)Median filter with a random odd kernel (Albumentations MedianBlur).
Samples an odd kernel size k uniformly from [3, blur_limit],
builds the k * k shifted-neighbour stack via lucid.roll,
sorts along the stack axis, and returns the median element — an
impulse-noise denoiser that preserves edges better than Blur.
Parameters
blur_limitint= 7Inclusive upper bound on the sampled kernel size; rounded up
to the next odd integer so the window is centred.
pfloat= 0.5Probability of applying the transform.
Used by 1
Constructors
1Instance methods
1Sample per-call random parameters for MedianBlur.
Parameters
imgTensorImage tensor; not inspected, only carried through for the
transform dispatch.
Returns
KSizeParamCarries ksize — the odd window side length sampled
uniformly from [3, blur_limit].
Notes
Even draws are forced to the next odd integer so the median window is centred on each output pixel.