Matlab 将两个图像进行分离 已知其中一个图像

5、下图(a)是一幅两个灰度图像合成的图像,已知其中一幅图像如图(b)所示,试把另一幅图像提取出来,并显示。

运用减法做

%加载入要处理的图片
A=imread('a.png');
%将I变为[0,1]的值
B=imread('b.png');
subplot(221);
imshow(A);
title('原图');
subplot(222);
imshow(B);
title('其中一幅图片');
subplot(223);
imshow(A-B);
title('处理后图像');

 处理结果:

猜你喜欢

转载自www.cnblogs.com/sunmingyang/p/10702942.html