Take the 2-minute tour ×

I have a 4x4 matrix which I wish to decompose into 4 frequency bands (LL, HL, LH, HH where L=low, H=high) by using a one-level Daubechies-4 wavelet transform. As a result of the transform, each band should contain 2x2 coefficients. How can I do this in MATLAB? I know that MATLAB has dbaux and dbwavf functions. However, I'm not sure how to use them and I also don't have the wavelet toolbox.

Any help is greatly appreciated.


share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

Did you try this?

N = length(S);
S = transpose(S);
s1 = S(1:2:N-1) + sqrt(3)*S(2:2:N);
d1 = S(2:2:N) - sqrt(3)/4*s1 - (sqrt(3)-2)/4*[s1(N/2) s1(1:N/2-1)];
s2 = s1 - [d1(2:N/2) d1(1)];
s = (sqrt(3)-1)/sqrt(2) * s2;
d = (sqrt(3)+1)/sqrt(2) * d1;

Courtesy http://en.wikipedia.org/wiki/Daubechies_wavelet#Implementation

share|improve this answer
yes - that's the code that's provided on wikipedia. I'm not sure what id does (i.e. I don't understand it) - what the input and output is. And it seems to be doing the computation on a vector, not a matrix. –  Myx Apr 14 '10 at 19:39
add comment

I think Ivan Selesnick's wavelet software package pushes all the right buttons for you. It covers the separable 1D, 2D and 3D cases... both matlab implementation and tutorial! It does not require the Wavelet Toolbox, but it probably requires the Signal Processing Toolbox (not sure about the Image Processing Toolbox). It also provides code for more advanced wavelet transforms, so you can even explore alternative techniques.

share|improve this answer
add comment

Your Answer


