Prev: signal processing
Next: message authentication code
From: kees de Kapper on 2 Jun 2010 05:37 Hi All, for image viewing purposes I want to use the colormaps to alter image level and window. This works well using single channel (say gray-scale) images but not for multi-channel (say RGB) images. FYI, I don't bother the fact that images will look less realistic, but I can better focus on details using different level and window. In addition, the issue is similar also using the Edit->Colormap option in the figure window. Why is this and how can I solve that? Thanx, Kees
From: ImageAnalyst on 2 Jun 2010 07:57 You can't pseudocolor an image that's already color. You can only do that with monochrome images. To change the colors of a true color image you'd have to change the pixel values themselves in each of the color channels.
From: Walter Roberson on 2 Jun 2010 11:41 ImageAnalyst wrote: > You can't pseudocolor an image that's already color. You can only do > that with monochrome images. To change the colors of a true color > image you'd have to change the pixel values themselves in each of the > color channels. If you have an RGB (truecolor) image, you can, if you want, convert it to pseudocolor and work with it as an "indexed image". You do not have to start with monochrome for pseudocolor images.
From: ImageAnalyst on 2 Jun 2010 18:20 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.
|
Pages: 1 Prev: signal processing Next: message authentication code |