I am trying to program Discrete Wavelet Transform in Matlab. I do understand that their are various libraries available, but my project requires that I must implement it from scratch.
I am taking a vector of length N. I then provide this vector as input to my my Low Pass and High Pass Filters. My first question is, what must be the cut-off for these two filters?
Once I am done passing my signal through these two filters, I have S_LowPass and S_HighPass. I now down sample these vectors.
Once I have down sampled these vectors, the size of my vector has been reduced. Now when I use Matlab’s Wavelet toolbox, the sizes remain the same on each level. My second question: Why are the sizes remaining the same?
1
From the Wikipedia article on the DWT, the filter pair has to satisfy the requirements of a quadrature mirror filter.
From what I remember from school when you had two analog filters cross you wanted the crossing point (frequency) to be at the 3dB rolloff of each, but it might be different for wavelets — I don’t rememba so good.
I believe the crossing frequency you’d want would be at 1/2 the maximum frequency of your signal (so a quarter of the Nyquist rate).
You might try these notes by Phil Schniter starting w/ section 3.
If you just wanna take the easy route there’s a Java implementation using the Haar wavelet; I used a C version of it in this project.
As for the Wavelet toolbox part of the question, I’ve not used that.