# Documentation

### This is machine translation

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

# rgb2ntsc

Convert RGB color values to NTSC color space

## Syntax

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

## Description

`yiqmap = rgb2ntsc(rgbmap)` converts the `m`-by-3 RGB values in `rgbmap` to NTSC color space. `yiqmap` is an `m`-by-3 matrix that contains the NTSC luminance (Y) and chrominance (I and Q) color components as columns that are equivalent to the colors in the RGB colormap.

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

## Class Support

`RGB` can be of class `uint8`, `uint16`, `int16`, `single`, or `double`. `RGBMAP` can be `double`. The output is `double`.

## Examples

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.

```imshow(YIQ(:,:,1)); title('Luminance in YIQ Color Space');```

## Tips

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

`$\left[\begin{array}{c}Y\\ I\\ Q\end{array}\right]=\left[\begin{array}{rrr}\hfill 0.299& \hfill 0.587& \hfill 0.114\\ \hfill 0.596& \hfill -0.274& \hfill -0.322\\ \hfill 0.211& \hfill -0.523& \hfill 0.312\end{array}\right]\left[\begin{array}{c}R\\ G\\ B\end{array}\right]$`