Bayer filter
|
BayerPatternSimpleMosaic.jpg
A Bayer filter is a color filtering array for arranging RGB colors on a monochromatic grid. The term most often refers to a common mosaic of color filters used on many single chip digital cameras. Each sensor pixel is covered by red, green and blue coloured filters. The Bayer filter has twice as many green pixels as red or blue because of the human eye's greater resolving power with green light.
In the raw output of Bayer filter cameras is referred to as a Bayer Pattern image. Two thirds of the color data is missing from each pixel. A demosaicing algorithm is used to interpolate the complete red, green, and blue values for each point. Many different algorithms exist.
Missing image
BayerPatternFiltration.jpg
Thumb
An illustrated explanation of color image reconstruction
To reconstruct a color image from the data collected by the color filtering array, you need to fill up the blanks. The mathematics here is subject to individual implementation. In this example, we use Adobe Photoshop's bicubic interpolation to simulate the circutry of a Bayer filter device such as a digital camera. In a typical commercial implementation, low pass anti-alias filters will be added that make the artifacts shown here less pronounced, with a corresponding reduction of sharpness.
Missing image
Shades_aa.jpg
Image:shades_aa.jpg
This is the original image, made with Adobe Illustrator. If a perfect digital camera with perfect optical lens that can measure every pixel's exact Red, Green, and Blue components, the resulted image will probably look like this.
Missing image
Shades_bayer.gif
Image:shades_bayer.gif
This is a simulated sampling taken by a Bayer filtered sensor array. Each pixel only has a value of either R or G or B.
A digital camera has certain circuits to reconstruct the whole image using above information. The resulting image could be something like this:
Missing image
Shades_dc.jpg
Image:shades_dc.jpg
Missing image Shades_framed_aa.jpg Image:shades_framed_aa.jpg | Missing image Shades_framed_dc.jpg Image:shades_framed_dc.jpg |
Frame enlargement of the original. | Frame enlargement of the reconstructed image. |
As you can see, the reconstructed image looks good in low contrast areas. However, the edges of letters have visible colored artefacts, and a rough appearance.
See also
External links
- The Color Filter Array FAQ (http://www.fillfactory.com/htm/technology/htm/rgbfaq.htm)
- Understanding Digital Sensors (http://www.cambridgeincolour.com/tutorials/sensors.htm)