DSPRelated.com
Forums

algorithm of Inverse discrete wavelet transform

Started by Umutesi Faith January 16, 2006
Ok thanks again.
Have you used the matlab programme to make any analysis with the
wavelets?

In the matlab wavelet toolbox it is shown that one can choose from these
wavelets :
haar, db, sym, coif, bior, rbio, meyr,
dmey,gaus,mexh,morl,cgau,shan,fbsp,cmor

Are these called family wavelets or the type of wavelets?
Umutesi Faith wrote:
> Ok thanks again. > Have you used the matlab programme to make any analysis with the > wavelets?
I have used MATLAB to do some wavelet based stuff, but I didn't use their wavelet toolbox (I have played with it, but it's been a long while). I either used WaveLab (http://www-stat.stanford.edu/~wavelab/) or LastWave (http://www.cmap.polytechnique.fr/~bacry/LastWave/), parts of which I manually converted from C to MATLAB.
> In the matlab wavelet toolbox it is shown that one can choose from these > wavelets : > haar, db, sym, coif, bior, rbio, meyr, > dmey,gaus,mexh,morl,cgau,shan,fbsp,cmor > > Are these called family wavelets or the type of wavelets?
Each of those is a different wavelet and would have corresponding filters for a multiresolution analysis. You should check out a book such as Burrus et al.'s _Introduction to Wavelets and Wavelet Transform: A Primer_ if you're more of an engineer or Mallat's _A Wavelet Tour of Signal Processing_ if you're more of a mathematician. Cheers! --M
Ok, I see,i've been using the book" Wavelet Application by Tapan K.
Sarkar...", it is not easy to understand either by i'm interested in the
subject. 

Using matlab i guess the wavelet can be easy to handle, but with a real a
application it gets more complicated.The DWT is quite straight forward
from the Robi's wavelet tutorial, but my strungle has been this IDWT. If
for instance the signal is not completely recovered (by using let's say
the Dauchechies filters coefficients taken from matlab which are the best
example of quadrature mirror filters), does it mean that the DWT failed or
are there some other parameters to take into account besides filtering and
downsampling!!
Let's say the DWT was OK, does it mean something went wrong in the
reconstruction that is the upsampling and filtering steps!
Thanks if you have any ideas about these!!


***************************************************************


Umutesi Faith wrote:
>> Ok thanks again. >> Have you used the matlab programme to make any analysis with the >> wavelets? > >I have used MATLAB to do some wavelet based stuff, but I didn't use >their wavelet toolbox (I have played with it, but it's been a long >while). I either used WaveLab (http://www-stat.stanford.edu/~wavelab/) >or LastWave (http://www.cmap.polytechnique.fr/~bacry/LastWave/), parts >of which I manually converted from C to MATLAB. > >> In the matlab wavelet toolbox it is shown that one can choose from
these
>> wavelets : >> haar, db, sym, coif, bior, rbio, meyr, >> dmey,gaus,mexh,morl,cgau,shan,fbsp,cmor >> >> Are these called family wavelets or the type of wavelets? > >Each of those is a different wavelet and would have corresponding >filters for a multiresolution analysis. You should check out a book >such as Burrus et al.'s _Introduction to Wavelets and Wavelet >Transform: A Primer_ if you're more of an engineer or Mallat's _A >Wavelet Tour of Signal Processing_ if you're more of a mathematician. > >Cheers! --M > >
Umutesi Faith wrote:
> Ok, I see,i've been using the book" Wavelet Application by Tapan K. > Sarkar...", it is not easy to understand either by i'm interested in the > subject.
I looked at _Wavelet Applications in Engineering Electro-magnetics_ book on Amazon, and it doesn't look to me like a good place to start studying wavelets (but then again, I can only see the TOC and the first few pages). The Burrus book I mentioned earlier might be easier for you. I haven't seen a simpler introduction, but I haven't looked for a few years either.
> Using matlab i guess the wavelet can be easy to handle, but with a real a > application it gets more complicated.The DWT is quite straight forward > from the Robi's wavelet tutorial, but my strungle has been this IDWT. If > for instance the signal is not completely recovered (by using let's say > the Dauchechies filters coefficients taken from matlab which are the best > example of quadrature mirror filters), does it mean that the DWT failed or > are there some other parameters to take into account besides filtering and > downsampling!!
Different wavelets are useful in different situations. Daubechies' wavelets maximize the number of vanishing moments (if I recall correctly), but they are not always the best for every application.
> Let's say the DWT was OK, does it mean something went wrong in the > reconstruction that is the upsampling and filtering steps! > Thanks if you have any ideas about these!!
You should be able to perfectly reconstruct the original signal from the DWT (ignoring round-off error and such). If you can't, then something went wrong. Cheers! --M
Thanks a lot for the explanations, i will definitely try to see if i can
find the book you've mentioned!

