What Is Ringing Noise in JPEG Images?
Ringing noise, often referred to as ringing artifacts or the Gibbs phenomenon, is a type of visual distortion that manifests as faint, halo-like ripples or ghost lines parallel to sharp transitions and high-contrast boundaries in digital images. This article breaks down what ringing noise looks like, examines the mathematical and compression processes within the JPEG standard that cause it, and explores practical ways to minimize or avoid it.
What Ringing Noise Looks Like
Ringing noise appears almost exclusively around abrupt changes in brightness or color—such as dark text on a light background, silhouettes, hard geometric lines, or contrasting graphic elements. Instead of transitioning cleanly from one tone to another, the edge exhibits an artificial oscillation: repeated, fading bands or "waves" of discoloration echoing outward from the boundary.
Why JPEG Compression Causes Ringing
The root cause of ringing noise lies in the way the JPEG compression algorithm processes visual information through the Discrete Cosine Transform (DCT) and subsequent quantization.
- The Discrete Cosine Transform (DCT): The JPEG standard divides an image into 8x8 pixel blocks. It converts the spatial pixel data in each block into a collection of cosine wave frequencies, separating broad color patterns (low frequencies) from fine details and hard lines (high frequencies).
- The Math of Sharp Edges: Mathematically, an abrupt, instantaneous step change in tone (a sharp edge) requires an infinite sum of high-frequency waves to be rendered perfectly without overshoot.
- Lossy Quantization: Because human vision is far less sensitive to subtle changes in high-frequency detail than to broader shifts in color and brightness, JPEG achieves smaller file sizes by discarding or aggressively rounding down these high-frequency values.
- The Gibbs Phenomenon: When the image is decompressed, the decoder reconstructs the pixels using only the surviving low and medium frequencies. Without the omitted high-frequency components needed to cancel out the peaks of the cosine waves at the boundary, the reconstructed signal overshoots and undershoots the true values. This mathematical oscillation produces the visible ripple effect along the edge.
Ringing vs. Blocking Artifacts
While both stem from JPEG compression, they are distinct:
- Blocking artifacts produce a visible checkerboard pattern across the entire image because the 8x8 pixel blocks are compressed independently, causing their boundaries to misalign.
- Ringing artifacts are localized directly alongside high-contrast lines and sharp edges within those blocks due to truncated frequency components.
How to Prevent and Reduce Ringing Artifacts
- Increase Quality Settings: Lowering the compression ratio preserves more high-frequency DCT coefficients, significantly reducing oscillation around edges.
- Use Lossless Formats for Graphic Content: Content containing sharp transitions, such as line art, typography, and screenshots, should be saved using lossless formats like PNG, which do not discard frequency data.
- Switch to Modern Image Formats: Modern codecs such as AVIF, WebP, and JPEG XL utilize more advanced transform methods, directional filtering, and in-loop de-ringing filters to prevent high-frequency oscillations from appearing in the final output.