数字图像处理——影像融合
·
数字图像处理——影像融合
1. Brovey变换
for k = 1:bands1
for i = 1:lines2
for j = 1:samples2
Image3(i,j,k) = Image2(i,j,k)*Image1(i,j,k)/sum(Image1(i,j,:));
end
end
end
figure(1)
subplot(1,3,1);
imshow(uint8(Image1));
title('高光谱影像');
subplot(1,3,2);
imshow(uint8(Image2));
title('全色影像');
subplot(1,3,3);
imshow(uint8(Image3));
title('Brovey变换融合后的影像');

2.乘积变换
for k =1:bands1
for i = 1:lines2
for j = 1:samples2
Image3(i,j,k) = Image1(i,j,k)*Image2(i,j,k);
end
end
end
Image3 = round((Image3 - min(Image3))*255./(max(Image3) - min(Image3)));
figure(2)
subplot(1,3,1);
imshow(uint8(Image1));
title('高光谱影像');
subplot(1,3,2);
imshow(uint8(Image2));
title('全色影像');
subplot(1,3,3);
imshow(uint8(Image3));
title('乘积变换融合后的影像');

3.PCA变换
AY = PCA(Image1);
A = cell2mat(AY(1));
Y = round(cell2mat(AY(2)));
YY = matching(Image2(:,:,1),reshape(Y(1,:),[lines1,samples1]));
Y(1,:) = reshape(YY,[1,lines2*samples2]);
X = double(uint8(inv(A)* Y));
for i = 1:bands1
Image3(:,:,i) = reshape(X(i,:),[lines1,samples1]);
end
figure(3);
subplot(1,3,1);
imshow(uint8(Image1));
title('高光谱影像');
subplot(1,3,2);
imshow(uint8(Image2));
title('全色影像');
subplot(1,3,3);
imshow(uint8(Image3));
title('PCA融合后的影像');

4.HSI变换
HSI = RGB2HSI(Image1);
max = max(max(HSI(:,:,3)));
min = min(min(HSI(:,:,3)));
HSI(:,:,3) = round(HSI(:,:,3));
I = matching(Image2(:,:,1),HSI(:,:,3));
% I = Image2(:,:,1);
HSI(:,:,3) = I;
Image3 =HSI2RGB(HSI);
figure(4)
subplot(1,3,1);
imshow(uint8(Image1));
title('高光谱影像');
subplot(1,3,2);
imshow(uint8(Image2));
title('全色影像');
subplot(1,3,3);
imshow(uint8(Image3));
title('HSI变换融合后的影像');

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)