Presentation is loading. Please wait.

Presentation is loading. Please wait.

Filter implementation of the Haar wavelet Multiresolution approximation in general Filter implementation of DWT Applications - Compression The Story of.

Similar presentations


Presentation on theme: "Filter implementation of the Haar wavelet Multiresolution approximation in general Filter implementation of DWT Applications - Compression The Story of."— Presentation transcript:

1 Filter implementation of the Haar wavelet Multiresolution approximation in general Filter implementation of DWT Applications - Compression The Story of Wavelets Theory and Engineering Applications

2 DWT Using Filtering a(j-1,2k) a(j-1, 2k+1) f(t) f j-1 (t) f j (t) a(j,k) Note that at the next finer level, intervals are half as long, so you need 2k to get the same interval. h’[n] a j-1,k y j-1,k h’[n] 2 a j-1,k a j,k a j,2k Approx. coefficients at any level j can be obtained by filtering coef. at level j-1 (next finer level) by h’[n] and downsampling by 2

3 Filter Implementation of Haar Wavelet We showed that a j,k can be obtained from a j-1,k through filtering by using a filter followed by a downsampling operation (drop every other sample). Similarly, d j,k can also be obtained from a j-1,k using the filter g’[n] followed by down sampling by 2… This is called decomposition in the wavelet jargon. g’[n] 2 a j-1,k d j,k d j,2k Detail coefficients at any level j can be obtained by filtering approximation coefficients at level j-1 (next finer level) by g’[n] and downsampling by 2

4 Decomposition Filters  If we take the FT of h’[n] and g’[n]… LPF HPF

5 Decomposition / Reconstruction Filters  We can obtain the coarser level coefficients a j,k or d j,k by filtering a j-1,k with h’[n] or g’[n], respectively, followed by downsampling by 2.  Would any LPF and HPF work? No! There are certain requirements that the filters need to satisfy. In fact, the filters are obtained from scaling and wavelet functions using dilation (two-scale) equations (coming soon…)  Can we go the other way? Can we obtain a j-1,k from a j,k and d j,k from a set of filters. YES!. This process is called reconstruction.  Upsample a(k,n) and d(k,n) by 2 (insert zeros between every sample) and use filters h[n]=  [n]+  [n-1] and g[n]=  [n]-  [n-1]. Add the filter outputs !

6 The Discrete Wavelet Transform g`[n] h`[n] 2 2 g`[n] h`[n] 2 2 2 2 g[n] h[n] + 2 2 g[n] h[n] + a j,k d j+1,k Decomposition Reconstruction We have only shown the above implementation for the Haar Wavelet, however, as we will see later, this implementation – subband coding – is applicable in general. d j+2,k a j+2,k a j+1,k a j,k

7     We see that app. and detail coefficients can be obtained through filtering operations, but where do scaling and wavelet functions appear in the subband coding DWT implementation?  Clearly, these functions are somehow hidden in the filter coefficients, but how?  To find out, we need to know little bit more about these scaling and wavelet functions

8  Let’s suppose that the function f(t) is sampled at N points to give the sequence f[n], and further suppose that k th resolution is the highest resolution (we will compute approximations at k+1, k+2, …etc. Then:  Multiplying and integrating MRA on Discrete Functions 1 2 1 2 h[k] g[k]

9 From MRA to Filters  This substitution gives us level j+1 approximation and detail coefficients in terms of level j coefficients : we can put the above expressions in convolution (filter) form as H ~ a j,k G ~ 2 2 1-level of DWT decomposition h[n]=h[-n], and g[n]=g[-n] ~ ~ So where do these filters really come from…? a j+1,k d j+1,k

10 Dilation / Two-scale Equations  Two scale (dilation) equations for the scaling and wavelet functions determine the filters associated with these functions. In particular:  The coefficients c(n) can be obtained as  Recall that  In some books, h[k]= c(k)/√2. Then the two-scale equation becomes or more generally

11  Similarly, the two-scale equation for the wavelet function:  Then: Dilation / Two-scale Equations In some books, g[k]= b(k)/√2. Then the two-scale equation becomes ~

12 Two-Scale Equations  These two equations determine the coefficients of all 4 filters: h[n]: Reconstruction, lowpass filter g[n]: Reconstruction, highpass filter h[n]: Decomposition, lowpass filter g[n]: Decomposition, highpass filter  The following observations can therefore be made ~ ~ Note : |H(jw)|= |H(jw)| ~

13 Quadrature Mirror Filters  It can be shown that that is, h[] and g[] filters are related to each other: in fact, that is, h[] and g[] are mirrors of each other, with every other coefficient negated. Such filters are called quadrature mirror filters. For example, Daubechies wavelets with 4 vanishing moments…..

14 DB-4 Wavelets h = -0.0106 0.0329 0.0308 -0.1870 -0.0280 0.6309 0.7148 0.2304 g = -0.2304 0.7148 -0.6309 -0.0280 0.1870 0.0308 -0.0329 -0.0106 h = 0.2304 0.7148 0.6309 -0.0280 -0.1870 0.0308 0.0329 -0.0106 g = -0.0106 -0.0329 0.0308 0.1870 -0.0280 -0.6309 0.7148 -0.2304 ~ ~ L: filter length (8, in this case) Matlab command “wfilters()”  Use freqz() to see its freq. response

15 DWT implementation: Subband Coding G H 2 2 G H 2 2 2 2 G H + 2 2 G H + x[n] Decomposition Reconstruction ~ ~ ~ ~

16 DWT Decomposition x[n] Length: 512 B: 0 ~  g[n]h[n] g[n]h[n] g[n]h[n] 2 d 1 : Level 1 DWT Coeff. Length: 256 B: 0 ~  /2 Hz Length: 256 B:  /2 ~  Hz Length: 128 B: 0 ~  /4 Hz Length: 128 B:  /4 ~  /2 Hz d 2 : Level 2 DWT Coeff. d 3 : Level 3 DWT Coeff. ……. Length: 64 B: 0 ~  /8 Hz Length: 64 B:  /8 ~  /4 Hz 2 22 2 2 |H(jw)| w  /2 -  /2 |G(jw)| w  --  /2 -  /2

17 Applications Detect discontinuities

18 Applications Detect hidden discontinuities

19 Applications Simple denoising

20 Compression  DWT is commonly used for compression, since most DWT are very small, can be zeroed-out!

21 Compression

22

23 Compression - ECG

24 ECG - Compression

25


Download ppt "Filter implementation of the Haar wavelet Multiresolution approximation in general Filter implementation of DWT Applications - Compression The Story of."

Similar presentations


Ads by Google