Hello, I have a grayscale TIF images (although it says it is TrueColor, nevermind). I need to convert them to grayscale and save it as it appears in imagesc(), colormap(jet) i.e. color picture.
Matlab code I use:
N = 4FNAMEFMT = 'Frame%d.tif';% Load imagesfor i=1:NIMAGES = imread(sprintf(FNAMEFMT, i));IMAGES = rgb2gray(IMAGES);fname = sprintf('%s\\Frame%d.tif','C:\Project',i);imagesc(IMAGES); axis image; colorbar; colormap(jet);imwrite(IMAGES, fname, 'tif');end
The pictures I import to MATLAB looking like that: http://img845.imageshack.us/img845/531/frame1m.png
And I need to save them looking like that: http://img850.imageshack.us/img850/5444/printscreenl.jpg
But the code I provided saves them again as black/white/gray.