📄 xiaobo.m
字号:
cc
H=[0 -0.1768 0.3536 1.0607 0.3536 -0.7168];
G=[0 0.3536 -0.7071 0.3536 0 0];
for m1=1:136
B1h=conv2(X1(m1,:),H);
X1h(m1,:)=B1h;
B1g=conv2(X1(m1,:),G);
X1g(m1,:)=B1g;
B2h=conv2(X2(m1,:),H);
X2h(m1,:)=B2h;
B2g=conv2(X2(m1,:),G);
X2g(m1,:)=B2g;
end
for n1=1:259
Z1h=X1h(:,n1)';
C1hh=conv2(Z1h,H);
X1hh(:,n1)=C1hh';
C1hg=conv2(Z1h,G);
X1hg(:,n1)=C1hg';
Z1g=X1g(:,n1)';
C1gh=conv2(Z1g,H);
X1gh(:,n1)=C1gh';
C1gg=conv2(Z1g,G);
X1gg(:,n1)=C1gg';
Z2h=X2h(:,n1)';
C2hh=conv2(Z2h,H);
X2hh(:,n1)=C2hh';
C2hg=conv2(Z2h,G);
X2hg(:,n1)=C2hg';
Z2g=X2g(:,n1)';
C2gh=conv2(Z2g,H);
X2gh(:,n1)=C2gh';
C2gg=conv2(Z2g,G);
X2gg(:,n1)=C2gg';
end
figure
subplot(2,2,1)
image(X1hh)
colormap(map)
title('近似图像')
subplot(2,2,2)
image(X1hg)
colormap(map)
title('水平细节')
subplot(2,2,3)
image(X1gh)
colormap(map)
title('垂直细节')
subplot(2,2,4)
image(X1gg)
colormap(map)
title('对角细节')
figure
subplot(2,2,1)
image(X2hh)
colormap(map)
title('近似图像')
subplot(2,2,2)
image(X2hg)
colormap(map)
title('水平细节')
subplot(2,2,3)
image(X2gh)
colormap(map)
title('垂直细节')
subplot(2,2,4)
image(X2gg)
colormap(map)
title('对角细节')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -