This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Convert RGB color values to NTSC color space


yiqmap = rgb2ntsc(rgbmap)
YIQ = rgb2ntsc(RGB)


yiqmap = rgb2ntsc(rgbmap) converts the RGB values in rgbmap to NTSC color space. rgb2ntsc returns in yiqmap the NTSC luminance (Y) and chrominance (I and Q) color components that are equivalent to the colors in RGB color space.


YIQ = rgb2ntsc(RGB) converts the truecolor image RGB to the equivalent NTSC image YIQ.


collapse all

This example shows how to convert an image from RGB to NTSC color space.

Read an RGB image into the workspace.

RGB = imread('board.tif');

Convert the image to YIQ color space.

YIQ = rgb2ntsc(RGB);

Display the NTSC luminance value, represented by the first color channel in the YIQ image.

title('Luminance in YIQ Color Space');

Input Arguments

collapse all

RGB color space values, specified as an c-by-3 array.

Data Types: double

RGB image, specified as an m-by-n-by-3 array.

Data Types: single | double | uint8 | uint16 | int16

Output Arguments

collapse all

NTSC color space values corresponding to the c colors in rgbmap, returned as an c-by-3 array. The three columns represent the luminance (Y) and chrominance (I and Q) components of each color.

Data Types: double

Image in NTSC color space, returned as an m-by-n-by-3 array.

Data Types: double


In the NTSC color space, the luminance is the grayscale signal used to display pictures on monochrome (black and white) televisions. The other components carry the hue and saturation information.

rgb2ntsc defines the NTSC components using


Introduced before R2006a