
4CXP Camera
Bayer Pattern
page 66 of 70
MIKROTRON GmbH
Bayer Color Filter
The sensor glass lid of Eo
Sens
color cameras are covered with a Bayer color filter. To get the color
information the imaging software has to decode the information for one pixel to RGB by using the
values of its neighbor pixels. There are a lot of different Bayer color algorithms which differ in speed
and quality of the decoded image.
Bayer Pattern
The Bayern color filter of the 4CXP camera consists of small red, green and blue filter elements, each
covering exactly one pixel on the sensor. A matrix of 2 x 2 filter elements builds a filter element
matrix. The order and the color of the filter elements building a 2 x 2 filter matrix are always the
same. The image below shows the colors and the order of a filter matrix as used by our cameras.
Green
Red
Blue
Green
The sensor is completely covered by identical 2 x 2 filter matrix elements. As a result, the color
pattern of the first line of the matrix is repeated on each mod(2) pixel number in each even line
number. The color pattern of the second line is repeated on each (mod2) pixel in each odd line. This
means, 2 consecutive lines show exactly the same order of Bayer pattern elements.
Green
Red
Green
Red
•••
Blue
Green
Blue
Green
•••
Green
Red
Green
Red
•••
Blue
Green
Blue
•••
•••
Because of the size and the order of a filter matrix element three facts can be concluded:
Any (sub) region of a Bayer pattern coded image has always to start with the same
color on the top left (0/0) pixel position of the region.
A Bayer pattern image has to have an even number of pixels and an even number of
lines.
Changing the image size can only be done by steps of 2 in the horizontal
and
in the
vertically direction.