Use a different colormap for two images
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi! I have two different images which I want to display on top of each other. I want to use two different colormaps. (They have different intensity ranges). I know that colormap is a property of the figure. I could not manage to do that so I decided that displaying the contour of the second image on top of the first would also work.
h = imshow(I);colormap(jet)
hold on
[C,hc]=contour(I2);
child_handles = get(hc,'Children');
Contour has the same colormap with the image as well. I wanted to control the color property of the contour by accessing the handles of each patch object. I can specify a color for each patch if necessary (but there are many patches) but I could not manage to define a colormap.
I would appreciate any help on this. Thanks, Gokcen.
0 comentarios
Respuestas (2)
Laura Proctor
el 11 de Mayo de 2011
Each figure has its own colormap, so you wouldn't be able to have two images in the same figure with one colormap. You may have some luck by converting the images to true color images. Use the IND2RGB function to achieve this. The input values are your indexed image along with the colormap, and then the output will be a true-color image.
0 comentarios
Ver también
Categorías
Más información sobre Orange en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!