SIVP Toolbox
Last update : August, 2006

rgb2ntsc - Convert a RGB image to the equivalent NTSC image YIQ.

Calling Sequence

YIQ = rgb2ntsc(RGB)

Parameters

Description

rgb2ntsc convert a RGB image to the equivalent NTSC image YIQ using:

Y = 0.299*R + 0.587*G + 0.114*B
I = 0.596*R - 0.274*G - 0.322*B
Q = 0.212*R - 0.523*G - 0.311*B

Supported classes: INT8, UINT8, INT16, UINT16, INT32, DOUBLE. If RGB is not a double image, it will be converted to double image first in the procedure.

Examples


    RGB = imread('lena.png');
    YIQ = rgb2ntsc(RGB);
    RGB = ntsc2rgb(YIQ);
    imshow(RGB);

Authors

Shiqi Yu <shiqi.yu[at]gmail.com>
Ricardo Fabbri <ricardofabbri[at]users.sf.net>

Availability

The latest version of SIVP can be found at

http://sivp.sourceforge.net

See Also

rgb2gray,  mat2gray,  rgb2hsv,  hsv2rgb,  rgb2ycbcr,  ycbcr2rgb,  ntsc2rgb,