If you require a reversible transform (i.e. the reconstruction is perfect
even in the presence of round off errors) then you should look for lifting.
I think that in practice PR in the presence of round off errors is _a lot_
easier if your signal is defined in Z. Lifting can be easily emploied in
matlab by using lwt instead of dwt and by defining the lifting scheme to be
integer-to-integer e.g. 

        x = round(100*rand(1,1024)); %integers
        ls = liftwave('cdf2.2','Int2Int'); %cdf2.2 wavelet lifting scheme
        [cA,cD] = lwt(x,ls); %forward transform
        xhat = ilwt(cA,cD,ls); %backward
        sum((xhat-x).^2) %squared error
        >> 0

One should note that integer-to-integer mapping lifting schemes don't
necessarily maintain the scaling i.e. the wavelet coefficients may have a
scale error.

For more information look matlabs help in wavelet toolbox: Advanced Concepts
-> Lifting Background and the original papers about lifting:
http://cm.bell-labs.com/who/wim/papers and from there Lifting.

Umutesi Faith wrote:
/* snip */
> Using matlab i guess the wavelet can be easy to handle, but with a real a > application it gets more complicated.The DWT is quite straight forward > from the Robi's wavelet tutorial, but my strungle has been this IDWT. If > for instance the signal is not completely recovered (by using let's say > the Dauchechies filters coefficients taken from matlab which are the best > example of quadrature mirror filters), does it mean that the DWT failed or > are there some other parameters to take into account besides filtering and > downsampling!! > Let's say the DWT was OK, does it mean something went wrong in the > reconstruction that is the upsampling and filtering steps! > Thanks if you have any ideas about these!! > >
---- Jani Huhtanen Tampere University of Technology, Pori
Hi,

I just wouldn't jump on the lifting scheme, as i would like to learn
justthe basics things for the moment!anyway thannks for mentioning it!

By the way i was looking again at the IDWT formula 
x[n]= sum(for k=-infinity to
+infinity)(yhigh[k]*g[-n+2k]+(ylow[k]*h[-n+2k])

Actually this whole formula includes as well the upsampling,no separate
upsampling needed in the implementation. The point is that, i really don't
see how this upsampling is incorporated in this formula. Is there any
mathematical way of knowing how this upsampling step could be part of this
equation? Or is there any other simpler algorithm of this IDWT!This
equation is also not too difficult but how on earth do we see this
upsampling step?
thanks!
The upsampling is implicit in the equation. The yhigh[k] and ylow[k]
refers to the upsampled values, that is,

yhigh[k] = yhigh_actual[k/2] for k even
yhigh[k] = 0 for k odd

The "2k" term in the index of filter coefficients makes this implicit.
Similarly, the odd samples are 0 for ylow.

- Ravi

By the way, I believe that the correct term is "expanding", not
"upsampling"...

Ravi Srikantiah wrote:

> By the way, I believe that the correct term is "expanding", not > "upsampling"...
I don't know about correct which is correct (probably both are used), but atleast Strang uses the term "upsampling" when he means, well upsampling :). I.e. the process where you insert N-1 zeros between the samples, when you upsample by N. Interpolation is the process where upsampling is combined with a lowpass filter. I've heard the term "expanding" before only in the Burt's and Adelson's paper about Laplacian pyramids. There "EXPAND" was a function that interpolated new values from lower resolution image to obtain "higher resolution" image. -- Jani Huhtanen Tampere University of Technology, Pori