The National Television Systems Committee (NTSC) defines a color space known as YIQ. This color space is used in televisions in the United States. One of the main advantages of this format is that grayscale information is separated from color data, so the same signal can be used for both color and black and white sets.
In the NTSC color space, image data consists of three components: luminance (Y), hue (I), and saturation (Q). The first component, luminance, represents grayscale information, while the last two components make up chrominance (color information).
For example, these commands convert an RGB image to NTSC format.
RGB = imread('peppers.png'); YIQ = rgb2ntsc(RGB);
Because luminance is one of the components of the NTSC format,
the RGB to NTSC conversion is also useful for isolating the gray level
information in an image. In fact, the toolbox functions
rgb2ntsc function to extract the grayscale
information from a color image.
For example, these commands are equivalent to calling
YIQ = rgb2ntsc(RGB); I = YIQ(:,:,1);
In the YIQ color space, I is one of the two color components, not the grayscale component.