⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gaigaositaxingfenjie.m

📁 拉平拉斯图像融合
💻 M
字号:
Gp=X1;
 w=1/256*[1 4 6 4 1;4 16 24 16 4;6 24 36 24 6;4 16 24 16 4;1 4 6 4 1];
 Bl=conv2(w,Gp);
 figure(2)
 subplot(4,1,1)
 image(Bl);
 colormap(map)
 title('第0层:140×258')
 axis([0 258 0 140])
 axis off
 B1l(70,258)=0;
 for r=1:70
     B1l(r,:)=Bl(2*r-1,:);
 end
 B2l(70,129)=0;
 for l=1:129
     B2l(:,l)=B1l(:,2*l-1);
 end
subplot(4,1,2)
image(B2l);
colormap(map)
title('第1层:70×129')
axis([0 258 0 140])
axis off
C1l(35,129)=0;
for r=1:35
    C1l(r,:)=B2l(2*r-1,:);
end
C2l(35,65)=0;
for l=1:65
    C2l(:,l)=C1l(:,2*l-1);
end
subplot(4,1,3)
image(C2l)
colormap(map)
title('第2层:35×65')
axis([0 258 0 140])
axis off
D1l(18,65)=0;
for r=1:18
    D1l(r,:)=C2l(2*r-1,:);
end
D2l(18,33)=0;
for l=1:33
    D2l(:,l)=D1l(:,2*l-1);
end
subplot(4,1,4)
image(D2l)
colormap(map)
title('第3层:18×33')
axis([0 258 0 140])
axis off
 Gp=X2;
 w=1/256*[1 4 6 4 1;4 16 24 16 4;6 24 36 24 6;4 16 24 16 4;1 4 6 4 1];
 Bh=conv2(w,Gp);
 figure(3)
 subplot(4,1,1)
 image(Bh);
 colormap(map)
 title('第0层:140×258')
 axis([0 258 0 140])
 axis off
 B1h(70,258)=0;
 for r=1:70
     B1h(r,:)=Bh(2*r-1,:);
 end
B2h(70,129)=0;
for l=1:129
    B2h(:,l)=B1h(:,2*l-1);
end
subplot(4,1,2)
image(B2h);
colormap(map)
title('第1层:70×129')
axis([0 258 0 140])
axis off
C1h(35,129)=0;
for r=1:35
    C1h(r,:)=B2h(2*r-1,:);
end
C2h(35,65)=0;
for l=1:65
    C2h(:,l)=C1h(:,2*l-1);
end
subplot(4,1,3)
image(C2h)
colormap(map)
title('第2层:35×65')
axis([0 258 0 140])
axis off
D1h(18,65)=0;
for r=1:18
    D1h(r,:)=C2h(2*r-1,:);
end
D2h(18,33)=0;
for l=1:33
    D2h(:,l)=D1h(:,2*l-1);
end
subplot(4,1,4)
image(D2h)
colormap(map)
title('第3层:18×33')
axis([0 258 0 140])
axis off

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -