在某一范围内将tire.tif和rice.tif两图像相加。matlab,怎么相加,相减显示?
1个回答
2013-05-24
展开全部
可以使用imread来直接读取,比如:% By lyqmath
clc; clear all; close all;
I1 = imread('tire.tif');
I2 = imread('rice.png');
I2 = imresize(I2, size(I1));
I3 = imadd(I1, I2);
figure;
subplot(1, 3, 1); imshow(I1, []);
title('tire.tif By lyqmath', 'FontWeight', 'Bold', 'Color', 'r');
subplot(1, 3, 2); imshow(I2, []);
title('rice.png By lyqmath', 'FontWeight', 'Bold', 'Color', 'r');
subplot(1, 3, 3); imshow(I3, []);
title('求和图像 By lyqmath', 'FontWeight', 'Bold', 'Color', 'r');结果
clc; clear all; close all;
I1 = imread('tire.tif');
I2 = imread('rice.png');
I2 = imresize(I2, size(I1));
I3 = imadd(I1, I2);
figure;
subplot(1, 3, 1); imshow(I1, []);
title('tire.tif By lyqmath', 'FontWeight', 'Bold', 'Color', 'r');
subplot(1, 3, 2); imshow(I2, []);
title('rice.png By lyqmath', 'FontWeight', 'Bold', 'Color', 'r');
subplot(1, 3, 3); imshow(I3, []);
title('求和图像 By lyqmath', 'FontWeight', 'Bold', 'Color', 'r');结果
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询