Two figures, same colormap stretch
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have two matrices of image data that I would like to plot in grayscale. The first image is before any image processing and the second is after i have preformed the image processing.
The problem I am having is that I want to use imagesc() on both of the images, but this will result in two different color scales.
I want to plot both images on different figures using the same colormap scale so that I can show the improvement in the variance across the image.
Thanks for your help,
I am a matlab novice, so step by step instructions would be amazing help to me.
0 个评论
回答(1 个)
Image Analyst
2012-1-30
Call colormap(gray) after you call imagesc or imshow.
grayImage1 = imread('moon.tif');
imagesc(grayImage1);
colormap(gray);
colorbar;
figure;
grayImage2 = imread('cameraman.tif');
imagesc(grayImage2);
colormap(gray);
colorbar;
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 White 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!