Search code examples
matlabimage-processingcolor-mapping

Images not being displayed properly


I am working with MATLAB R2012b. I am trying to get 7 images to display on one figure but I can get the image that MATLAB to displays to look exactly like the original file. I set the color map to gray in hopes that you make it look the same but no its still different. I have included both the original and what I get from MATLAB so you can see what is happening.

Here is my code:

w8 = imread('Winter8','jpg');
subplot(2,4,1), image(w8);
title('Winter8.jpg');
axis('off','image');
colormap('gray');
truesize;

And here are the images:

Orirginal:

Winter8Small.jpg Original

Result from MATLAB:

Winter8Small.jpg results from MATLAB

Thanks for you help.


Solution

  • imagesc seems to work better than image

    imagesc(w8);

    colormap('gray');