Image Processing Toolbox Previous page   Next Page
ind2gray

Convert an indexed image to an intensity image

Syntax

Description

I = ind2gray(X,map) converts the image X with colormap map to an intensity image I. ind2gray removes the hue and saturation information from the input image while retaining the luminance.

Class Support

X can be of class uint8, uint16, or double. I is of class double.

Example

Algorithm

ind2gray converts the colormap to NTSC coordinates using rgb2ntsc, and sets the hue and saturation components (I and Q) to zero, creating a gray colormap. ind2gray then replaces the indices in the image X with the corresponding grayscale intensity values in the gray colormap.

See Also

gray2ind, imshow, rgb2ntsc


Previous page  imwrite ind2rgb Next page

Learn more about the latest releases of MathWorks products:

 © 1994-2010 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS