Navigation

Operators and Keywords

Function List:

C++ API

: yiq_map = rgb2ntsc (rgb_map)
: yiq_img = rgb2ntsc (rgb_img)

Transform a colormap or image from red-green-blue (RGB) color space to luminance-chrominance (NTSC) space. The input may be of class uint8, uint16, single, or double. The output is of class double.

Implementation Note: The reference matrix for the transformation is

/Y\     0.299  0.587  0.114  /R\
|I| =  0.596 -0.274 -0.322  |G|
\Q/     0.211 -0.523  0.312  \B/

as documented in http://en.wikipedia.org/wiki/YIQ and truncated to 3 significant figures. Note: The FCC version of NTSC uses only 2 significant digits and is slightly different.

See also: ntsc2rgb, rgb2hsv, rgb2ind.

Package: octave