Skip to main content

Dithering technique

Short answer

Dithering simulates missing colours or grey levels by arranging available colours in patterns so the eye blends them. It avoids banding in limited-palette displays; methods include ordered, random, and Floyd-Steinberg error diffusion.

Define and explain the dithering technique.

Dithering is a technique that simulates colours or grey levels that are not available in a limited palette by arranging pixels of the available colours in a pattern. The eye blends neighbouring pixels, so the image looks as if it has more colours or shades than the display really has.

Why it is needed

A display or file format with few colours (for example 1-bit black and white, or an 8-bit 256-colour palette) cannot show smooth gradients of a photograph. Direct reduction gives visible bands (false contours). Dithering trades spatial resolution for apparent intensity resolution.

Principle (black and white example)

A small block of pixels is used for one original pixel. A 2 x 2 block can show 5 grey levels depending on how many pixels are black:

 level 0   level 1   level 2   level 3   level 4
  . .       # .       # .       # .       # #
  . .       . .       . #       # #       # #
 (white)                                  (black)

Methods

  1. Ordered (pattern) dithering. Each pixel intensity is compared with a threshold from a repeating dither matrix, e.g. for a 2 x 2 matrix [[0,2],[3,1]] scaled to 0-255. If the pixel value is above the matrix threshold the output is white, else black. Fast but gives a regular pattern.
  2. Random dithering. A random noise value is added before thresholding. No pattern, but grainy.
  3. Error diffusion (Floyd-Steinberg). The pixel is rounded to the nearest available colour, and the error is spread to the neighbours not yet processed: 7/16 to the right, 3/16 below-left, 5/16 below, 1/16 below-right. Gives the best quality.

Uses and effect

  • Showing photographs on 256-colour or monochrome displays, in GIF images, newspaper (halftone) printing and fax.
  • Advantage: a better look with a small palette. Disadvantage: image looks grainy and dithered images compress poorly.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Multimedia System chapter 3 questions →