Understanding YUV data formats

Last Revision Date: 7/3/2015

This article explains the basics of YUV image data structure and transmission. 

Many of our color camera models support the transmission of images in a YUV color encoding scheme. This scheme assigns both brightness and color values to each pixel. In YUV, ‘Y’ represents the brightness, or ‘luma’ value, and ‘UV’ represents the color, or ‘chroma’ values. In contrast, the values of the RGB encoding scheme represent the intensities of red, green and blue channels in each pixel.

Each unique Y, U and V value comprises 8 bits, or one byte, of data. Where supported, our color camera models allow YUV transmission in 24-, 16-, and 12-bit per pixel (bpp) format.  In 16 and 12 bpp formats, the U and V color values are shared between pixels, which frees bandwidth and may increase frame rate. Known as “chroma subsampling,” this technique takes into account the human eye’s greater sensitivity to variations in brightness than in color.

Our cameras support YUV444, YUV422 and YUV411 data formats.

YUV444 Data Format

The YUV444 data format transmits 24 bits per pixel. Each pixel is assigned unique Y, U and V values—1 byte for each value, making it the most straightforward format to understand.

The bytes are ordered in the image in the following manner, where Y, U, V represent a single byte of color or brightness value, and  0, 1, 2… represent the pixel numbers associated with those values: 

U0 Y0 V0 U1 Y1 V1 U2 Y2 V2…

This order results in the following data structure for each pixel:

Pixel Number Pixel Values
0 U0Y0V0
1 U1Y1V1
2 U2Y2V2
... ...

 

YUV422 Data Format

The YUV422 data format shares U and V values between two pixels. As a result, these values are transmitted to the PC image buffer only once for every two pixels, resulting in an average transmission rate of 16 bits per pixel.

The bytes are ordered in the image in the following manner:

U0 Y0 V0 Y1 U2 Y2 V2 Y3 U4 Y4 V4…

This order results in the following data structure for each pixel:

Pixel Number Pixel Values
0 0Y0V0
1 U0Y1V0
2 U2Y2V2
3 U2Y3V2
4 U4Y4V4
... ...

 

YUV411 Data Format

The YUV411 format shares U and V values between four pixels, resulting in an average transmission rate of 12 bits per pixel.

The image bytes are ordered in the following manner:

U0 Y0 Y1 V0 Y2 Y3 U4 Y4 Y5 V4 Y6 Y7… 

This order results in the following data structure for each pixel:

Pixel Number Pixel Value
0 U0Y0V0
1 U0Y1V0
2 U0Y2V0
3 U0Y3V0
4 U4Y4V4
5 U4Y5V4
6 U4Y6V4
7 U4Y7V4
... ...
相关文章