MATLAB: Does MATLAB read a picture and add noise on it

image processing

Hi,
I typed in matlab the following command:
x=imread('pic.gif')
imshow(x);
I would expect that the output image look exactly like the one MATLAB read. However, it didn't happen. MATLAB gave an output that looked like the original one, but with a lot of noise… My question is why don't I get exactly the same image?

Best Answer

Hi,
your image is an indexed image, not RGB. Therefore you need to read the colormap as well:
[a,b] = imread('pic.gif');
imshow(a);
colormap(b);
Titus