数字图像处理——影像融合

mac2025-03-31  6

数字图像处理——影像融合

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变换融合后的影像');

最新回复(0)