图像分解与提升方案技术解析
1. 一维行向量多分辨率分解的Matlab代码
以下是用于一维行向量多分辨率分解的Matlab代码:
function multres(wc,coarse,filter)
% A multi resolution plot of a 1D wavelet transform
scale=1./max(abs(wc));
n=length(wc); j=log2(n);
LockAxes([0 1 -(j) (-coarse+2)]);
t=(.5:(n-.5))/n;
for i=(j-1):-1:coarse
z=zeros(1,n);
z((2^(i)+1):(2^(i+1)))=wc((2^(i)+1):(2^(i+1)));
dat=iwt1(z,i,filter);
plot(t,-(i)+scale.*dat);
end
z=zeros(1,n);
z(1:2^(coarse))=wc(1:2^(coarse));
dat=iwt1(z,coarse,filter);
plot(t,(-(coarse-1))+scale.*dat);
UnlockAxes;
% 测试程序
n=1024; t=(1:n)./n;
dat=spikes(t);
% several spikes
%p=floor(n*.37); dat=1./abs(t-(p+.5)/n); % one spike
figure(1), plot(t,dat)
filt=[0.4830 0.8365 0.2241 -0.1294];
wc=fwt1(dat,2,filt);
figure(2), plo
超级会员免费看
订阅专栏 解锁全文
2316

被折叠的 条评论
为什么被折叠?



