class
GaussianBlur
extends
PhotometricTransform[SigmaParam]GaussianBlur(blur_limit: tuple[int, int] = (3, 7), sigma_limit: float | tuple[float, float] = 0.0, p: float = 0.5)Gaussian blur with random kernel size and sigma (Albumentations GaussianBlur).
Samples an odd kernel size from blur_limit and a sigma from
sigma_limit; when sigma is left at zero the OpenCV default
0.3 * ((k - 1) * 0.5 - 1.0) + 0.8 is used so the kernel matches
cv2's auto-sigma policy.
Parameters
blur_limit(int, int)= (3, 7)Inclusive range for the kernel size; both ends are rounded up
to the next odd integer.
sigma_limitfloat or (float, float)= 0.0Range for the Gaussian sigma. A scalar
v expands to
(0.0, v); 0 triggers the OpenCV auto-sigma formula.pfloat= 0.5Probability of applying the transform.
Used by 1
Constructors
1Instance methods
1Sample per-call random parameters for GaussianBlur.
Parameters
imgTensorImage tensor; not inspected, carried through for dispatch.
Returns
SigmaParamCarries ksize (odd kernel side from blur_limit) and
sigma (Gaussian standard deviation).
Notes
A non-positive sampled sigma falls back to OpenCV's
kernel-derived default 0.3 * ((k - 1) * 0.5 - 1.0) + 0.8
so the Gaussian matches cv2's auto-sigma policy.