Quality of RGB – YUV – RGB conversion【转载】

Quality of RGB – YUV – RGB conversion

Breeze offers many variants of RGB-YUV-RGB color image conversion. It also includes tools and functions for visual estimation and for quantitative comparative measurements of image quality. Altogether those means help to select the optimal color conversion variants.

Direct RGB-YUV and inverse YUV-RGB color conversions are inherently, by their mathematical nature, inaccurate. After every round of direct or inverse conversion some color information is lost.

There are several sources of round-off errors in the RGB-YUV and YUV-RGB conversions themselves. Additional errors are introduced by the sub sampling chromas in the YUV color space. Color information is lost during down sampling from the original 4:4:4 YUV space to the YUV space with lower chroma density, as well as during the up sampling from the YUV space with lower chroma density to the 4:4:4 YUV space.

Loss of information during color image conversions depends on the structure of the image. Usually loss of color information per one round of conversion is relatively low. Only after several consecutive rounds of conversion color information degrades noticeably. But there exists a number of situations where a quality of image may degrade rather seriously during even one conversion operation. That is why it is important to choose carefully a type of RGB-YUV-RGB color conversion; it may help to avoid unnecessary loss of color information.

One popular, simple and reliable, method allowing to estimate quantitatively a quality of a color conversion is based on the measuring a value of PSNR (Peak Signal to Noise Ratio) between original RGB image and image produced by the circular direct/inverse conversion RGB-YUV-RGB. Conversion RGB-YUV-RGB is used if original image is in the RGB space. If original image is in the YUV space then a circular direct/inverse conversion YUV-RGB-YUV has to be used; also in this case the SNR (Signal to Noise Ratio) function may be a better quantitative metrics that PSNR.

Table 2 below shows values of PSNR (Peak Signal to Noise Ratio) for the circular direct/inverse RGB-YUV-RGB conversions supported by Breeze. Measurements are made for 5 RGB (Microsoft bitmap, 24 bit per pixel) images, shown in the Table 1, with the different geometrical and color structure:

  • Example 1: “Bird”, 640 x 480 pixels
  • Example 2: “Town”, 640 x 480 pixels
  • Example 3: “Lena”, 500 x 500 pixels
  • Example 4: “Portrait”, 640 x 480 pixels
  • Example 5: “Palms”, 640 x 480 pixels
Table 1. Tested images.
Example 1 Example 2 Example 3 Example 4 Example 5

 

