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

short time fourier transform
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 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.

slide-2
SLIDE 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)

slide-3
SLIDE 3

The Wavelet Transform (cont’d)

Wide windows do not provide good localization at high frequencies.

slide-4
SLIDE 4

The Wavelet Transform (cont’d)

A narrower window is more appropriate at high frequencies.

slide-5
SLIDE 5

The Wavelet Transform (cont’d)

Narrow windows do not provide good localization at low frequencies.

slide-6
SLIDE 6

The Wavelet Transform (cont’d)

A wider window is more appropriate at low frequencies.

slide-7
SLIDE 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

slide-8
SLIDE 8

Wavelets

  • Like sine and cosine functions in FT, wavelets can define

basis functions ψk(t):

  • Span of ψk(t): vector space S containing all functions f(t)

that can be represented by ψk(t).

( ) ( )

k k k

f t a t ψ =∑

slide-9
SLIDE 9

Wavelets (cont’d)

  • There are many different wavelets:

Morlet Haar Daubechies

slide-10
SLIDE 10

Basis Construction - Mother Wavelet

( )

jk t

ψ =

slide-11
SLIDE 11

Basis Construction - Mother Wavelet (cont’d)

scale =1/2j (1/frequency)

( )

/2

( ) 2 2

j j jk t

t k ψ ψ = −

j k

slide-12
SLIDE 12

Discrete Wavelet Transform (DWT)

( ) ( )

jk jk k j

f t a t ψ = ∑∑

( )

/2

( ) 2 2

j j jk t

t k ψ ψ = −

(inverse DWT) (forward DWT) where

*

( ) ( )

jk

jk t

a f t t ψ =∑

slide-13
SLIDE 13

DFT vs DWT

  • FT expansion:
  • WT expansion
  • r
  • ne parameter basis

( ) ( )

l l l

f t a t ψ =∑ ( ) ( )

jk jk k j

f t a t ψ =∑∑

two parameter basis

slide-14
SLIDE 14

Multiresolution Representation using

high resolution

(more details)

low resolution

(less details)

( ) ( )

jk jk k j

f t a t ψ =∑ ∑

( ) f t

1

ˆ ( ) f t

2

ˆ ( ) f t ˆ ( )

s

f t ( )

jk t

ψ

j

slide-15
SLIDE 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)

slide-16
SLIDE 16

Efficient Representation Using “Details”

details D2

L0

details D3 details D1

(without sub-sampling)

slide-17
SLIDE 17

Efficient Representation Using Details (cont’d)

representation: L0 D1 D2 D3

A wavelet representation of a function consists of (1) a coarse overall approximation (2) detail coefficients that influence the function at various scales.

in general: L0 D1 D2 D3…DJ

slide-18
SLIDE 18

Reconstruction (synthesis)

H3=H2+D3 details D2 L0

details D3

H2=H1+D2 H1=L0+D1 details D1

(without sub-sampling)

slide-19
SLIDE 19

Example - Haar Wavelets

  • Suppose we are given a 1D "image" with a resolution
  • f 4 pixels:

[9 7 3 5]

  • The Haar wavelet transform is the following:

L0 D1 D2 D3

(with sub-sampling)

slide-20
SLIDE 20

Example - Haar Wavelets (cont’d)

  • Start by averaging the pixels together (pairwise) to get

a new lower resolution image:

  • To recover the original four pixels from the two

averaged pixels, store some detail coefficients.

1 [9 7 3 5]

slide-21
SLIDE 21

Example - Haar Wavelets (cont’d)

  • Repeating this process on the averages (i.e., low

resolution image) gives the full decomposition:

1 Harr decomposition:

slide-22
SLIDE 22

Example - Haar Wavelets (cont’d)

  • We can reconstruct the original image by adding or

subtracting the detail coefficients from the lower- resolution versions.

2 1 -1

slide-23
SLIDE 23

Example - Haar Wavelets (cont’d)

Detail coefficients become smaller and smaller as j increases.

Dj Dj-1 D1 L0

How to compute Di ?

slide-24
SLIDE 24

Multiresolution Conditions

  • If a set of functions can be represented by a weighted

sum of ψ(2jt - k), then a larger set, including the

  • riginal, can be represented by a weighted sum of ψ(2j

+1t - k):

low resolution high resolution

j

slide-25
SLIDE 25

Multiresolution Conditions (cont’d)

  • If a set of functions can be represented by a weighted

sum of ψ(2jt - k), then a larger set, including the

  • riginal, can be represented by a weighted sum of ψ(2j

+1t - k):

Vj: span of ψ(2jt - k):

( ) ( )

j k jk k

f t a t ψ =∑

Vj+1: span of ψ(2j+1t - k):

1 ( 1)

( ) ( )

j k j k k

f t b t ψ

+ +

=∑

1 j j

V V + ⊆

slide-26
SLIDE 26

Nested Spaces Vj

