<< rgb2hsv SIP - Scilab Image Processing Toolbox rgbplot >>

SIP - Scilab Image Processing Toolbox >> SIP - Scilab Image Processing Toolbox > hsv2ntsc

hsv2ntsc

Converts from RGB to YIQ colorspace

Calling Sequence

YIQ = rgb2ntsc(RGB)

Parameters

RGB
A RGB image (M x N x 3) in 0-1 range or a RGB colormap (M x 3) in 0-1 range
YIQ
A YIQ image (M x N x 3) in 0-1 range or a YIQ colormap (M x 3) in 0-1 range

Description

rgb2ntsc(RGB) converts an RGB image or colormap from RGB to YIQ colorspace. The YIQ model is used in NTSC and European TV's. It is useful for b&w and color compatibility, since the cromaticity (I and Q) and luminance (Y) are conveniently isolated. rgb2ntsc(RGB) uses the following operation to convert each RGB triplet:

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

Examples

initial_dir = PWD;
chdir (SIPDIR + 'images');

rgb = imread('tru.jpg');     // RGB colorspace, 0-1 range
imshow(rgb);
yiq = rgb2ntsc(rgb);      // YIQ colorspace, 0-1 range
yiq(:,:,2) = yiq(:,:,2) /4; // Decrease chromaticity
yiq(:,:,3) = yiq(:,:,3) /4;
rgb = ntsc2rgb(yiq);
imshow(rgb);

chdir(initial_dir);

Authors

Availability

The latest version of SIP can be found at

http://siptoolbox.sf.net

See Also


<< rgb2hsv SIP - Scilab Image Processing Toolbox rgbplot >>