Jump to content
  • Debayering


    Reggie Jones

    For those of us who use One Shot Color CCD, CMOS or DSLR cameras to image, we have to use a process called Debayering to properly process the data from these cameras to help create the image from the data.  To do that, you will need an understanding of the Debayer process and how to properly use it.

    In the mid 1970s, a Kodak scientist named Bryce Bayer developed what is known as the Bayer Matrix and patented it in 1976.  The Bayer Matrix is basically a set of photosensors or pixels as we call them now whose main characteristic is that these matrix combinations of red, green and blue color filters placed over pixels would see light just like the human eye does.  The most common matrix pattern for this is the Red-Green-Green-Blue pattern or RGGB pattern.  Since the human retina in the eye is more sensitive to green light, this matrix became the standard matrix for color photosensors.

    BayerMosaicPatternPI.jpg.a92e0207abce4e857e92e30adcbcad79.jpg

     

    The raw output of these cameras is formatted so that each pixel is filtered to record only one color.  The problem is that the data from each color filtered pixel on its own, can’t specify the values of that color.  What you need to do is use an algorithm that will interpolate a set of the surrounding similar red, green or blue pixel values to estimate what the value of a particular color filtered pixel (red, green or blue) should be and outputs this into raw data from the sensor data.  This is what happens for those of us who use PixInsight and execute the Debayer process.  There are several algorithms available in this process to use which are also called demosaicing methods (no, I did not make that up); the best of these methods to use most of the time is called VNG, or The Variable Number of Gradients methods.  This is the default setting for example with PixInsight’s Debayer process.

     

    BayerMatrixVNG.jpg.16bbb56f29e44259341b9cbc9189e828.jpg

     

    The key to using the Debayer process is that you should engage this process directly after you’ve calibrated and cosmetically corrected your image data.  Image calibration (bias, darks and flats with the light frames) is a pixel by pixel process.  Each pixel is compared to and manipulated with each of the calibration frames.  If we used the Debayer process before we did any calibration, the interpolation done by the Debayering algorithm would ruin our ability to do image calibration.

    After debayering your sub exposures, you will continue processing your data as normal to register / align your data and then use image integration to stack them.  After that, it’s on to getting that first look at what you’ve captured and then on to post processing the data.


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...

Important Information

By using this site you agree to our Guidelines