我正在尝试在灰度图像上叠加彩色图像。但是,当我尝试绘制“颜色条”并设置“爬升”时。Matlab 总是根据下面的灰度图像生成一个颜色条。
但是,我想获得叠加彩色图像的颜色条。任何建议将不胜感激。非常感谢。
%% Example codes:
greyImage = imread('AT3_1m4_08.tif');
colorImage = imread('hestain.png');
figure,
greyImagePlot = image(greyImage); colormap(gray); hold on;
overlayImage = imagesc(colorImage, ...
'CDataMapping', 'scaled', 'HitTest', 'off');
alF = 0.5.*ones(size(colorImage, 1), size(colorImage, 2));
set(overlayImage, 'AlphaData', alF);
colorbar; % This will show a grey scale colorbar not the colour one I want
set('CLim', [0 100]); % Also, the colormap limit here is not working
axis off
axis image