Bayer Encoding
Bayer encoding is a method you can use to produce color images with a single imaging sensor, rather than using three individual sensors for the red, green, and blue components of light. This technology greatly reduces the cost of cameras. The Bayer color filter array (CFA) is a primary color, mosaic pattern of 50% green, 25% red, and 25% blue pixels. Green pixels comprise half of the total pixels because the human eye receives most of its sharpness information from green light.
Light travels through the camera lens onto an image sensor that provides one value for each sensor cell. The sensor, which is an array of tiny, light-sensitive diodes called photosites, converts light into electrical charges. The sensor is covered by the Bayer CFA so that only one color value reaches any given pixel. The raw output is a mosaic of red, green, and blue pixels of different intensity. When the image is captured, the accumulated charge for each cell is read and analog values are converted to digital pixel values using an analog-to-digital (A/D) converter.