In photography, a color filter array (CFA), or color filter mosaic (CFM), is a mosaic of tiny color filters placed over the pixel sensors of an image sensor to capture color information.
Color filters are needed because the typical photosensors detect light intensity with little or no wavelength specificity, and therefore cannot separate color information. Since sensors are made of semiconductors they obey solid-state physics. The concept of the band gap essentially makes each photosensor a high-pass filter of light which allows a large range of frequencies (i.e., the color of light) to be accumulated in the sensor.
The color filters filter the light by wavelength range, such that the separate filtered intensities include information about the color of light. For example, the Bayer filter (shown to the right) gives information about the intensity of light in red, green, and blue wavelength regions. The raw image data captured by the image sensor is then converted to a full-color image (with intensities of all three primary colors represented at each pixel) by a demosaicing algorithm which is tailored for each type of color filter. The spectral transmittance of the CFA elements along with the demosaicing algorithm jointly determine the color rendition. The sensor's passband quantum efficiency and span of the CFA's spectral responses are typically wider than the visible spectrum, thus all visible colors can be distinguished. The responses of the filters do not generally correspond to the CIE color matching functions, so a color translation is required to convert the tristimulus values into a common, absolute color space.
The Foveon X3 sensor uses a different structure such that a pixel utilizes properties of multi-junctions to stack blue, green, and red sensors on top of each other. This arrangement does not require a demosaicing algorithm because each pixel has information about each color.
| Image | Name | Description | Pattern size (pixels) |
|---|---|---|---|
| Bayer filter | Very common RGB filter. With one blue, one red, and two green. | 2×2 | |
| RGBE filter | Bayer-like with one of the green filters modified to "emerald"; used in a few Sony cameras. | 2×2 | |
| CYYM filter | One cyan, two yellow, and one magenta; used in a few cameras of Kodak. | 2×2 | |
| CYGM filter | One cyan, one yellow, one green, and one magenta; used in a few cameras. | 2×2 | |
| RGBW Bayer | Traditional RGBW similar to Bayer and RGBE patterns. | 2×2 | |
| RGBW #1 | Three example RGBW filters from Kodak, with 50% white. (See Bayer filter#Alternatives) | 4×4 | |
| RGBW #2 | |||
| RGBW #3 | 2×4 |
The Bayer CFA is named for its inventor, Dr. Bryce E.Bayer from Eastman Kodak. It is realized by application of color filters over the photodiodes used in sensors, cameras, videocameras, and scanners, for creation of the color image.
CFAK matrix or sensor - name used for RGBW sensor produced by Kodak.
A CYGM matrix (Cyan, Yellow, Green, Magenta) is a CFA that uses mostly secondary colors, again to allow more of the incident light to be detected rather than absorbed. Other variants include CMY and CMYW matrices.