… for Codecs & Media

Tip #781: What is Debayering?

Larry Jordan – LarryJordan.com

Virtually all cameras only record partial images. Debayering is required to make them whole.

A camera sensor Bayer pattern (Image by en:User:Cburnett – Own work, CC BY-SA 3.0)

Topic $TipTopic

Debayering, or demosaicing, is a digital image process that reconstructs a complete image from the incomplete color samples recorded by virtually every video camera.

In this screen shot, notice that the camera records twice as many green pixels as either red or blue.

Wikipedia writes: Most modern digital cameras acquire images using a single image sensor overlaid with a color filter array (CFA). This has alternating red (R) and green (G) filters for odd rows and alternating green (G) and blue (B) filters for even rows. There are twice as many green filters as red or blue ones, catering to the human eye’s higher sensitivity to green light.

Since each pixel of the sensor is behind a color filter, the output is an array of pixel values, each indicating a raw intensity of one of the three filter colors. (The camera sensor itself only captures luminance data.) Thus, an algorithm is needed to estimate for each pixel the color levels for all color components, rather than a single component. Demosaicing is part of the processing required to render these grayscale images into a viewable image.

EXTRA CREDIT

Many modern digital cameras can also save images in a raw format allowing the user to demosaic them using software, rather than using the camera’s built-in firmware.

Here’s a Wikipedia article to learn more.


Please rate the helpfulness of this tip.

Click on a star to rate it!

0 Comments

Leave a Comment

Want to join the discussion?
Feel free to contribute!
All comments are moderated.

Leave a Reply

Your email address will not be published. Required fields are marked *