I = ind2gray(X,map) converts the image X with colormap map to a grayscale image I. ind2gray removes the hue and saturation information from the input image while retaining the luminance.Note: A grayscale image is also called a gray-scale, gray scale, or gray-level image.
I = ind2gray(X,map)
load trees I = ind2gray(X,map); imshow(X,map) figure,imshow(I)