RingingOvershoot
Create ringing or overshoot artifacts by convolving the image with a 2D sinc filter.
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_limitMaximum kernel size for the sinc filter. Must be an odd number in the range [3, inf). If a single int is provided, the kernel size will be randomly chosen from the range (3, blur_limit). If a tuple (min, max) is provided, the kernel size will be randomly chosen from the range (min, max). Default: (7, 15).
cutoffRange 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_limit=(9, 17),
... cutoff=(np.pi/6, np.pi/3),
... p=1.0
... )
>>> ringing_image = transform(image=image)['image']- Ringing artifacts are oscillations of the image intensity function in the neighborhood of sharp transitions, such as edges or object boundaries.
- This transform uses a 2D sinc filter (also known as a 2D cardinal sine function) to introduce these artifacts.
- The severity of the ringing effect is controlled by both the kernel size (blur_limit) and the cutoff frequency.
- Larger kernel sizes and lower cutoff frequencies will generally produce more noticeable ringing effects.
- This transform can be useful for:
- Simulating imperfections in image processing or transmission systems
- Testing the robustness of computer vision models to ringing artifacts
- Creating artistic effects that emphasize edges and transitions in images
- Ringing artifactshttps://en.wikipedia.org/wiki/Ringing_artifacts
- Sinc filterhttps://en.wikipedia.org/wiki/Sinc_filter
- Digital Image ProcessingRafael C. Gonzalez and Richard E. Woods, 4th Edition