Table 1. PSNR of a circular RGB-YUV-RGB color conversion.
Color format / Data Range / Sub sampling PSNR
Example 1
PSNR
Example 2
PSNR
Example 3
PSNR
Example 4
PSNR
Example 5
YCbCr 444 ITU601 8bit 0-255 53.10 52.91 52.96 53.02 52.94
YCbCr 444 ITU601 8bit 16-255 52.61 52.53 52.56 52.51 52.56
YCbCr 444 ITU601 8bit 16-235-240 52.15 52.13 52.12 52.07 52.12
YCbCr 422 ITU601 8bit 0-255 CosEven 46.52 40.99 38.27 49.65 27.43
YCbCr 422 ITU601 8bit 16-255 CosEven 46.38 40.96 38.23 49.34 27.43
YCbCr 422 ITU601 8bit 16-235-240 CosEven 46.22 40.92 38.23 49.06 27.43
YCbCr 422 ITU601 8bit 0-255 CosOdd 46.57 41.12 38.29 49.65 27.44
YCbCr 422 ITU601 8bit 16-255 CosOdd 46.43 41.09 37.27 49.33 27.45
YCbCr 422 ITU601 8bit 16-235-240 CosOdd 46.26 41.04 38.24 49.04 27.44
YCbCr 422 ITU601 8bit 0-255 Center 45.08 40.59 38.94 49.34 28.16
YCbCr 422 ITU601 8bit 16-255 Center 44.96 40.55 38.91 48.98 28.61
YCbCr 422 ITU601 8bit 16-235-240 Center 44.81 40.50 38.87 48.70 28.61
YCbCr 420 ITU601 8bit 0-255 CosEven 42.18 37.32 37.19 47.65 26.64
YCbCr 420 ITU601 8bit 16-255 CosEven 42.10 37.29 37.15 47.34 26.64
YCbCr 420 ITU601 8bit 16-235-240 CosEven 41.99 37.25 37.12 47.06 26.64
YCbCr 420 ITU601 8bit 0-255 CosOdd 42.20 37.37 37.20 47.66 26.65
YCbCr 420 ITU601 8bit 16-255 CosOdd 42.12 37.34 37.16 47.34 26.66
YCbCr 420 ITU601 8bit 16-235-240 CosOdd 42.00 37.31 37.14 47.07 26.65
YCbCr 420 ITU601 8bit 0-255 Center 41.73 37.17 37.35 47.65 27.25
YCbCr 420 ITU601 8bit 16-255 Center 41.66 37.14 37.32 47.33 27.25
YCbCr 420 ITU601 8bit 16-235-240 Center 41.56 37.11 37.29 47.04 27.25
YCbCr 444 ITU709 8bit 0-255 52.96 53.02 52.99 52.94 52.99
YCbCr 444 ITU709 8bit 16-255 52.56 52.60 52.57 52.64 52.56
YCbCr 444 ITU709 8bit 16-235-240 52.00 52.07 52.07 52.08 52.06
YCbCr 422 ITU709 8bit 0-255 CosEven 46.13 40.60 37.96 49.25 27.00
YCbCr 422 ITU709 8bit 16-255 CosEven 46.06 40.56 37.94 49.10 27.00
YCbCr 422 ITU709 8bit 16-235-240 CosEven 45.89 40.51 37.92 48.77 27.00
YCbCr 422 ITU709 8bit 0-255 CosOdd 46.17 40.74 37.97 49.25 27.04
YCbCr 422 ITU709 8bit 16-255 CosOdd 46.09 40.71 37.95 49.07 27.04
YCbCr 422 ITU709 8bit 16-235-240 CosOdd 45.91 40.66 37.93 48.77 27.04
YCbCr 422 ITU709 8bit 0-255 Center 44.73 40.22 38.59 48.89 28.20
YCbCr 422 ITU709 8bit 16-255 Center 44.67 40.17 38.56 48.73 28.20
YCbCr 422 ITU709 8bit 16-235-240 Center 44.53 40.12 38.53 48.42 28.20
YCbCr 420 ITU709 8bit 0-255 CosEven 41.87 36.96 36.86 47.18 26.22
YCbCr 420 ITU709 8bit 16-255 CosEven 41.83 36.92 36.84 47.03 26.22
YCbCr 420 ITU709 8bit 16-235-240 CosEven 41.73 36.88 36.80 46.75 26.22
YCbCr 420 ITU709 8bit 0-255 CosOdd 41.89 37.01 36.87 47.19 26.25
YCbCr 420 ITU709 8bit 16-255 CosOdd 41.84 36.98 36.84 47.03 26.25
YCbCr 420 ITU709 8bit 16-235-240 CosOdd 41.74 36.94 36.81 46.76 26.25
YCbCr 420 ITU709 8bit 0-255 Center 41.45 36.81 36.99 47.19 26.84
YCbCr 420 ITU709 8bit 16-255 Center 41.41 36.78 36.97 47.03 26.84
YCbCr 420 ITU709 8bit 16-235-240 Center 41.32 36.75 36.94 46.75 26.84

 

Table 2 shows that PSNR values for images 1, 2, 3, 4, 5 are changing consistently within sets of measurements made for each individual image (within vertical columns). Quality of RGB-YUV-RGB conversion is higher for the YUV 4:4:4 space, lower for 4:2:2 space and lowest for 4:2:0 space. The more chroma samples are excluded during sub sampling, the more color information is lost, the lower a quality of a final converted image; and vice versa.

For images 1, 2, 3 and 4 quality of converted images is rather high for all variants of RGB-YUV-RGB conversions, even when sub sampling 4:2:0 is applied.

In the case of image 5, values of PSNR for RGB-YUV-RGB 4:4:4 conversion is about 52.5. This value is very close to the similar ones for images 1, 2, 3 and 4. At this level of PSNR majority of the people can hardly notice any difference between original and converted image.

Values of PSNR for image 4 become much lower when sub sampling 4:2:2 and 4:2:0 is used. PSNR drops down to the level about 26.5 – 27.5. At that PSNR level difference between original and converted images is rather noticeable.

Quality of RGB – YUV – RGB conversion

来源: Quality of RGB – YUV – RGB conversion | DiscoveryBiz.Net

发表评论

电子邮件地址不会被公开。 必填项已用*标注