?? xiaoboyasuo2.m
字號:
clear all;close all;
load wbarb;
subplot(221);image(X);
colormap(map);
title('原始圖像');
disp('原始的圖像的大小');
whos('X');
%對圖像進行小波二層變換;
[c,s]=wavedec2(X,2,'bior3.7');
ca1=appcoef2(c,s,'bior3.7',1);
ch1=detcoef2('h',c,s,1);
cv1=detcoef2('v',c,s,1);
cd1=detcoef2('d',c,s,1);
a1=wrcoef2('a',c,s,'bior3.7',1);
h1=wrcoef2('h',c,s,'bior3.7',1);
v1=wrcoef2('v',c,s,'bior3.7',1);
d1=wrcoef2('d',c,s,'bior3.7',1);
c1=[a1 h1;v1 d1];
subplot(222);
colormap(map);
image(c1);
title('小波變換重構后分解得到的高低頻信息');
axis square;
ca12=wcodemat(ca1,440,'mat',0);
ca12=ca12*0.5;
subplot(223);
image(ca12);
colormap(map);
axis square
title('第一次壓縮的圖像');
disp('第一次壓縮圖像的大小');
whos('ca12');
ca2=appcoef2(c,s,'bior3.7',2);
ca22=wcodemat(ca2,440,'mat',0);
%ca22=ca22*0.25;
subplot(224);
image(ca22);
axis square; colormap(map);
title('兩次壓縮的圖像');
disp('第二次壓縮圖像的大小');
whos('ca22');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -