| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Image Processing Toolbox |
| Contents | Index |
| Learn more about Image Processing Toolbox |
rgbmap = ycbcr2rgb(ycbcrmap)
RGB = ycbcr2rgb(YCBCR)
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.
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.
Convert image from RGB space to YCbCr space and back.
rgb = imread('board.tif');
ycbcr = rgb2ycbcr(rgb);
rgb2 = ycbcr2rgb(ycbcr);For a full list of the toolbox color space conversion functions, see Color Space Conversions.
[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.
![]() | xyz2uint16 |

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 |