Image Processing Toolbox User's Guide Previous page   Next Page
ycbcr2rgb

Convert YCbCr values to RGB color space

Syntax

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, then 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.

Remarks

The YUV color space used by many video devices is similar, but not identical, to the YCbCr color space. If you need to convert YUV data to the RGB color space, try the ycbcr2rgb function.

Example

Convert image from RGB space to YCbCr space and back.

See Also

ntsc2rgb, rgb2ntsc, rgb2ycbcr

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


Previous page  xyz2uint16 zoom Next page

© 1994-2005 The MathWorks, Inc.