|
True, you don't have to start with one - you can create one from the
color image. To get a single-valued image (monochrome, or monochrome
with a colormap which MATLAB called "indexed"), you can do one of
several things, for example
monoImage = rgb2gray(rgbImage); % Use weighted average
[monoImage colorMap] = rgb2ind(rgbImage, n); % convert to mono and try
to come up with best guess at colormap.
monoImage = rgbImage(:,:,1); % Take the red channel (or green or blue)
Or some other custom way. Then you can display this monochrome image
with a color map using
imshow(monoImage, colorMap);
Then you can try to mess around with the colormap using Edit->Colormpa
from the figure's pulldown menu.
|