ψ(t - k) ψ(2t - k) ψ(2jt - k) … V0 V1 Vj Vj : space spanned by ψ(2jt - k) Multiresolution conditions à nested spanned spaces:

( ) ( )

jk jk k j

f t a t ψ =∑ ∑

f(t) ϵ Vj Basis functions: i.e., if f(t) ϵ V j then f(t) ϵ V j+1

1 j j

V V + ⊂

slide-27
SLIDE 27

How to compute Di ? (cont’d)

( ) ( )

jk jk k j

f t a t ψ =∑ ∑

f(t) ϵ Vj IDEA: define a set of basis functions that span the difference between Vj+1 and Vj

slide-28
SLIDE 28

Orthogonal Complement Wj

  • Let Wj be the orthogonal complement of Vj in Vj+1

Vj+1 = Vj + Wj

slide-29
SLIDE 29

How to compute Di ? (cont’d)

If f(t) ϵ Vj+1, then f(t) can be represented using basis functions φ(t) from Vj+1:

1

( ) (2 )

j k k

f t c t k ϕ

+

= −

( ) (2 ) (2 )

j j k jk k k

f t c t k d t k ϕ ψ = − + −

∑ ∑

Vj+1 = Vj + Wj Alternatively, f(t) can be represented using two sets of basis functions, φ(t) from Vj and ψ(t) from Wj: Vj+1

slide-30
SLIDE 30

Think of Wj as a means to represent the parts of a function in Vj+1 that cannot be represented in Vj

1

( ) (2 )

j k k

f t c t k ϕ

+

= −

( ) (2 ) (2 )

j j k jk k k

f t c t k d t k ϕ ψ = − + −

∑ ∑

Vj Wj

How to compute Di ? (cont’d)

differences between Vj and Vj+1

slide-31
SLIDE 31

How to compute Di ? (cont’d)

  • à using recursion on Vj:

( ) ( ) (2 )

j k jk k k j

f t c t k d t k ϕ ψ = − + −

∑ ∑∑

V0 W0, W1, W2, …

basis functions basis functions

Vj+1 = Vj-1+Wj-1+Wj = …= V0 + W0 + W1 + W2 + … + Wj if f(t) ϵ Vj+1 , then: Vj+1 = Vj + Wj

slide-32
SLIDE 32

Summary: wavelet expansion (Section 7.2)

  • Wavelet decompositions involve a pair of waveforms

(mother wavelets):

φ(t) ψ(t)

encode low resolution info encode details or high resolution info

( ) ( ) (2 )

j k jk k k j

f t c t k d t k ϕ ψ = − + −

∑ ∑∑

scaling function wavelet function

slide-33
SLIDE 33

1D Haar Wavelets

  • Haar scaling and wavelet functions:

computes average computes details

φ(t) ψ(t)

slide-34
SLIDE 34

1D Haar Wavelets (cont’d)

  • V0 represents the space of one pixel images
  • Think of a one-pixel image as a function that is constant
  • ver [0,1)

Example:

0 1

width: 1

slide-35
SLIDE 35

1D Haar Wavelets (cont’d)

  • V1 represents the space of all two-pixel images
  • Think of a two-pixel image as a function having 21

equal-sized constant pieces over the interval [0, 1).

  • Note that

Examples:

0 ½ 1

1

V V ⊂

= +

width: 1/2

e.g.,

slide-36
SLIDE 36

1D Haar Wavelets (cont’d)

  • V j represents all the 2j-pixel images
  • Functions having 2j equal-sized constant pieces over

interval [0,1).

  • Note that

Examples: width: 1/2j

ϵ Vj ϵ Vj

1 j j

V V

− ⊂

e.g.,

slide-37
SLIDE 37

1D Haar Wavelets (cont’d)

V0, V1, ..., V j are nested

i.e.,

VJ … V1 V0 coarse details fine details

1 j j

V V + ⊂

slide-38
SLIDE 38

Define a basis for Vj

  • Mother scaling function:
  • Let’s define a basis for V j :

0 1

note alternative notation:

( ) ( )

j i ji

x x ϕ ϕ ≡

1

slide-39
SLIDE 39

Define a basis for Vj (cont’d)

slide-40
SLIDE 40

Define a basis for Wj (cont’d)

  • Mother wavelet function:
  • Let’s define a basis ψ j

i for Wj :

1

  • 1

0 1/2 1

( ) ( )

j i ji

x x ψ ψ ≡

note alternative notation:

slide-41
SLIDE 41

Define a basis for Wj

Note that the dot product between basis functions in Vj and Wj is zero!

slide-42
SLIDE 42

Define a basis for Wj (cont’d)

Basis functions ψ j

i of W j

Basis functions φ j

i of V j

form a basis in V j+1

slide-43
SLIDE 43

Example - Revisited

f(x)= V2

slide-44
SLIDE 44

Example (cont’d)

V1and W1 V2=V1+W1

φ1,0(x) φ1,1(x) ψ1,0(x) ψ1,1(x)

(divide by 2 for normalization)

