Why does your camera sensor record only one colour per pixel?
Two out of every three colour values in your photo were estimated by software, thanks to a filter mosaic invented at Kodak.
▶ Start the storyA digital camera sensor cannot see colour. Each of its light-sensing spots, a pixel, only counts how much light reached it. To get colour, a tiny filter sits over every pixel, letting through red, green or blue. This grid of filters is a Bayer filter mosaic, named after Bryce Bayer of Eastman Kodak, and it is used in most single-chip digital image sensors. The pattern is half green, one quarter red and one quarter blue.
So each pixel records only one of three colours. The data from a single pixel cannot specify its red, green and blue values on its own. To obtain a full-colour image, the camera uses demosaicing algorithms that interpolate a complete set of red, green and blue values for every pixel from its neighbours. A green pixel measures green exactly, and borrows its red and blue from the pixels around it.
Step 1: Filter mosaic
Half green, a quarter red, a quarter blue
Step 2: Each pixel counts one colour
Red, green or blue only
Step 3: Demosaicing
Interpolate the two missing colours from neighbours
Step 4: Full-colour image
Smooth areas good, edges can bleed
Why twice as many greens? Bayer's 1976 patent used twice as many green elements as red or blue to mimic the human eye, whose daylight brightness perception relies on cone cells that are most sensitive to green light.
The trick works well in smooth areas, but near sharp edges the borrowed colours can bleed, which is why smarter algorithms interpolate along edges rather than across them. It is the same idea as the Autochrome plate of 1907, whose coloured potato-starch grains it resembles.
Quiz me
0/3
Recap
A Bayer sensor measures one colour per pixel, twice as many green as red or blue, and demosaicing fills in the rest from the neighbours.
💡 A trick to remember it · Each pixel hears one colour and asks its neighbours for the other two.
Surprising fact · Even a perfect sensor with all colours at every pixel could show moiré; sampling a continuous image always risks it.
Sources (3)
No source, no claim. Every fact in this lesson (16 claims) cites at least one of these.