How does Bayer interpolation work and why is it needed?
Most sensors see the world in black and white. To get a color image from a B&W sensor, an array of filters is placed over the sensor. Typically these filters are in an alternating pattern of the primary additive colors: red, green and blue. Since the eye is more sensitive to green, green is favored in the pattern, so one row will have filters alternating between, “RGRGRGRG…” and the next row will have filters alternating between, “GBGBGBGB…” With the filters added, the sensor will now be able to detect one of either red, green or blue at each pixel. (Note that we are using language somewhat loosely here. Each filter allows a range of wavelengths to pass, with the range centered around specific red, green or blue wavelengths.) To construct the complete color information for each pixel, the sensor must reconstruct two out of the three components of the signal by using some form of interpolation based upon the colors registered at neighboring pixels. For example, an “R” pixel in the m