Colormap and GIF images in Matlab -
i have problem understanding colormaps in matlab , using them import , diplay .gif images.
i import image using im = imread('i.gif') , display using imshow(im) result wrong
if [im,map] = imread('i.gif') , display using imshow(im,map) works properly, still don't understand need of colormap
is there way import , convert gif image greyscale when imshow(im) shows correct greyscale image without having worry colormap?
sorry noob question starting image processing in matlab , appreciate help. first question! :)
bye , thanks!
if want convert gif grayscale, use ind2gray:
[im,map] = imread('i.gif'); imgray = ind2gray(im,map);
the reason need colormap gif format doesn't store image intensities, stores indices colormap. color 0
red or green or light shade of mauve. it's colormap stores actual rgb colors image needs. ind2gray
take each of colors, convert them grayscale intensity, , replace indices in image intensities.
Comments
Post a Comment