The relationship between YUV and pixel values

Source: Internet
Author: User

What are the basic elements of a color image?

To put it bluntly, the basic thing that an image includes is binary data, and its capacity size is essentially the number of binary data. A YUV422 image of 1920x1080 pixels, the size of 1920x1080x2=4147200 (decimal), which is 3.95M in size. This size is related to the number of pixels and the storage format of the data. The following describes the relationship between YUV and pixels:

The relationship between YUV and pixels:

YUV is the use of a luminance (Y), two chromatic aberration (u,v) to replace the traditional RGB three colors to compress the image. The traditional RGB primary colors use red, green, and blue to represent a single pixel, and each primary color occupies one byte (8bit), so a pixel with RGB representation requires 8*3=24bit. If you use YUV to represent this pixel, assume that the YUV sample rate is: 4:2:0, that is, each pixel has a sampling frequency of 1 for luminance Y, and for chromatic aberration U and V, each of the adjacent two pixels takes one u and v. For a single pixel, the chromatic aberration U and V are sampled at half the luminance. If there are three adjacent pixels, if the RGB primary color is represented, then the total need to occupy: 8*3*3=72bits; if YUV (4:2:0) is used, it only needs to occupy: 8*3 (Y) + 8*3*0.5 (U) +8*3*0.5 (V) = 36bits. Only the original half of the space, you can represent the original image, the data rate is compressed one times, and the effect of the image has not changed.

A picture, y,u,v each has 8BIT,RGB is also each component value is 8 bits, RGB is all sampling, YUV422 sampling is every pixel point y sampling, UV is in turn sampling. Yu,yv,yv,yv

y=100%,u=50%,v=50%

YUV420 sampling is yu,y,yu,y,yv,y,yv,y in other words 420, which is the pixel value of 4, y=100%,u/v=50%

The relationship between YUV and pixel values

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.