Darken corners with a radial (elliptical) gradient. Simulates lens vignetting or natural light falloff. Use for lens realism or stylistic darkening.
Center of the image stays bright; corners and edges are darkened. Center position can be jittered for variety.
intensity_rangeDarkening at corners: 0 = no effect, 1 = black. Default: (0.2, 0.5).
center_rangeRange for vignette center as fraction of width/height. (0.5, 0.5) = image center. Default: (0.3, 0.7).
pProbability of applying the transform. Default: 0.5.
>>> import numpy as np
>>> import albumentations as A
>>> image = np.random.randint(0, 256, (100, 100, 3), dtype=np.uint8)
>>>
>>> transform = A.Vignetting(intensity_range=(0.2, 0.5), p=1.0)
>>> result = transform(image=image)["image"]