How can I convert a color image to grayscale in MATLAB?
I found this link: http://blogs.mathworks.com/steve/2007/07/20/imoverlay-and-imagesc/ it works.
it says:
im=imread('your image');
m=mat2gray(im);
in=gray2ind(m,256);
rgb=ind2rgb(in,hot(256));
imshow(rgb);
Use rgb2gray
to strip hue and saturation (ie, convert to grayscale). Documentation
x = imread('bla.jpg');
k = rgb2gray(x);
figure(1),imshow(k);