AW00089317000 Color Creation and Enhancement
Basler ace GigE 167
8.1.2 Pixel Data Formats Available on Cameras with a
Bayer Filter
Bayer Formats
Depending on the camera model the cameras equipped with a Bayer pattern color filter can output
pixel data in the pixel data formats shown in the tables in Section 1.2 on page 2.
When a color camera is set for one of these pixel data output formats, the pixel data is not
processed or interpolated in any way. For each pixel covered with a red portion of the filter, you get
8 or 12 bits of red data. For each pixel covered with a green portion of the filter, you get 8 or 12 bits
of green data. And for each pixel covered with a blue portion of the filter, you get 8 or 12 bits of blue
data. (This type of pixel data is sometimes referred to as "raw" output.)
YUV Formats
All color cameras with a Bayer filter can output pixel data in YUV 4:2:2 Packed format or in YUV
4:2:2 (YUYV) Packed format.
When a color camera is set for either of these formats, each pixel in the captured image goes
through a two step conversion process as it exits the sensor and passes through the camera’s
electronics. This process yields Y, U, and V color information for each pixel.
In the first step of the process, a demosaicing algorithm is performed to get RGB data for each pixel.
This is required because color cameras with a Bayer filter on the sensor gather only one color of
light for each individual pixel.
The second step of the process is to convert the RGB information to the YUV color model. The
conversion algorithm uses the following formulas:
Y = 0.30 R + 0.59 G + 0.11 B
U = - 0.17 R - 0.33 G + 0.50 B
V = 0.50 R - 0.41 G - 0.09 B
Once the conversion to a YUV color model is complete, the pixel data is transmitted to the host PC.
Mono Format
Cameras equipped with a Bayer pattern color filter can output pixel data in the Mono 8 format.
When a color camera is set for Mono 8, the pixel values in each captured image are first
demosaiced and converted to the YUV color model as described above. The camera then transmits
the 8 bit Y value for each pixel to the host PC. In the YUV color model, the Y component for each
pixel represents a brightness value. This brightness value can be considered as equivalent to the
value that would be sent from a pixel in a monochrome camera. So in essence, when a color
camera is set for Mono 8, it outputs an 8 bit monochrome image. (This type of output is sometimes
referred to as "Y Mono 8".)