Photo Portfolio
ShutterSounds Blog
Resumé (pdf)

Example 1: Pixel Binning

Pixel binning is the most straightforward way to combine the color information across multiple photodetectors. We simply assume a larger size for each pixel (each pixel is now an aggregate of information from multiple photodetectors rather than just one) and combine the color information. For a Bayer pattern sensor, which uses repeating 2x2 GRGB units, we bin 2x2 blocks of pixels together.

Pixel-binned, resized for clarity
(Resized to original)

While this process works well in theory, and computationally is very inexpensive, binning comes at the cost of severely reduced resolution - in this case of the 2x2 Bayer unit, resolution is reduced 1/2 in both horizontal and vertical directions. Basic binning also does not deal with the offset in red, green, and blue photodetectors - thus color artifacts at edges will still exist.


Choose an algorithm from the left. Feel free to send suggestions/links for new ones to thedailynathan at gmail.

Shown here is the original image for reference, and the simulated Bayer raw data which the different algoriths are run on. The simulated Bayer data is generated by taking only green, red, and blue values from the corresponding pixel in a 2x2 GRGB Bayer pattern. Assuming the image used is a 100% crop taken from an image with the top-left pixel (at position 0,0) being a first green photosite (G1), this should be a fairly accurate representation of the actual raw data (assuming of course, that a camera using a Bayer filter sensor was used, and ignoring any compression losses due to compression to 24-bit true color and possible JPEG lossy compression).

Note that this demo does not quite work as effectively with resized images (this demo resizes images greater than 300x300 for performance reasons), or images not generated from a camera using a Bayer sensor. In these cases, resolution can approach or exceed that of a Bayer sensor and anti-aliasing (AA) filter combination, and severe mosaicing artifacts should be expected to appear, no matter the algorithm.

Original image
Simulated Bayer raw data