Box (mean) blur with a random odd kernel size (Albumentations Blur).
Samples an odd kernel size k uniformly from [3, blur_limit]
and convolves the image with a normalised k x k all-ones kernel
via functional.depthwise_conv2d.
Parameters
blur_limitint= 7Inclusive upper bound on the sampled kernel size; values are
rounded up to the next odd integer to keep the kernel centred.
pfloat= 0.5Probability of applying the transform.
Used by 1
Constructors
1Instance methods
1Sample per-call random parameters for Blur.
Parameters
imgTensorImage tensor used only to fix the parameter dtype / dispatch
context; no spatial information is read.
Returns
KSizeParamCarries ksize — the odd box-kernel side length sampled
uniformly from [3, blur_limit].
Notes
Even draws are forced to the next odd integer so the kernel stays centred on each output pixel.