Digital Signal Processing Reference
In-Depth Information
where the MATLAB function fconv() for filter operations with the forward filter coefficients is listed in Section 13.8 .
Again, from Equation (13.55) , we obtain
c 2 ðkÞ¼ N
N
c 1 ðmÞh 0 ðk 2mÞþ N
N
d 1 ðmÞh 1 ðk 2mÞ
Substituting the achieved wavelet coefficients c 2 ðkÞ, we yield
c 2 ð0Þ¼ N
N
c 1 ðmÞh 0 ð2mÞþ N
N
d 1 ðmÞh 1 ð2mÞ
p
2
1
¼ c 1 ð0Þh 0 ð0Þþd 1 ð0Þh 1 ð0Þ¼ 3
þ 1 p 1 p ¼ 2
p
N
N
c 2 ð1Þ¼
c 1 ðmÞh 0 ð1 2mÞþ
d 1 ðmÞh 1 ð1 2mÞ
N
N
p
2
1 2
¼ c 1 ð0Þh 0 ð1Þþd 1 ð0Þh 1 ð1Þ¼ 3
1
p þ 1
p
p
¼ 1
c 2 ð2Þ¼ N
N
c 1 ðmÞh 0 ð2 2mÞþ N
N
d 1 ðmÞh 1 ð2 2mÞ
1
1 p þ
1
1 p ¼ 1
¼ c 1 ð1Þh 0 ð0Þþd 1 ð1Þh 1 ð0Þ¼
p
p
2
2
2
2
N
N
c 2 ð3Þ¼
c 1 ðmÞh 0 ð3 2mÞþ
d 1 ðmÞh 1 ð3 2mÞ
N
N
1
1
1
1
¼ c 1 ð1Þh 0 ð1Þþd 1 ð1Þh 1 ð1Þ¼
p
p þ
p
p
¼ 0
2
2
We can verify the results using the MATLAB program as follows:
>> c2¼fconv([1 1]/sqrt(2),[3*sqrt(2)/2 0 1/(2*sqrt(2)) 0])þfconv([1 1]/sqrt(2),[1/sqrt(2) 0 1/(2*sqrt(2)) 0])
c2 ¼ 2.0000 1.0000 0.5000 0
Scaling the wavelet coefficients, we finally recover the original sample values as
f ðkÞ¼2 2=2 ½21 0:50¼½42 10
Similarly, we can use the MATLAB function idwt() provided in Section 13.8 to perform the IDWT.
idwt.m
function c ¼ idwt(h0,w,kLevel)
%h0 ¼ wavelet filter coefficients (lowpass filter)
%w ¼ wavelet coefficients
% kLevel ¼ level
%c
input vector
Appling the MATLAB function idwt() leads to
>> f¼2*idwt([1/sqrt(2) 1/sqrt(2)],[5/4 7/4 1/sqrt(2) 1/(2*sqrt(2))],2)'
f ¼ 4.0000 2.0000 1.0000 0.0000
¼
j=2 scales signal amplitudes down in the analysis stage and scales them back up in the synthesis stage, we
can omit 2
Since 2
j=2 by using cðkÞ¼f ðkÞ directly in practice.
Search WWH ::




Custom Search