MATLAB ndwt function problem

Discussion in 'Programmer's Corner' started by Birdie, Feb 7, 2011.

  1. Birdie

    Thread Starter New Member

    Feb 7, 2011
    2
    0
    Dear all,

    I have a problem with ndwt MATLAB function. This method should use A Trous algorithm to upsample filters. I am a beginner with wavelets, so I'm trying to get used to this method from the beginning. I defined Haar wavelet manually as: 1/sqrt(2)[-1 1] as HiD and 1/sqrt(2)[1 1] as LoD. First I decompose some signal (A) by hand using conv(LoD,A). I used symmetrical padding of signal. Then I used ndwt(A,1,'haar'). I get the same approximations cA1 for both methods.

    The problem is with next decomposition level. According to A Trous algorithm I inserted zeros to LoD filter - now LoD_2=1/sqrt(2)[1 0 1]. Again I convolved, but with first level approximations now - conv(LoD_2,cA1). Then I used ndwt(A,2,'haar'). Now the results of cA2 are not the same. I found out, that MATLAB used the same filter as for cA1; it means [1 1].

    Where is the problem? Thank you very much for any advice.
     
Loading...