Use a different colormap for two images
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Laura Proctor
2011 年 5 月 11 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!