您现在的位置:首页 >> ★免费资源 >> 源码下载 >> 内容

MATLAB代做-python代做-FPGA代做- 拉普拉斯金字塔图像融合

时间:2019-7-15 13:30:41 点击:

  核心提示:MATLAB代做-python代做-FPGA代做- 拉普拉斯金字塔图像融合...
clear all;
clc
M1=imread('ship_image_mid.jpg');
M2=imread('ship_image_long.jpg');
Sig1=M1;Sig2=M2;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mp=3;

 Y = (M1 + M2) / 2;

ap=[1 1];
  % choose max(abs)
         M1=double(M1);M2=double(M2);
  mm = (abs(M1)) > (abs(M2));
  Y  = (mm.*M1) + ((~mm).*M2);
zt=4;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[z1 s1] = size(M1);
[z2 s2] = size(M2);
if (z1 ~= z2) | (s1 ~= s2)
  error('Input images are not of same size');
end;

% define filter 
w  = [1 4 6 4 1] / 16;

% cells for selected images
E = cell(1,zt);

% loop over decomposition depth -> analysis
for i1 = 1:zt 
  % calculate and store actual image size 
  [z s]  = size(M1); 
  zl(i1) = z; sl(i1)  = s;
  
  % check if image expansion necessary 
  if (floor(z/2) ~= z/2), ew(1) = 1; else, ew(1) = 0; end;
  if (floor(s/2) ~= s/2), ew(2) = 1; else, ew(2) = 0; end;

  % perform expansion if necessary
  if (any(ew))
  M1 = adb(M1,ew);
  M2 = adb(M2,ew);
  end;
  
  % perform filtering 
  G1 = conv2(conv2(es2(M1,2), w, 'valid'),w', 'valid');
  G2 = conv2(conv2(es2(M2,2), w, 'valid'),w', 'valid');
 
  % decimate, undecimate and interpolate 
  M1T = conv2(conv2(es2(undec2(dec2(G1)), 2), 2*w, 'valid'),2*w', 'valid');
  M2T = conv2(conv2(es2(undec2(dec2(G2)), 2), 2*w, 'valid'),2*w', 'valid');
 
  % select coefficients and store them
  E(i1) = {selc(M1-M1T, M2-M2T, ap)};
  
  % decimate 
  M1 = dec2(G1);
  M2 = dec2(G2);
end;

% select base coefficients of last decompostion stage
M1 = selb(M1,M2,mp);

% loop over decomposition depth -> synthesis
for i1 = zt:-1:1
  % undecimate and interpolate 
  M1T = conv2(conv2(es2(undec2(M1), 2), 2*w, 'valid'), 2*w', 'valid');
  % add coefficients
  M1  = M1T + E{i1};
  % select valid image region 
  M1 = M1(1:zl(i1),1:sl(i1));
end;

% copy image
Y = M1;
 M1=uint8(M1);M2=uint8(M2);
 Y=uint8(Y);
subplot(131);imshow(Sig1);title('中波红外图像');subplot(132);imshow(Sig2);title('长波红外图像');subplot(133);imshow(Y);title('拉普拉斯融合图像');
imwrite(Y,'ship_image_fusion_lap.bmp') ;         


联系:highspeedlogic

QQ :1224848052

微信:HuangL1121

邮箱:1224848052@qq.com

网站:http://www.mat7lab.com/

网站:http://www.hslogic.com/

微信扫一扫:

作者:拉普拉斯金字塔图像融合 来源:拉普拉斯金字塔图像融合
  • 您是如何找到本站的?
  • 百度搜索
  • Google搜索
  • 查阅资料过程中
  • 论坛发现
  • 百度贴吧发现
  • 朋友介绍
本站最新成功开发工程项目案例
相关文章
  • 没有相关文章
相关评论
发表我的评论
  • 大名:
  • 内容:
  • matlab代做|matlab专业代做|matlab淘宝代做(www.hslogic.com) © 2019 版权所有 All Rights Reserved.
  • Email:highspeed_logic@163.com 站长QQ: 1224848052

    专业代做/代写/承接、MATLAB、SIMULINK、FPGA项目、博士/硕士/本科毕业设计、课题设计、论文,毕业论文,Coursework、Eassy、Assignment