User`s manual

Pixel Data Formats AW00089316000
198 Basler ace GigE
9.3.5 Bayer BG 12 Packed Format
When a color camera is set for the Bayer BG 12 Packed pixel data format, it outputs 12 bits of data
per pixel. Every three bytes transmitted by the camera contain data for two pixels.
With the Bayer BG 12 Packed coding, the pixel data is not processed or interpolated in any way.
So, for each pixel covered with a red filter, you get 12 bits of red data. For each pixel covered with
a green filter, you get 12 bits of green data. And for each pixel covered with a blue filter, you get 12
bits of blue data. (This type of pixel data is sometimes referred to as "raw" output.)
For more information about the Bayer filter, see Section 8.1 on page 155.
The tables below describe how the data for the even rows and for the odd rows of a received frame
will be ordered in the image buffer in your PC when the camera is set for Bayer BG12 Packed
output.
The following standards are used in the tables:
P
0
= the first pixel transmitted by the camera for a row
P
n
= the last pixel transmitted by the camera for a row
B
0
= the first byte of data for a row
B
m
= the last byte of data for a row
Even Rows
Byte Data
B
0
Blue value for P
0
bits 11 ... 4
B
1
Green value for P
1
bits 3 ... 0 Blue value for P
0
bits 3 ... 0
B
2
Green value for P
1
bits 11 ... 4
B
3
Blue value for P
2
bits 11 ... 4
B
4
Green value for P
3
bits 3 ... 0 Blue value for P
2
bits 3 ... 0
B
5
Green value for P
3
bits 11 ... 4
B
6
Blue value for P
4
bits 11 ... 4
B
7
Green value for P
5
bits 3 ... 0 Blue value for P
4
bits 3 ... 0
B
8
Green value for P
5
bits 11 ... 4

B
m-5
Blue value for P
n-3
bits 11 ... 4
B
m-4
Green value for P
n-2
bits 3 ... 0 Blue value for P
n-3
bits 3 ... 0
B
m-3
Green value for P
n-2
bits 11 ... 4
B
m-2
Blue value for P
n-1
bits 11 ... 4
B
m-1
Green value for P
n
bits 3 ... 0 Blue value for P
n-1
bits 3 ... 0
B
m
Green value for P
n
bits 11 ... 4