From apertus wiki
Jump to: navigation, search

Debayering, or demosaicing is the process of converting a raw image (direct from the color sensor) into a viewable RGB image.

Several algorithms exist, some are fast and not very accurate, some are very accurate and very slow. Depending on the application (realtime monitoring vs high quality render for movie finishing), different approaches can be taken.

1 Downsampling 4k image to 2k

This approach will most likely be taken for the incamera monitoring. Taking a 2 by 2 pixel (1 blue, 1 red, and 2 greens) array, a single color can be determined. I fear there will be a lot of aliasing this way, but the image will be quickly rendered (quick enough for realtime monitoring). depending on this some alternative algorithm can be used. The best algorithm is VNG 4 colours (read the pdf below for explanation on how the algo works). It's also the slowest. It avoids the so called "maze" effect caused by different greens on the same pixel.

2 Various algorithms

Demosaicing is evolving. Better algorithms (quality and/or speed) might appear.

3 For now, just a list of links of interesting links

First read this, everything is well explained :

An explanation of some algorithms :

A very accurate one :

Try online :

Comparison of demosaicing algorithms : And it's interactive, so can quickly see what's going on here

Those guys claim to debayer 800 mbps images on gpu :