Using a Demosaicing Process to Achieve True Color Images

When it comes to digital imaging, capturing true and precise color has always been a major issue. While monochrome sensors are capable of determining the intensity of light, they tend to be rather agnostic to the color of light. As a result, a new technique was developed to determine the intensity of a certain color of light across individual pixels. In this technique, tiny filters of alternating color are placed over individual pixels utilizing a Bayer pattern, which includes alternating blue and green filters for odd-numbered rows of pixels and alternating green and red filters for even numbered rows of pixels (Figure 1).

Bayer filter

Figure 1. Bayer filter

The human eye is highly sensitive to green light, so 50% of the sensor is susceptible to this wavelength range. It must be noted that thin color filter array and other types of filter patterns also exist, however they are less common compared to the Bayer pattern.

Demosaicing Process

It is difficult to obtain a complete color image from a sensor that is only capable of capturing 25% of the blue light, 25% of the red light, and 50% of the green light in a scene displayed in a mosaic pattern. Demosaicing refers to the concept that causes this kind of effect and involves the assessment of the adjacent pixel readings to calculate the pixel’s missing colors. Linear interpolation provides the simplest approach. With regard to a green pixel, the adjacent red pixel values would normally be taken, and their mean value would be assigned to the red part of the green pixel. The same approach would also be applied to the adjacent blue pixels (Figure 2). Averaging the blue and red values in a 5 x 5 square that encloses the green pixel presents a more complicated method. This provides a more precise picture of what the blue and red values should be (Figure 3).

Linear interpolation

Figure 2. Linear interpolation

5 x 5 pixel averaging

Figure 3. 5 x 5 pixel averaging

Image Artifacts

Although such techniques work quite well, they are affected by image artifacts that did not exist in the original scene. While it is possible to observe certain artifacts at the image’s native resolution, others exist in finer image details, and need to be magnified to become visible. One of these image artifacts is called false coloring, this is where colors that were not present in the actual scene are seen as a result of interpolation errors around an object’s edges, or where there is a rapid color change (Figure 4).

False coloring

Figure 4. False coloring

Moiré effect is an analogous artifact, where a pattern of high frequency like a striped shirt develops a fresh pattern with curved and twists lines. This occurs when the interpolation technique is utilized (Figure 5).

A striped shirt develops a new pattern that has twists and curved lines.

Figure 5. A striped shirt develops a new pattern that has twists and curved lines.

Zippering is the third artifact, which causes lines to blur while the demosaicing algorithm averages the values around an object’s edges. When this effect is magnified, it becomes obvious by the zipper or staircase pattern which occurs along the edge of the object (Figure 6).

Staircase or zipper pattern that appears along the edge.

Figure 6. Staircase or zipper pattern that appears along the edge.

Conclusion

A proprietary algorithm, used by all Lumenera cameras, was designed by Lumenera engineers who have the required expertise to carry out the demosaicing of raw data produced by the color image sensor. Depending on the preferred speed of the application, there is a choice of five demosaicing modes. Users opting for the higher quality demosaicing algorithm of the camera will obtain improved color sharpness and precision in the image without any false colors or zippering. This enables Lumenera to develop a variety of scientific and industrial-grade cameras that can create precise color depiction in images for inspection purposes in the life sciences and machine vision sectors.

This information has been sourced, reviewed and adapted from materials provided by Lumenera Corporation.

For more information on this source, please visit Lumenera Corporation.

Citations

Please use one of the following formats to cite this article in your essay, paper or report:

  • APA

    Teledyne Lumenera. (2019, August 21). Using a Demosaicing Process to Achieve True Color Images. AZoOptics. Retrieved on September 19, 2019 from https://www.azooptics.com/Article.aspx?ArticleID=1097.

  • MLA

    Teledyne Lumenera. "Using a Demosaicing Process to Achieve True Color Images". AZoOptics. 19 September 2019. <https://www.azooptics.com/Article.aspx?ArticleID=1097>.

  • Chicago

    Teledyne Lumenera. "Using a Demosaicing Process to Achieve True Color Images". AZoOptics. https://www.azooptics.com/Article.aspx?ArticleID=1097. (accessed September 19, 2019).

  • Harvard

    Teledyne Lumenera. 2019. Using a Demosaicing Process to Achieve True Color Images. AZoOptics, viewed 19 September 2019, https://www.azooptics.com/Article.aspx?ArticleID=1097.

Ask A Question

Do you have a question you'd like to ask regarding this article?

Leave your feedback
Submit