Bayer Filter Array
Thomas Sapiano and Pro Photo Wiki Contributors
The majority of conventional image sensor technologies aren't capable of measuring colour by themselves. As such, additional components are required in order to design cameras that can generate colour images. The most popular method of achieving this goal is the Bayer colour filter array.
] How it Works Fig 1
- Bayer Colour Filter Arrays are used to capture colour data on image sensors that are otherwise not sensitive to colour. Adjacent pixels capture only one of the three available colours, and software is later used to interpolate the missing information back into the image.
Bayer filter arrays place colour filters directly above the image sensor. The filter contains an alternating pattern composed of one red, one blue and two green patches - each one covering a single photosite (see figure 1
). This results in each pixel of the resulting image containing information for only one colour. This information is read out of the imager and digitized for further processing. Fig 2
- Light entering the camera travels through the Bayer CFA prior to exposing the image on the monochrome sensor. This raw filtered data is then run through a demosaicing filter in order to regenerate a colour image file.
In order to generate a useable image from this raw data, some reconstruction is required. The process used to recover this information is called demosaicing, and is performed when the camera generates a finished image file. This process interpolates the missing colour information from adjacenet pixels in order to generate a full colour image.
When the camera is set to capture images in a RAW format, the demosaicing process is defered to the conversion process. RAW files contain the unprocessed information read directly from the sensor. When they are loaded on a computer, the conversion software will perform the demosaicing process to generate an image file the user can see.
As conventional computers typically have significantly more processing resources than the embedded systems within cameras, this software typically uses more sophisticated algorithms to complete this process. As such, the results from RAW conversion software can produce additional detail when compared with image files generated in-camera.
] Aliasing Fig 3
- Without an Anti-Aliasing Filter
, fine details projected through a Bayer filter can produce artifacts in the final image.
As only a single colour is captured at each photosite, simple Bayer imagers can be vulnerable to a number of issues that can be generated by fine patterns in the scene being captured. As objects can illuminate the sensor in such a way as they don't hit all three colours, errors can be made when reassembling the image (see figure 3
). These aliasing artifacts typically manifest themselves as rainbow patterns within high-detail regions of the image.
To help remedy this problem, most image sensors with Bayer filter arrays are also equipped with an Anti-Aliasing Filter
. This filter softens the image being projected on the sensor in order to ensure that any point of light in the scene will be sampled by at least three pixels. Unfortunately, this can also result in some loss of detail so manufacturers have to tweak the strength of this filter to obtain the optimal result.
] Variants Fig 4
- The various different colour filter patterns used in Bayer cameras.
While the vast majority of cameras using Bayer filters use the traditional RGB pattern, a number of other variants have been used. Each of these patterns has its advantages and disadvantages, so manufacturers have selected these alternate options in order to extract additional functionality.
] CMY Filters
Kodak first used the CMY filter pattern in their DCS 620x and 720x models. The CMY dyes used to generate these filters absorb less light, so sensors based on this pattern generally have higher sensitivity than similarly equipped RGB cameras. This allowed these cameras to provide sensitivity levels that even current DSLRs
have not been able to match.
Unfortunately, cameras using this filter pattern have also had problems with colour fidelity. Some saturated colours would produce colour shifts in the final image, making it difficult to correct for these problems in post processing.
This filter pattern has since been used on a number of high resolution consumer cameras to counteract the negative effects of small pixel sizes. As modern technology has been successful in battling noise via other measures, these filters have become relatively rare in the current crop of cameras.
] Sony RGBE Filter
In 2003 Sony patented a new process that replaced the second green element in the Bayer pattern with a new 'Emerald' filter. As cameras using this technology are sampling four discrete colours, this potentially provides a wider colour gamut.
] See Also
- Anti-Aliasing Filter - A filter that intentionally softens the image in order to help reduce the aliasing artifacts in the final image.
- Foveon X3 image sensor - A sensor design that uses three layers of photo sites to sense red, green, and blue components of the image, in a manner similar to colour film. In the Foveon X3 sensor all three colours are captured at each pixel location. This is claimed to increase resolution and reduce aliasing problems. Currently only a handful of cameras use the Foveon sensor. The first camera maker to use the Foveon sensor was Sigma in the SD9 and SD10 cameras.
] External Links
- US Patent 3,971,065 - Kodak's original patent covering the original invention of the Bayer pattern described above.