Digital Signal Processing Reference
In-Depth Information
This processing is called the Bayer to RGB conversion, or Bayer
demosaicing, and it is the key standard function required in
a sensor processing-signal chain. This is also the most complex
when implemented using a multi-tap filter.
Referring back to our discussion of video scaling, when you
don't have the pixel data, you must create it, not randomly
through guesswork, but in an informed manner by looking at the
data from the neighboring pixels (see Chapter 5 for details).
The simplest way would be to just copy the color plane values
from the pixel that is the nearest and hope for the best. A second
way would be to take an average of the neighboring pixels (see
Figure 8.3 ).
In this figure focus on the center pixel: we will be looking at
ways to calculate the missing color information for this pixel.
The figure shows four possible cases. In the first two cases the
center pixel has only a green value and in the next two cases the
center value has either the blue color information or the red color
information.
In (a) and (b), the red and the blue color planes can be calcu-
lated by taking the average of the neighboring pixels. In (c) and (d),
since there are four neighboring green pixels and four neighboring
blue pixels, the missing color plane can be calculated as:
(G1
G2
G3
G4) / 4 OR (B1
B2
B3
B4) / 4
þ
þ
þ
þ
þ
þ
Figure 8.3. Interpolating to get the RGB value for each pixel.
Search WWH ::




Custom Search