Image Processing Toolbox    
rgb2ycbcr

Convert RGB values to YCbCr color space

Syntax

Description

ycbcrmap = rgb2ycbcr(rgbmap) converts the RGB values in rbgmap 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


  rgb2ntsc rgbplot