Products & Services Solutions Academia Support User Community Company

Learn more about Image Processing Toolbox   

ycbcr2rgb - Convert YCbCr color values to RGB color space

Syntax

rgbmap = ycbcr2rgb(ycbcrmap)
RGB = ycbcr2rgb(YCBCR)

Description

rgbmap = ycbcr2rgb(ycbcrmap) converts the YCbCr values in the colormap ycbcrmap to the RGB color space. If ycbcrmap is M-by-3 and contains the YCbCr luminance (Y) and chrominance (Cb and Cr) color values as columns, rgbmap is returned as an M-by-3 matrix that contains the red, green, and blue values equivalent to those colors.

RGB = ycbcr2rgb(YCBCR) converts the YCbCr image YCBCR to the equivalent truecolor image RGB.

Class Support

If the input is a YCbCr image, it can be of class uint8, uint16, or double. The output image is of the same class as the input image. If the input is a colormap, the input and output colormaps are both of class double.

Examples

Convert image from RGB space to YCbCr space and back.

rgb = imread('board.tif');
ycbcr = rgb2ycbcr(rgb);
rgb2 = ycbcr2rgb(ycbcr);

See Also

ntsc2rgb, rgb2ntsc, rgb2ycbcr

For a full list of the toolbox color space conversion functions, see Color Space Conversions.

References

[1] Poynton, C. A.A Technical Introduction to Digital Video, John Wiley & Sons, Inc., 1996, p. 175.

[2] Rec. ITU-R BT.601-5, Studio Encoding Parameters of Digital Television for Standard 4:3 and Wide-screen 16:9 Aspect Ratios, (1982-1986-1990-1992-1994-1995), Section 3.5.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS