Welcome back! Nice to see you back again!

So far, I’ve ignored how sensors produce color. In one sense, digital camera sensors are color blind. They can register the brightness, or luminance of an image, but have no notion of the color of the light at all. To do that, CCD and most CMOS sensors overlay the photosites with a set of color filters. Each pixel registers either red, green, or blue light, and ignores all the others.

So, any particular pixel might see red light (only), while the one next to it might see green light (only), and the pixel below it on the next row might be sensitive to blue light (only). As you might guess, in the normal course of events, a pixel designated as green-sensitive might not be lucky enough to receive much green light. Perhaps it would have been better if that pixel had registered red or blue light instead. Fortunately, over a 6 million pixel range, enough greenfiltered pixels will receive green light, red-filtered pixels red light, and blue-filtered pixels blue light that things average out with a fair degree of accuracy. To compensate for this short-coming, the actual color value of any particular pixel is calculated through a process called interpolation.

Algorithms built into the camera’s circuitry can look at surrounding pixels to see what their color values are, and predict with some precision what each pixel should actually be. For the most part, those guesses are fairly accurate.

For reasons shrouded in the mists of color science, the pixels in a sensor array are not arranged in a strict red-green-blue alternation, as you might expect to be the case. Instead, the pixels are laid out in what is called a Bayer pattern. One row alternates green and red pixels, followed by a row that alternates green and blue filters.

Green is “over-represented” because of the way our eyes perceive light: We’re most sensitive to green illumination. That’s why monochrome monitors of the computer dark ages were most often green on black displays.

The arrangement used is called a mosaic or Bayer pattern, and the process of interpreting the pixel values captured and transforming them into a more accurate representation of a scene’s colors is called demosaicing. With good algorithms, the process is accurate, but faulty demosaicing can produce unwanted artifacts in your photo (although, almost by definition, artifacts are generally always unwanted).

Of course, use of a Bayer pattern means that a great deal of the illumination reaching the sensor is wasted. Only about half of the green light reaching the sensor is actually captured, because each row consists of half green pixels and half red or blue. Even worse, only 25 percent of the red and blue light is registered.

share save 171 16 How We Get Color
none