Photo Portfolio
ShutterSounds Blog
Resumé (pdf)

Image Interpolation - Demosaicing Algorithms for Bayer Pattern Sensors

This site is a demonstration of demosaicing algorithms used to interpolate image information from Bayer pattern color image sensors. Bayer sensors, or sensors that use the Bayer filter pattern, consist of a mosaic of color-filtered photodetectors, each of which measures light intensity for a particular color (in a Bayer filter these are red, green, and blue, or RGB, but can differ for other color filter arrays).

Since each individual photodetector (corresponding to a particular pixel in the output image) only records one color, we don't know anything about the intensities of other colors (in the digital image, pixel values for other color channels). Most imaging devices using color filter arrays get around this problem by interpolating the missing color information using demosaicing algorithms. In general, the algorithms work by looking at values for other color intensities from nearby photodetectors (pixels) which did record those colors.

As an example, here's a blown-up (3x) version of the test image which we'll be using for this site (you can also upload your own custom test images!). Each pixel is coded solely with the color intensity corresponding to the color channel it recorded (red, green, or blue). This is pretty much the raw data that your camera sees from the sensor, and what it works with to render the final image.

raw test image

raw test image
(The actual 1x size image)