how to use colorbar and colormap?

 Respuesta aceptada

Chandra Kurniawan
Chandra Kurniawan el 7 de Dic. de 2011
clear; clc;
I = imread('cameraman.tif');
imagesc(I); colormap(jet); colorbar;

2 comentarios

nur izzati
nur izzati el 7 de Dic. de 2011
Thank you,
and can I use colormap function for rgb image? because if I didnt convert rgb to gray image, the color in image is not parallel with color in color bar.
Image Analyst
Image Analyst el 7 de Dic. de 2011
You might be able to call it but it won't apply to any true color images residing on your figure. A colormap just doesn't make any sense for an image that is already in color, it only makes sense to apply a color to a gray level.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by