In this article, we look at the Bayer filter, providing a guide to what it is for, and how it works

Bayer-filterA Bayer filter is the secret behind the colour in digital images generated by most, if not all, colour digital cameras. Named after it’s inventor, Eastman Kodak’s Bryce Bayer, the Bayer filter is an integral part of a digital camera image sensor. It is an array, or mosaic, of red, green and blue filters that live above the millions of light-sensitive photosites on the surface of a sensor chip.

Bayer filter – Emulate the human eye

One colour filter covers one photosite and, conventionally, the number of photosites and, therefore, individual colour filters equals the number of sensor pixels. For the sensor to ‘see’ colour it must record red, green and blue information. A Bayer filter emulates the colour sensitivity of the human eye and so there is a ratio of one red and one blue filtered photosite to two green ones. It also exists in variations where there are two shades of green, like green and emerald, for example. Some modified Bayer filters also incorporate clear filters where some green ones should be in order to improve the sensitivity of the sensor.

When a picture is taken, the camera initially produces an image file of just red, green and blue pixels, each of varying density. This is essentially what a raw file is. If viewed in this state it would look like a horrible mess, of what we call false colour. The camera’s image processing engine, or your raw-processing software, then converts the artificial RGB colour into natural colour via a process that is sometimes referred to as a demosaic stage.

Information from neighbouring pixels is used to run a calculation to reveal a ‘true’ colour for a given pixel. This, as we know, works amazingly well.

A Bayer filter is not in all cameras, though. One exception is the Foveon sensor, which enables all three red, green and blue filters to illuminate each photosite and so each pixel. On paper, Foveon sensors have better colour resolution, but photographers still debate as to whether or not either system is superior.