IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.
Color pixel formats hold red, green and blue information for each pixel, typically derived through debayering a RAW image. This means, that each pixel needs (at least) three times the bit depth as the RAW format with the same bit depth.
Debayered pixel formats are required for image processing or image display. The names of these pixel formats start either with "RGB" or with "BGR", indicating the order of the color values, followed by an "a" for alpha channel holding the opacity of the pixel (optional), the bit depth ("8", "10", "12") and the optional packed indicator ("p").
The pixels are read out channel-wise, then row-wise left to right, then top to bottom.
Fig. 32: Indexing of color Pixelformats at the example of RGBa
Data representation of debayered pixel formats
•RGB8, BGR8, RGBa8, BGRa8
Color pixel formats with a bit depth of 8 bit are byte aligned. Each color value ("R", "G", "B", "a") of the pixel fills exactly one byte. With RGB8 and BGR8 a pixel needs 3 byte = 24 bit in total. Adding an alpha channel for RGBa8 and BGRa8, the pixel's size increases to 4 byte = 32 bit.
The second pixel row starts in byte 3n or 4n respectively.
•RGB10, BGR10, RGB12, BGR12, RGBa10, BGRa10, RGBa12, BGRa12
Color pixel formats with a bit depth of 10 or 12 bit need two bytes for each color value ("R", "G", "B", "a"), leaving 6 or 4 bits of every second byte unused. With RGB10, BGR10, RGB12 or BGR12 a pixel needs 6 byte = 48 bit in total. Adding an alpha channel, the size of RGBa10, BGRa10, RGBa12 and BGRa12 the pixel's size increases to 8 byte = 64 bit.
The second pixel row starts with byte 6n or 8n respectively.
•RGB10p32, BGR10p32
With the packed 10 bit formats RGB10p32 and BGR10p32, the unused bits are reduced to only 2 out of 32 total bits. This means the data is much denser packed but the alignment gets lost. RGB10p32 and BGR10p32 need 4 byte = 32 bits for each pixel.
The second pixel row starts with byte 4n.
Fig. 33: Data representation of color pixel formats at the example of RGB/RGBa channels
Pixel format |
Type |
Channels |
Bit depth |
Unused Bits* |
Packed |
Grouped |
Data size per pixel |
2nd row starting with byte |
---|---|---|---|---|---|---|---|---|
RGB8 |
Color |
RGB |
8 |
- |
- |
- |
3 byte = 24 bit |
3n |
RGB10 |
Color |
RGB |
10 |
18 of 48 |
n |
- |
6 byte = 48 bit |
6n |
RGB12 |
Color |
RGB |
12 |
12 of 48 |
n |
- |
6 byte = 48 bit |
6n |
RGB10p32 |
Color |
RGB |
10 |
4 of 32 |
y |
n |
4 byte = 32 bit |
4n |
BGR8 |
Color |
BGR |
8 |
- |
- |
- |
3 byte = 24 bit |
3n |
BGR10 |
Color |
BGR |
10 |
18 of 48 |
n |
- |
6 byte = 48 bit |
6n |
BGR12 |
Color |
BGR |
12 |
12 of 48 |
n |
- |
6 byte = 48 bit |
6n |
BGR10p32 |
Color |
BGR |
10 |
4 of 32 |
y |
n |
4 byte = 32 bit |
4n |
RGBa8 |
Color |
RGB + Alpha |
8 |
- |
- |
- |
4 byte = 32 bit |
4n |
RGBa10 |
Color |
RGB + Alpha |
10 |
24 of 64 |
n |
- |
8 byte = 64 bit |
8n |
RGBa12 |
Color |
RGB + Alpha |
12 |
16 of 64 |
n |
- |
8 byte = 64 bit |
8n |
BGRa8 |
Color |
BGR + Alpha |
8 |
- |
n |
- |
4 byte = 32 bit |
4n |
BGRa10 |
Color |
BGR + Alpha |
10 |
24 of 64 |
n |
- |
8 byte = 64 bit |
8n |
BGRa12 |
Color |
BGR + Alpha |
12 |
16 of 64 |
n |
- |
8 byte = 64 bit |
8n |
* Alpha channel bits are not considered as "unused".