IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.
The names of RAW Bayer pixel formats start with the Color filter (Bayer filter) (e.g. BayerRG), followed by the bit depth ("8", "10", "12") and the optional packed indicator ("p").
The pixels are read out row-wise left to right, then top to bottom.
Fig. 29: Indexing of a RAW Bayer image with n columns and m rows, readout sequence row-wise left to right, then top to bottom
Fig. 30: Differences between BayerRG, BayerGR, BayerBG, and BayerGB
Data representation of RAW Bayer pixel formats
•BayerRG8, BayerGR8, BayerBG8, BayerGB8
RAW Bayer pixel formats with a bit depth of 8 bit are byte aligned. Each pixel fills exactly one byte. The second pixel row starts in byte n.
•BayerRG10, BayerGR10, BayerBG10, BayerGB10, BayerRG12, BayerGR12, BayerBG12, BayerGB12
RAW Bayer unpacked pixel formats with bit depth of 10 or 12 bit need two bytes for each pixel, where 6 or 4 bits of every second byte are unused. The second pixel row starts in byte 2n.
•BayerRG10p, BayerGR10p, BayerBG10p, BayerGB10p, BayerRG12p, BayerGR12p, BayerBG12p, BayerGB12p
With the packed formats, there are no such empty bits. Each pixel starts directly after the other. This means that the alignment gets lost, but data is much denser packed. For example, a "BayerRG10p" packed image needs only 1.25 bytes per pixel, whereas a "BayerRG10" unpacked image needs 2 bytes per pixel. A "BayerRG12p" packed images needs 1.5 bytes per pixel, compared to 2 bytes per pixel for a "BayerRG12" unpacked image.
Fig. 31: Data representation of Bayer RAW PixelFormats at the example of a BayerRG pattern
Pixel format |
Type |
Pixel color filter |
Bit depth |
Unused bits |
Packed |
Grouped |
Data size per pixel |
2nd row starting with byte |
---|---|---|---|---|---|---|---|---|
BayerRG8 |
RAW Bayer |
BayerRG |
8 |
- |
- |
- |
1 byte = 8 bit |
n |
BayerRG10 |
RAW Bayer |
BayerRG |
10 |
6 of 16 |
n |
n |
2 byte = 16 bit |
2n |
BayerRG12 |
RAW Bayer |
BayerRG |
12 |
4 of 16 |
n |
n |
2 byte = 16 bit |
2n |
BayerRG10p |
RAW Bayer |
BayerRG |
10 |
- |
y |
n |
1.25 byte = 10 bit |
5n/4 |
BayerRG12p |
RAW Bayer |
BayerRG |
12 |
- |
y |
n |
1.5 byte = 12 bit |
3n/2 |
BayerRG10g40* |
RAW Bayer |
BayerRG |
10 |
- |
y |
y |
1.25 byte = 10 bit |
5n/4 |
BayerRG12g24* |
RAW Bayer |
BayerRG |
12 |
- |
y |
y |
1.5 byte = 12 bit |
3n/2 |
BayerGR8 |
RAW Bayer |
BayerGR |
8 |
- |
- |
- |
1 byte = 8 bit |
n |
BayerGR10 |
RAW Bayer |
BayerGR |
10 |
6 of 16 |
n |
n |
2 byte = 16 bit |
2n |
BayerGR12 |
RAW Bayer |
BayerGR |
12 |
4 of 16 |
n |
n |
2 byte = 16 bit |
2n |
BayerGR10p |
RAW Bayer |
BayerGR |
10 |
- |
y |
n |
1.25 byte = 10 bit |
5n/4 |
BayerGR12p |
RAW Bayer |
BayerGR |
12 |
- |
y |
n |
1.5 byte = 12 bit |
3n/2 |
BayerGR10g40* |
RAW Bayer |
BayerGR |
10 |
- |
y |
y |
1.25 byte = 10 bit |
5n/4 |
BayerGR12g24* |
RAW Bayer |
BayerGR |
12 |
- |
y |
y |
1.5 byte = 12 bit |
3n/2 |
BayerBG8 |
RAW Bayer |
BayerBG |
8 |
- |
- |
- |
1 byte = 8 bit |
n |
BayerBG10 |
RAW Bayer |
BayerBG |
10 |
6 of 16 |
n |
n |
2 byte = 16 bit |
2n |
BayerBG12 |
RAW Bayer |
BayerBG |
12 |
4 of 16 |
n |
n |
2 byte = 16 bit |
2n |
BayerBG10p |
RAW Bayer |
BayerBG |
10 |
- |
y |
n |
1.25 byte = 10 bit |
5n/4 |
BayerBG12p |
RAW Bayer |
BayerBG |
12 |
- |
y |
n |
1.5 byte = 12 bit |
3n/2 |
BayerBG10g40* |
RAW Bayer |
BayerBG |
10 |
- |
y |
y |
1.25 byte = 10 bit |
5n/4 |
BayerBG12g24* |
RAW Bayer |
BayerBG |
12 |
- |
y |
y |
1.5 byte = 12 bit |
3n/2 |
BayerGB8 |
RAW Bayer |
BayerGB |
8 |
- |
- |
- |
1 byte = 8 bit |
n |
BayerGB10 |
RAW Bayer |
BayerGB |
10 |
6 of 16 |
n |
n |
2 byte = 16 bit |
2n |
BayerGB12 |
RAW Bayer |
BayerGB |
12 |
4 of 16 |
y |
n |
2 byte = 16 bit |
2n |
BayerGB10p |
RAW Bayer |
BayerGB |
10 |
- |
y |
n |
1.25 byte = 10 bit |
5n/4 |
BayerGB12p |
RAW Bayer |
BayerGB |
12 |
- |
y |
n |
1.5 byte = 12 bit |
3n/2 |
BayerGB10g40* |
RAW Bayer |
BayerGB |
10 |
- |
y |
y |
1.25 byte = 10 bit |
5n/4 |
BayerGB12g24* |
RAW Bayer |
BayerGB |
12 |
- |
y |
y |
1.5 byte = 12 bit |
3n/2 |
* The pixel format name is followed by "IDS", e. g. BayerGB10g40IDS. This pixel format is preliminary and its name and value may change in a future product version.