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

Convert RGB values to YCbCr color space

Syntax

Description

ycbcrmap = rgb2ycbcr(rgbmap) converts the RGB values in rgbmap to the YCbCr color space. ycbcrmap is an m-by-3 matrix that contains the YCbCr luminance (Y) and chrominance (Cb and Cr) color components as columns. Each row represents the equivalent color to the corresponding row in the RGB colormap.

YCBCR = rgb2ycbcr(RGB) converts the truecolor image RGB to the equivalent image in the YCbCr color space.

Class Support

If the input is an RGB 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.

See Also

ntsc2rgb, rgb2ntsc, ycbcr2rgb

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


Previous page  rgb2ntsc rgbplot Next page

© 1994-2005 The MathWorks, Inc.