叠加图像MATLAB(带颜色的灰色) [英] Superimpose images MATLAB(grey with color)

查看:907
本文介绍了叠加图像MATLAB(带颜色的灰色)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个矩阵,第一个是dicom图像(灰度)的ROI,第二个是值在0-1之间的矩阵.

I have two matrices, the first is the ROI from an dicom image (grey scale) and the second is a matrix with values between 0-1.

在第二个矩阵中,我进行了阈值处理,仅保留了范围(0.6 -1.0)的值.我想将两个矩阵图像叠加在一起,并以数字形式显示结果,这意味着将背景灰度图像和彩色图像叠加在一起(在非零值区域内).

In the second matrix I did a thresholding and kept only the values of a range (0.6 -1.0). I would like to superimpose the two matrices-images and show the result as an figure, that means background the grey image and superimposed the color image (in the region of non zero values).

您能为我提供一些帮助吗? 谢谢

Can you provide me with some help? Thanks

推荐答案

如何

figure;
imshow( first(:,:,[1 1 1]) ); % make the first a grey-scale image with three channels so it will not be affected by the colormap later on
hold on;
t_second = second .* ( second >= .6 & second <= 1.0 ); % threshold second image
ih = imshow( t_second );
set( ih, 'AlphaData', t_second );
colormap jet

这篇关于叠加图像MATLAB(带颜色的灰色)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