An everyday explanation · 2 min read

How a camera sensor records color

A common digital camera records color through a mosaic of red, green and blue filters. Each photosite measures how much light comes through its own filter. The camera then estimates the colors that site did not measure from readings at nearby photosites, building a full-color image from the mosaic.

A mirrorless camera body with the lens removed and the sensor visible.
Original AI-assisted editorial illustration. The explanatory drawing below is a separate, source-checked schematic.

Look a little closer

See the mechanism

A filter mosaic becomes a full-color image

Sensor measurementsEach site gives one reading through its filter.RGRGGBGBRGRGOne filter over each site
Sensor measurements. Each site gives one reading through its filter.
Read the diagram steps

Sensor measurements. Each site gives one reading through its filter.

Use neighboring samples. At the selected green photosite, nearby red and blue measurements can help estimate the missing components.

Reconstructed pixel. The output pixel carries green from the chosen site and estimates of red and blue.

Original Bayer mosaic, example neighboring samples, and RGB reconstruction. Highlighting shows available inputs, without specifying an interpolation algorithm.

Diagram basis: Color imaging array.

Sources: Bryce Bayer / US3971065A · European Patent EP4050554B1

Each site measures light in one band

When the lens makes an image on the sensor, each tiny light-sensitive site measures the light that reaches it. A Bayer array puts a red, green or blue filter above each site. Green occupies half the positions in the usual repeating pattern, with red and blue sharing the others. Each site records a single intensity through its filter.

Sources: Bryce Bayer / US3971065A · European Patent EP4050554B1

Color is reconstructed from neighboring samples

A pixel in the finished image needs a red, green and blue value. In a simple reconstruction, a position that measured green can get estimates of red and blue from nearby sites that measured those colors. The general process is called demosaicing. Cameras can use more complex algorithms to handle edges and fine patterns.

The filter mosaic measures light coming in. Four-ink printing works in the other direction: the inks determine how much light of different colors returns from a printed sheet. Both use small repeating patterns, but only the sensor mosaic supplies measurements for an image reconstruction.

Two three-by-three Bayer tiles highlight green centers. Their nearest red samples sit to the sides in one tile and above and below in the other.
Both centers measure green. The nearest red samples flank one center and sit above and below the other. The positions of the nearest blue samples switch the other way.

Sources: Bryce Bayer / US3971065A

Sources: Bryce Bayer / US3971065A · European Patent EP4050554B1

The thing to remember

The sensor captures one filtered measurement per site, and demosaicing supplies the other color values.

What this example leaves out

The drawing uses a common Bayer mosaic. Other arrangements, multi-sensor cameras and different processing pipelines exist.

Sources & further reading

Source access dates are listed below. Manufacturer descriptions and patents support the specific constructions described, not every product.

  1. Color imaging array ↗

    Bryce Bayer / US3971065A · Retrieved 2026-11-26 · A repeating Bayer arrangement aligns green, red and blue filters one-to-one with sensor positions, with green at every other position.
    Original imaging-array patent. Modern implementations may have different color filters and processing.

  2. Raw image processing system and method ↗

    European Patent EP4050554B1 · Retrieved 2026-11-26 · A single-sensor color-filter array yields mosaic-like readings. Demosaicing produces full color per pixel from the raw mosaic.
    Patented processing background; no specific interpolation algorithm is attributed to all cameras.

How we use sources and handle corrections

Keep the question going

Read this next.

Compare another construction in this part of the library: A color photograph on paper is built from selective absorption and tiny patterned marks. Follow the parts and the stated limits in each explanation.

Materials · 2 min read

How four printing inks make so many colors

Continue reading