IT lexicon › Hardware › Bayer matrix

Bayer matrix

Hardware På svenska → Updated: 2026-10-26

The recursively defined threshold matrix that ordered dithering compares against, built so the thresholds are spread out as widely and clump as little as possible.

The matrix is built recursively: a 2×2 doubles to 4×4, 8×8 and so on by a fixed formula that offsets each sub-quadrant by a constant. The point is that the n² thresholds are arranged so neighbouring pixels rarely draw neighbouring values — the pattern lands at high spatial frequency, where the eye minds it least. Each cell supplies a threshold the pixel value is weighed against in ordered dithering.

It is named after Bryce Bayer of Kodak, who described it in 1973 — the same person who gave his name to the colour-filter mosaic on camera sensors, though that is a wholly separate invention. The Bayer matrix dominated dithering on 8-bit hardware and in early image routines, and survives in shaders to hide colour banding at next to no cost.

← Back to the lexicon