Color Format Conversion between RGB, YUV, YCbCr and YPbPr (original) (raw)

| | | | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | | | | | | | | | | | | | | This page contains the different equations for converting one of the luminance / chrominance based color formats (YUV, YCbCr and YPbPr) into the RGB color format and vice versa. YUV - RGB Color Format Conversion YCbCr - RGB Color Format Conversion YPbPr - RGB Color Format Conversion See also the color format page to get basic information about the different color formats. | | | | | | | | | | | | | | | | YUV - RGB Color Format Conversion The YUV color format is used only for analog PAL or analog NTSC video - not for any digital video format. The following equation describes the conversion of an RGB color into the YUV color format: RGB to YUV color conversion for analog TV This is the inverse matrix to get the RGB components out of the YUV color: YUV to RGB color conversion for analog TV | | | | | | | | | | | | | | | | YCbCr - RGB Color Format Conversion For digital component video the color format YCbCr is used. For standard definition TV applications (SDTV) the following equation describes the color conversion from RGB to YCbCr (according to ITU-R BT.601): RGB to YCbCr color conversion for SDTV To recover an RGB color from a YCbCr color, the following inverse matrix is used: YCbCr to RGB color conversion for SDTV The possible range of values for chrominance and luminance reserves some footroom and headroom, which is necessary to provide some space for overshooting, e.g. in combination with analog video equipment. For computer based applications using RGB and YCbCr color formats, in many cases the complete possible range of 8 bit is used, without providing a footroom or headroom. Typically, this full-range color format is used for JPEG images. The conversion of RGB colors into full-range YCbCr colors is described by the following equation: RGB to full range YCbCr color conversion The other way round, to convert a full-range YCbCr color into RGB is described by the following equation: Full range YCbCr to RGB color conversion For high definition TV (HDTV), different coefficients are used. The possible range of values is identical to the SDTV, to provide the necessary footroom and headroom. The following equation describes the color conversion from RGB to YCbCr for HDTV (according to ITU-R BT.709): RGB to YCbCr color conversion for HDTV This is the corresponding inverse matrix to get the RGB color components out of a YCbCr color: YCbCr to RGB color conversion for HDTV | | | | | | | | | | | | | | | | YPbPr - RGB Color Format Conversion The following equations describe the conversion from RGB to YPbPr color format for component analog video and vice versa. Again, different coefficients are used for SDTV and HDTV. In case of SDTV, for converting RGB to YPbPr, the following matrix is used: RGB to YPbPr color conversion for SDTV This is the inverse matrix to recover an RGB value from a given YPbPr value: YPbPr to RGB color conversion for SDTV In case of HDTV, for converting RGB to YPbPr, the following matrix is used: RGB to YPbPr color conversion for HDTV Finally, this is the inverse matrix: YPbPr to RGB color conversion for HDTV | | | | | | | | | | | | | | | | MPEG-2, H.264, WMV and Flash video test sequences for all relevant PAL, NTSC and HDTV video formats Test your product with professional video test files! equasys Video Test Collection MPEG-2, H.264, WMV and Flash video test sequences for all relevant PAL, NTSC and HDTV video formats. | | | | | | | | | | | | | | | | Further Information The following links provide additional information about colors and color conversion: Charles Poynton: Color FAQ - Frequently Asked Questions Color David Hilbert: A Glossary of Color Science More basic information concerning image and video formats can be found in the section Technical Infos. | | | | | | | | | | | | The technical information given on this website is subject of the Terms of Use. | | | | Copyright © 2011 - equasys GmbH | |