NTSC2RGB(1)

NAME
ntsc2rgb - converts from YIQ to RGB colorspace

SYNOPSIS
RGB = ntsc2rgb(YIQ)

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
ntsc2rgb(YIQ) converts an YIQ image or colormap from YIQ to RGB 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. ntsc2rgb(YIQ) uses the following operation to convert each YIQ triplet:

        ! R !   !  1.000  0.956    0.621   !   ! Y !
        ! G ! = !  1.000  -0.272   -0.647  ! * ! I !
        ! B !   !  1.000  -1.105   1.702   !   ! Q !

EXAMPLE
initial_dir = PWD;
chdir (SIPDIR + 'examples');
rgb = imread('tru.jpg');   // RGB colorspace 0-255
imshow(rgb*257);
yiq = rgb2ntsc(rgb);        // YIQ colorspace 0-255
yiq(:,:,2) = yiq(:,:,2) /4; // Decrease chromaticity
yiq(:,:,3) = yiq(:,:,3) /4;
rgb = ntsc2rgb(yiq);
imshow(rgb*257);
chdir(initial_dir);

AUTHORS
Ricardo Fabbri <rfabbri@if.sc.usp.br>

AVAILABILITY
The latest version of the Scilab Image Processing toolbox can be found at

    http://cyvision.if.sc.usp.br/~rfabbri/sip/

SEE ALSO
rgb2ntsc, im2gray