slide-45
SLIDE 45

Example (cont’d)

V2=V1+W1=V0+W0+W1 V0 ,W0 and W1

φ0,0(x) ψ0,0(x) ψ1,0 (x) ψ1,1(x)

(divide by 2 for normalization)

slide-46
SLIDE 46

Example

slide-47
SLIDE 47

Example (cont’d)

slide-48
SLIDE 48

Filter banks

  • The lower resolution coefficients can be calculated

from the higher resolution coefficients by a tree- structured algorithm (i.e., filter bank).

h0(-n) is a lowpass filter and h1(-n) is a highpass filter Subband encoding (analysis)

slide-49
SLIDE 49

Example (revisited)

[9 7 3 5]

low-pass, down-sampling high-pass, down-sampling

(9+7)/2 (3+5)/2 (9-7)/2 (3-5)/2

V1 basis functions

slide-50
SLIDE 50

Filter banks (cont’d)

Next level:

slide-51
SLIDE 51

Example (revisited)

[9 7 3 5]

high-pass, down-sampling low-pass, down-sampling

(8+4)/2 (8-4)/2

V1 basis functions

slide-52
SLIDE 52

Convention for illustrating 1D Haar wavelet decomposition

x x x x x x … x x

detail average

re-arrange: re-arrange: V1 basis functions

slide-53
SLIDE 53

Examples of lowpass/highpass (analysis) filters

Haar h0 h1

slide-54
SLIDE 54

Filter banks (cont’d)

  • The higher resolution coefficients can be calculated from

the lower resolution coefficients using a similar structure. Subband encoding (synthesis)

slide-55
SLIDE 55

Filter banks (cont’d)

Next level:

slide-56
SLIDE 56

Examples of lowpass/highpass (synthesis) filters

Haar (same as for analysis):

+

g0 g1

slide-57
SLIDE 57

2D Haar Wavelet Transform

  • The 2D Haar wavelet decomposition can be computed

using 1D Haar wavelet decompositions.

– i.e., 2D Haar wavelet basis is separable

  • Two decompositions (i.e., correspond to different

basis functions):

– Standard decomposition – Non-standard decomposition

slide-58
SLIDE 58

Standard Haar wavelet decomposition

  • Steps

(1) Compute 1D Haar wavelet decomposition of each row of

the original pixel values. (2) Compute 1D Haar wavelet decomposition of each column of the row-transformed pixels.

slide-59
SLIDE 59

Standard Haar wavelet decomposition (cont’d)

x x x … x x x x … x … … . x x x ... x (1) row-wise Haar decomposition: …

detail average

… … … . … … … … .

re-arrange terms

slide-60
SLIDE 60

Standard Haar wavelet decomposition (cont’d)

(1) row-wise Haar decomposition: …

detail average

… … … … . … … … . …

row-transformed result

slide-61
SLIDE 61

Standard Haar wavelet decomposition (cont’d)

(2) column-wise Haar decomposition: …

detail average

… … … … . … … … … … . …

row-transformed result column-transformed result

slide-62
SLIDE 62

Example

… … … … … .

row-transformed result

… … … .

re-arrange terms

slide-63
SLIDE 63

Example (cont’d)

… … … … … .

column-transformed result

slide-64
SLIDE 64

Non-standard Haar wavelet decomposition

  • Alternates between operations on rows and columns.

(1) Perform one level decomposition in each row (i.e., one step of horizontal pairwise averaging and differencing). (2) Perform one level decomposition in each column from step 1 (i.e., one step of vertical pairwise averaging and differencing). (3) Repeat the process on the quadrant containing averages

  • nly (i.e., in both directions).
slide-65
SLIDE 65

Non-standard Haar wavelet decomposition (cont’d)

x x x … x x x x … x … … . x x x . . . x

  • ne level, horizontal

Haar decomposition: … … … … . … … … … … .

  • ne level, vertical

Haar decomposition: …

slide-66
SLIDE 66

Non-standard Haar wavelet decomposition (cont’d)

  • ne level, horizontal

Haar decomposition

  • n “green” quadrant
  • ne level, vertical

Haar decomposition

  • n “green” quadrant

… … … … . … …

re-arrange terms

… … … … … . …

slide-67
SLIDE 67

Example

… … … … . … …

re-arrange terms

slide-68
SLIDE 68

Example (cont’d)

… … … … … .

slide-69
SLIDE 69

2D DWT using filter banks (analysis)

LL LH HL HH

slide-70
SLIDE 70

2D DWT using filter banks (analysis)

LL Hà LH Và HL Dà HH The wavelet transform is applied again on the LL sub-image

LL LL LH HL HH

slide-71
SLIDE 71

2D DWT using filter banks (analysis)

slide-72
SLIDE 72

Fast Multiresolution Image Querying

painted low resolution target

queries

Charles E. Jacobs Adam Finkelstein David H. Salesin, "Fast Multiresolution Image Querying", SIGRAPH, 1995.