Create ringing or overshoot artifacts via 2D sinc convolution. blur_range and cutoff_range control strength. Simulates sharpening or compression artifacts.
This transform simulates the ringing artifacts that can occur in digital image processing, particularly after sharpening or edge enhancement operations. It creates oscillations or overshoots near sharp transitions in the image.
blur_rangeInclusive range for the sinc filter kernel size. Both ends must be odd and >= 3. Default: (7, 15).
cutoff_rangeRange to choose the cutoff frequency in radians. Values should be in the range (0, π). A lower cutoff frequency will result in more pronounced ringing effects. Default: (π/4, π/2).
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)
# Apply ringing effect with default parameters
>>> transform = A.RingingOvershoot(p=1.0)
>>> ringing_image = transform(image=image)['image']
# Apply ringing effect with custom parameters
>>> transform = A.RingingOvershoot(
... blur_range=(9, 17),
... cutoff_range=(np.pi/6, np.pi/3),
... p=1.0
... )
>>> ringing_image = transform(image=image)['image']