short time fourier transform
play

Short Time Fourier Transform Time/Frequency localization depends on - PowerPoint PPT Presentation

Short Time Fourier Transform Time/Frequency localization depends on window size. Once you choose a particular window size, it will be the same for all frequencies. Many signals require a more flexible approach - vary the window size to


  1. Short Time Fourier Transform • Time/Frequency localization depends on window size. • Once you choose a particular window size, it will be the same for all frequencies. • Many signals require a more flexible approach - vary the window size to determine more accurately either time or frequency.

  2. The Wavelet Transform • Overcomes the preset resolution problem of the STFT by using a variable length window: – Narrower windows are more appropriate at high frequencies (better time localization) – Wider windows are more appropriate at low frequencies (better frequency localization)

  3. The Wavelet Transform (cont’d) Wide windows do not provide good localization at high frequencies.

  4. The Wavelet Transform (cont’d) A narrower window is more appropriate at high frequencies.

  5. The Wavelet Transform (cont’d) Narrow windows do not provide good localization at low frequencies.

  6. The Wavelet Transform (cont’d) A wider window is more appropriate at low frequencies.

  7. What is a wavelet? • It is a function that “ waves ” above and below the x-axis; it has (1) varying frequency, (2) limited duration, and (3) an average value of zero. • This is in contrast to sinusoids, used by FT, which have infinite energy. Sinusoid Wavelet

  8. Wavelets • Like sine and cosine functions in FT, wavelets can define basis functions ψ k (t): f t ( ) a ( ) t = ∑ ψ k k k • Span of ψ k (t): vector space S containing all functions f(t) that can be represented by ψ k (t).

  9. Wavelets (cont’d) • There are many different wavelets: Morlet Haar Daubechies

  10. Basis Construction - Mother Wavelet jk t ( ) = ψ

  11. Basis Construction - Mother Wavelet (cont’d) j /2 ( j ) jk t ( ) 2 2 t k ψ = ψ − j scale =1/2 j (1/frequency) k

  12. Discrete Wavelet Transform (DWT) * a f t ( ) ( ) t = ∑ (forward DWT) ψ jk jk t = ∑∑ f t ( ) a ( ) t ψ (inverse DWT) jk jk k j j /2 ( j ) jk t ( ) 2 2 t k ψ = ψ − where

  13. DFT vs DWT • FT expansion: one parameter basis f t ( ) a ( ) t = ∑ ψ or l l l two parameter basis • WT expansion f t ( ) a ( ) t = ∑∑ ψ jk jk k j

  14. Multiresolution Representation using jk t ( ) ψ high resolution f t ( ) (more details) ˆ ( ) f t 1 j ˆ ( ) f t 2 … low resolution ˆ ( ) f t (less details) s f t ( ) a ( ) t = ∑ ∑ ψ jk jk k j

  15. Prediction Residual Pyramid - Revisited • In the absence of quantization errors, the approximation pyramid can be reconstructed from the prediction residual pyramid. • Prediction residual pyramid can be represented more efficiently. (with sub-sampling)

  16. Efficient Representation Using “ Details ” details D 3 details D 2 details D 1 L 0 (without sub-sampling)

  17. Efficient Representation Using Details (cont’d) representation: L 0 D 1 D 2 D 3 in general : L 0 D 1 D 2 D 3 …D J A wavelet representation of a function consists of (1) a coarse overall approximation (2) detail coefficients that influence the function at various scales.

  18. Reconstruction (synthesis) H 3 =H 2 +D 3 H 2 =H 1 +D 2 details D 3 details D 2 H 1 =L 0 +D 1 details D 1 L 0 (without sub-sampling)

  19. Example - Haar Wavelets • Suppose we are given a 1D "image" with a resolution of 4 pixels: [9 7 3 5] • The Haar wavelet transform is the following: L 0 D 1 D 2 D 3 (with sub-sampling)

  20. Example - Haar Wavelets (cont’d) • Start by averaging the pixels together (pairwise) to get a new lower resolution image: [9 7 3 5] • To recover the original four pixels from the two averaged pixels, store some detail coefficients. 1

  21. Example - Haar Wavelets (cont’d) • Repeating this process on the averages (i.e., low resolution image) gives the full decomposition: 1 Harr decomposition:

  22. Example - Haar Wavelets (cont’d) • We can reconstruct the original image by adding or subtracting the detail coefficients from the lower- resolution versions. 1 -1 2

  23. Example - Haar Wavelets (cont’d) Detail coefficients become smaller and smaller as j increases. D j D j-1 How to compute D i ? D 1 L 0

  24. Multiresolution Conditions • If a set of functions can be represented by a weighted sum of ψ (2 j t - k), then a larger set , including the original, can be represented by a weighted sum of ψ (2 j +1 t - k): high resolution j low resolution

  25. Multiresolution Conditions (cont’d) • If a set of functions can be represented by a weighted sum of ψ (2 j t - k), then a larger set, including the original, can be represented by a weighted sum of ψ (2 j +1 t - k): f t ( ) a ( ) t = ∑ ψ V j : span of ψ (2 j t - k): j k jk k f ( ) t b ( ) t = ∑ V j+1 : span of ψ (2 j+1 t - k): ψ j 1 k ( j 1) k + + k V V + ⊆ j j 1

  26. Nested Spaces V j V j : space spanned by ψ (2 j t - k) Basis functions: ψ ( t - k) f t ( ) a ( ) t = ∑ ∑ ψ V 0 f(t) ϵ V j jk jk k j ψ (2 t - k) V 1 … V j ψ (2 j t - k) V V + Multiresolution conditions à nested spanned spaces: ⊂ j j 1 i.e., if f(t) ϵ V j then f(t) ϵ V j+1

  27. How to compute D i ? (cont’d) f t ( ) a ( ) t = ∑ ∑ ψ f(t) ϵ V j jk jk k j IDEA: define a set of basis functions that span the difference between V j+1 and V j

  28. Orthogonal Complement W j • Let W j be the orthogonal complement of V j in V j+1 V j+1 = V j + W j

  29. How to compute D i ? (cont’d) If f(t) ϵ V j+1 , then f(t) can be represented using basis functions φ (t) from V j+1 : j 1 f t ( ) c (2 + t k ) ∑ = ϕ − V j+1 k k Alternatively, f(t) can be represented using two sets of basis functions, φ (t) from V j and ψ (t) from W j : V j+1 = V j + W j j j f t ( ) c (2 t k ) d (2 t k ) ∑ ∑ = ϕ − + ψ − k jk k k

  30. How to compute D i ? (cont’d) Think of W j as a means to represent the parts of a function in V j+1 that cannot be represented in V j j 1 f t ( ) c (2 t k ) + ∑ = ϕ − k k differences j j f t ( ) c (2 t k ) d (2 t k ) ∑ ∑ = ϕ − + ψ − k jk between k k V j and V j+1 V j W j

  31. How to compute D i ? (cont’d) • à using recursion on V j : V j+1 = V j + W j V j+1 = V j-1 +W j-1 +W j = …= V 0 + W 0 + W 1 + W 2 + … + W j if f(t) ϵ V j+1 , then: j f t ( ) c ( t k ) d (2 t k ) ∑ ∑∑ = ϕ − + ψ − k jk k k j V 0 W 0 , W 1 , W 2 , … basis functions basis functions

  32. Summary: wavelet expansion (Section 7.2) • Wavelet decompositions involve a pair of waveforms (mother wavelets): encode low encode details or φ (t) ψ (t) resolution info high resolution info j f t ( ) c ( t k ) d (2 t k ) ∑ ∑∑ = ϕ − + ψ − k jk k k j scaling function wavelet function

  33. 1D Haar Wavelets • Haar scaling and wavelet functions: φ (t) ψ (t) computes details computes average

  34. 1D Haar Wavelets (cont’d) • V 0 represents the space of one pixel images • Think of a one-pixel image as a function that is constant over [0,1) width: 1 Example: 0 1

  35. 1D Haar Wavelets (cont’d) • V 1 represents the space of all two-pixel images • Think of a two-pixel image as a function having 2 1 equal-sized constant pieces over the interval [0, 1). width: 1/2 0 ½ 1 Examples: V V ⊂ • Note that 0 1 e.g., + =

  36. 1D Haar Wavelets (cont’d) • V j represents all the 2 j -pixel images • Functions having 2 j equal-sized constant pieces over interval [0,1). Examples: width: 1/2 j V V • Note that − ⊂ j 1 j ϵ V j e.g., ϵ V j

  37. 1D Haar Wavelets (cont’d) V 0 , V 1 , ..., V j are nested V V + ⊂ i.e., j j 1 V J fine details … V 1 V 0 coarse details

  38. Define a basis for V j • Mother scaling function: 1 0 1 • Let ’ s define a basis for V j : j ( ) x ( ) x ϕ ≡ ϕ note alternative notation: i ji

  39. Define a basis for V j (cont’d)

  40. Define a basis for W j (cont’d) • Mother wavelet function: 1 -1 0 1/2 1 • Let’s define a basis ψ j i for W j : j ( ) x ( ) x note alternative notation: ψ ≡ ψ i ji

  41. Define a basis for W j Note that the dot product between basis functions in V j and W j is zero!

  42. Define a basis for W j (cont’d) Basis functions ψ j i of W j form a basis in V j+1 Basis functions φ j i of V j

  43. Example - Revisited f(x)= V 2

  44. Example (cont’d) (divide by 2 for normalization) V 1 and W 1 φ 1,0 (x) V 2 =V 1 +W 1 φ 1,1 (x) ψ 1,0 (x) ψ 1,1 (x)

  45. Example (cont’d) (divide by 2 for normalization) V 0 ,W 0 and W 1 φ 0,0 (x) V 2 =V 1 +W 1 =V 0 +W 0 +W 1 ψ 0,0 (x) ψ 1,0 (x) ψ 1,1 (x)

  46. Example

  47. Example (cont’d)

  48. Filter banks • The lower resolution coefficients can be calculated from the higher resolution coefficients by a tree- structured algorithm (i.e., filter bank). Subband encoding (analysis) h 0 (-n) is a lowpass filter and h 1 (-n) is a highpass filter

  49. Example (revisited) [9 7 3 5] low-pass, high-pass, down-sampling down-sampling (9+7)/2 (3+5)/2 (9-7)/2 (3-5)/2 V 1 basis functions

Recommend


More recommend