Dither

Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images.

The term dither was published in books on analog computation and hydraulically controlled guns shortly after World War II.

In order to prevent this, the signal is "dithered", a process that mathematically removes the harmonics or other highly undesirable distortions entirely, and that replaces it with a constant, fixed noise level.

Every time the sine wave's value hit 3.2, the truncated result would be off by 0.2, as in the sample data above.

Every time the sine wave's value hit 4.0, there would be no error since the truncated result would be off by 0.0, also shown above.

What the ear hears as distortion is the additional content at discrete frequencies created by the regular and repeated quantization error.

Quantization with lesser bit depth requires higher amounts of dither.

[14] Dither can be useful to break up periodic limit cycles, which are a common problem in digital filters.

Random noise is typically less objectionable than the harmonic tones produced by limit cycles.

The relationship of probabilities of results follows a bell-shaped, or Gaussian curve, typical of dither generated by analog sources such as microphone preamplifiers.

If dither is used, its final spectrum depends on whether it is added inside or outside the feedback loop of the noise shaper.

If outside, the dither is treated as part of the original signal and linearises quantization without being shaped itself.

Dithered images, particularly those using palettes with relatively few colors, can often be distinguished by a characteristic graininess or speckled appearance.

In these circumstances, it has been shown that dither generated from blue noise is the least unsightly and distracting.

[16] The error diffusion techniques were some of the first methods to generate blue-noise dithering patterns.

Reducing the color depth of an image can have significant visual side effects.

However, typically this approach will result in flat areas (contours) and a loss of detail and may produce patches of color that are significantly different from the original.

The application of dithering can help to minimize such visual artifacts and usually results in a better representation of the original (Figure 3).

If the image is reduced based on an optimized palette the result is often much closer to the original (Figure 4).

An example home computer users may have seen was emulation of lower resolution CGA 4 color graphics on higher resolution monochrome Hercules graphics cards, with the colors being translated to ordered dither patterns.

[20] Dithering such as this, in which the computer's display hardware is the primary limitation on color depth, is commonly employed in software such as web browsers.

But even when the total number of available colors in the display hardware is high enough to properly render full-color digital photographs, banding may still be evident to the eye, especially in large areas of smooth shade transitions.

Another useful application of dithering is for situations in which the graphics file format is the limiting factor.

For such situations, graphical editing software may be responsible for dithering images prior to saving them in such restrictive formats.

However, a close inspection of the light areas of a print where dots are further apart reveals dithering patterns.

This power limit can be increased by dithering the transmit optical center frequency, typically implemented by modulating the laser's bias input.

[29] Another type of temporal dithering has recently been introduced in financial markets, in order to reduce the incentive to engage in high-frequency trading.

The use of such temporal buffering or dithering has been advocated more broadly in financial trading of equities, commodities, and derivatives.

Image on left is original. Center image reduced to 16 colors. Right image also 16 colors, but dithered to reduce banding effect.
An illustration of dithering. Red and blue are the only colors used but, as the red and blue squares are made smaller, the patch appears magenta.
256 color dithering with IrfanView
Color dithering on a towel
A smooth gradient using ordered dithering from black to white, using only three colors (black, gray and white)