You are on page 1of 159

Digital Signal

Processing
Multirate Digital Signal Processing
Discrete-time systems may be single-rate systems or multi-rate systems. The systems that use
single sampling rate from A/D converter to D/A converter are known as single-rate systems.
multi-rate systems. In digital audio, the different sampling rates used are 32 kHz for broadcasting,
44.1 kHz for compact disc and 48 kHz for audio tape.
In digital video, the sampling rates for composite video signals are 14.31 MHz and 17.73 MHz for
NTSC and PAL respectively. But the sampling rates for digital component of video signals are 13.5
MHz and 6.75 MHz for luminance and colur difference signal.
Different sampling rates can be obtained using an up sampler and down sampler. The basic
operations in multirate processing to achieve this are decimation and interpolation. Decimation is
for reducing the sampling rate and interpolation is for increasing the sampling rate. There are
many cases where multi-rate signal processing is used. Few of them are as follows:
There are many cases where multi-rate signal processing is used. Few of them are as
follows:
1. In high quality data acquisition and storage systems
2. In audio signal processing
3. In video
4. In speech processing
5. In progressive decoder
6. For narrow band filtering

While designing multi-rate systems, effects of aliasing for decimation and pseudo images for
interpolators should be avoided.
Multiresolution Signal Decomposition
Pyramids

9.05.2023 4
9.05.2023 5
- =

Subsampling
Upsampling

- =

Subsampling
Upsampling

9.05.2023 6
Interpolation error coding

9.05.2023 7
Interpolation error coding

9.05.2023 8
Predictive pyramid

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 9
DOÇ.DR.HAKAN ÇAĞLAR
Predictive pyramid

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 10
DOÇ.DR.HAKAN ÇAĞLAR
Comparison: interpolation error coding vs. Pyramid

• Resolution layer #0, interpolated to original size for display

9.05.2023 11
Comparison: interpolation error coding vs. Pyramid
• Resolution layer #1, interpolated to original size for display

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 12
DOÇ.DR.HAKAN ÇAĞLAR
Comparison:interpolation error coding vs. Pyramid
• Resolution layer #2, interpolated to original size for display

9.05.2023 13
Comparison: interpolation error coding vs. Pyramid
• Resolution layer #3

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 14
DOÇ.DR.HAKAN ÇAĞLAR
Optimum bit allocation for pyramid

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 15
DOÇ.DR.HAKAN ÇAĞLAR
Multiresolution Signal Decomposition - Subband Coding

• Multiresolution Signal Processing


• Down Sampling
• Up Sampling

• Subband Filter Banks (PR-QMF)

9.05.2023 16
Input Signal

1 1 1 1 5 7 9 11 13 20 20 20 20 10 10 5 4 3 2 1

Down Sampled Signal

1 1 5 9 13 20 20 10 4 2

Up Sampled Signal

1 0 1 0 5 0 9 0 13 0 20 0 20 0 10 0 4 0 2 0

Interpoleted Signal

1 1 1 3 5 7 9 11 13 17 20 20 20 15 10 7 4 3 2 0

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 17
DOÇ.DR.HAKAN ÇAĞLAR
Input Signal
25

0
2 4 6 8 10 12 14 16 18 20

Down sampled Signal


25

0
2 4 6 8 10

Up Sampled Signal
25

0
2 4 6 8 10 12 14 16 18 20

9.05.2023 18
Down sampling:
x(n) xdown(n)
2

Xdown(n)=x(2n) X down ( z ) =
1
2

X ( z 1 / 2 ) + X ( z −1 / 2 ) 

Up sampling: x(n) xup(n)


2

 x( n / 2) n = 0,2,4,...
 X up ( z ) = X ( z 2 )
x up ( n) = 
 0 otherwise

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 19
DOÇ.DR.HAKAN ÇAĞLAR
up
x(n) xdown (n) xdown (n)
2 2

 x ( n) n = 0,2,4,...
up
xdown

( n) = 
up
X down (z) =
1
 X ( z ) + X ( − z )
2
 0 otherwise

up
x(n) xdown (n)

0 1 2 3 4 5 6 7 8 9 10 11 0 1 2 3 4 5 6 7 8 9 10 11

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 20
DOÇ.DR.HAKAN ÇAĞLAR
Subband Coding – Subband Filter Banks

h0 ( n) 2 2 g 0 ( n)
x(n) xˆ ( n)
+
h1 ( n ) 2 2 g1 ( n )

H (e j )

Low Band High Band

0  /2  
9.05.2023 21
Subband Coding:
Perfect Reconstruction Quadrature Mirror Filter Banks
(PR-QMF)

y0 ( n) f 0 ( n)
h0 ( n) 2 2 g 0 ( n)
x(n) xˆ ( n)
+
h1 ( n ) 2 2 g1 ( n )
y1 ( n) f1 ( n)

PR-Condition
xˆ ( n) = x( n − n0 )  Xˆ ( z ) = z − n0 X ( z )

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 22
DOÇ.DR.HAKAN ÇAĞLAR
Y0(z) = H 0(z)X ( z )

Y1(z) = H 1(z)X ( z )

F0(z) =
1
Y0(z) + Y0( − z) = 1 H 0(z)X(z) + H 0( − z)X( − z)
2 2

F1(z) =
1
Y1(z) + Y1( − z) = 1 H 1(z)X(z) + H 1( − z)X( − z)
2 2

Xˆ ( z ) = F0 ( z )G0 ( z ) + F1 ( z )G1 ( z )

9.05.2023 23
Xˆ ( z ) = G0 ( z )H 0 ( z ) X ( z ) + H 0 ( − z ) X ( − z )
1
2

+ G1 ( z )H 1 ( z ) X ( z ) + H 1 ( − z ) X ( − z )
1
2

Xˆ ( z ) = H 0 ( z )G0 ( z ) + H 1 ( z )G1 ( z )X ( z )


1
2

+
1
H 0 (− z )G0 ( z ) + H 1 (− z )G1 ( z )X (− z )
2

aliasing term

9.05.2023 24
Perfect Reconstruction Filter Bank

PR Conditions yields to: xˆ ( n) = x( n − n0 )  Xˆ ( z ) = z − n0 X ( z )

Equivalently

H 0 ( z )G0 ( z ) + H 1 ( z )G1 ( z ) = 2

H 0 ( − z )G0 ( z ) + H 1 ( − z )G1 ( z ) = 0

9.05.2023 25
 H0 (z) H 1 ( z )  G0 ( z )  2
 H 0 ( − z ) H 1 ( − z ) G1 ( z )  = 0

G0 ( z ) 2  H1 (− z ) 
=
G1 ( z )  det( H ( z ))  − H 1 ( z )
m

where H m (z)

 H0 (z) H1 ( z) 
 H 0 ( − z ) H 1 ( − z ) Aliasing Cancellation matrix

9.05.2023 26
Some important relations in Z transform

h( n)  H ( z )

H ( z ) =  h( n) z − n
n

h1 ( n) = ( −1) n h( n)  H 1 ( z ) = H ( − z )

h2 ( n) = h( − n)  H 2 ( z ) = H ( z −1 )

h3 ( n) = h( n − n0 )  H 2 ( z ) = z − n0 H ( z )

9.05.2023 27
h0 ( n) 2 2 g 0 ( n)
x(n) xˆ ( n)
+
h1 ( n ) 2 2 g1 ( n )

h0 ( n) H0 (z)
h1 ( n) = ( −1) n−1 h0 ( N − 1 − n) H 1 ( z ) = z − ( N −1 ) H 0 ( − z −1 )
g0 ( n) = h0 ( N − 1 − n) G0 ( z ) = z − ( N − 1 ) H 0 ( z − 1 )
g1 ( n) = ( −1) n h0 ( n) G1 ( z ) = H 0 ( − z )

9.05.2023 28
PR-QMF Filter Banks (Example 6-Tap)

H 0 ( z ) = h0 (0) + h0 (1) z −1 + h0 ( 2) z −2 + h0 ( 3) z −3 + h0 (4) z −4 + h0 (5) z −5


H 1 ( z ) = z − 5 h0 (0) − h0 (1) z + h0 ( 2) z 2 − h0 ( 3) z 3 + h0 (4) z 4 − h0 (5) z 5 
= − h0 (5) + h0 (4) z −1 − h0 ( 3) z − 2 + h0 ( 2) z − 3 − h0 (1) z − 4 + h0 (0) z − 5

G0 ( z ) = h0 (5) + h0 (4) z −1 + h0 ( 3) z − 2 + h0 ( 2) z − 3 + h0 (1) z − 4 + h0 (0) z − 5

G1 ( z ) = h0 (0) − h0 (1) z −1 + h0 ( 2) z − 2 − h0 ( 3) z − 3 + h0 (4) z − 4 − h0 (5) z − 5

9.05.2023 29
H 0 ( z )G0 ( z ) + H 1 ( z )G1 ( z ) = 2

H 0 ( z ) z − ( N −1 ) H 0 ( z −1 ) + z − ( N −1 ) H 0 ( − z −1 ) H 0 ( − z ) = 2

 
z − ( N −1 ) H 0 ( z ) H 0 ( z −1 ) + H 0 ( − z −1 ) H 0 ( − z ) = 2

Therefore ;

H 0 ( z ) H 0 ( z −1 ) + H 0 ( − z ) H 0 ( − z −1 ) = 2
j 2 j ( + ) 2
H 0 (e ) + H 0 (e ) =2

9.05.2023 30
H 0 ( − z )G0 ( z ) + H 1 ( − z )G1 ( z ) = 0

H 0 ( − z ) z − ( N −1 ) H 0 ( z −1 ) − z − ( N −1 ) H 0 ( z −1 ) H 0 ( − z ) = 0

H 1 ( z ) = z − ( N − 1 ) H 0 ( − z −1 )

G0 ( z ) = z − ( N − 1 ) H 0 ( z − 1 )

G1 ( z ) = H 0 ( − z )

9.05.2023 31
PR-QMF Filter Banks: PR Conditions;

H 0 ( z ) H 0 ( z −1 ) + H 0 ( − z −1 ) H 0 ( − z ) = 2
j 2 j ( + ) 2
H 0 (e ) + H 0 (e ) =2
H 1 ( z ) = z − ( N − 1 ) H 0 ( − z −1 )
N −1

 h0 (k )h0 (k + 2n) = 0,
k =0
n0 G0 ( z ) = z − ( N − 1 ) H 0 ( z − 1 )

N −1
G1 ( z ) = H 0 ( − z )
 h0 (k ) = 1
2

k =0

9.05.2023 32
2-Tap Perfect Reconstruction
Quadrature Mirror Filter Banks (PR-QMF)

h0 ( n) 2 2 g 0 ( n)
x(n) xˆ ( n)
+
h1 ( n ) 2 2 g1 ( n )

h0(n) = [ 0.7071 0.7071] g0(n) = [ 0.7071 0.7071]


h1(n) = [-0.7071 0.7071] g1(n) = [ 0.7071 -0.7071]

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 33
DOÇ.DR.HAKAN ÇAĞLAR
4-Tap Perfect Reconstruction
Quadrature Mirror Filter Banks (PR-QMF)

Decomposition low-pass filter Decomposition high-pass filter

h0(n) = -0.1294 0.2241 0.8365 0.4830


h1(n) = -0.4830 0.8365 -0.2241 -0.1294
g0(n) = 0.4830 0.8365 0.2241 -0.1294 Reconstruction low-pass filter Reconstruction high-pass filter

g1(n) = -0.1294 -0.2241 0.8365 -0.4830

The four PR-QMF filters

9.05.2023 34
6-Tap Perfect Reconstruction
Quadrature Mirror Filter Banks (PR-QMF)

Decomposition low-pass filter Decomposition high-pass filter

0.0352 -0.0854 -0.1350 0.4599 0.8069 0.3327


-0.3327 0.8069 -0.4599 -0.1350 0.0854 0.0352
0.3327 0.8069 0.4599 -0.1350 -0.0854 0.0352
Reconstruction low-pass filter
0.0352 0.0854 -0.1350 -0.4599 0.8069 -0.3327 Reconstruction high-pass filter

9.05.2023 35
PR-QMF Filter Banks h0(n), N=2,4,6,8,10,12

0.0033 -0.0011
0.7071 -0.1294 0.0352 -0.0106
-0.0126 0.0048
0.7071 0.2241 -0.0854 0.0329
-0.0062 0.0006
0.8365 -0.1350 0.0308
0.0776 -0.0316
0.4830 0.4599 -0.1870
-0.0322 0.0275
0.8069 -0.0280
-0.2423 0.0975
0.3327 0.6309
0.1384 -0.1298
0.7148
0.7243 -0.2263
0.2304
0.6038 0.3153
0.1601 0.7511
0.4946
0.1115

9.05.2023 36
Frequency Response of PR-QMF’s (h0, h1), N=4,8,12

4-Tap Filter FT 8-Tap Filter FT 12-Tap Filter FT


1.5 1.5 1.5

1 1 1

0 pi/2 pi 0 pi/2 pi 0 pi/2 pi

9.05.2023 37
Frequency Response of PR-QMF for N=4,8,12
Frequency Response 4-8-12 Tap LPF
1.5

0 pi/4 pi/2 3pi/4 pi

9.05.2023 38
Original signal
15

10

0
0 5 10 15 20 25 30 35 40 45

Low-Pass Approximated signal

20

10

0
0 5 10 15 20 25 30 35 40 45

Down Sampled by 2

20

0
0 12 24

9.05.2023 39
Original signal Original signal
40 40

30 30

20 20

10 10

0 0
0 5 10 15 20 25 30 35 40 45 0 5 10 15 20 25 30 35 40 45

Low pass Approx.(4tap) High pass Detail (4Tap) Low pass Approx.(4tap) High pass Detail (4Tap)
60 5 60 10

5
40 0 40
0
20 -5 20
-5

0 -10 0 -10
0 10 20 30 0 10 20 30 0 10 20 30 0 10 20 30

9.05.2023 40
Original signal
20

15

10

0
0 10 20 30 40 50 60 70 80

Low pass Approx.(8tap) High pass Detail (8Tap)


40 10

30 5

20 0

10 -5

0 -10
0 10 20 30 40 0 10 20 30 40

9.05.2023 41
Original signal
20

15

10

0
0 10 20 30 40 50 60 70 80

Low pass Approx.(2tap) High pass Detail (2Tap)


30 10

5
20
0
10
-5

0 -10
0 10 20 30 40 0 10 20 30 40

9.05.2023 42
Original signal
20

10

0
0 10 20 30 40 50 60 70 80
Low pass Approx.(6tap) High pass Detail (6Tap)
40 10

20 0

0 -10
0 10 20 30 40 0 10 20 30 40
Detail2 coef. Detail2 coef.
60 10

40
0
20

0 -10
0 10 20 0 10 20

9.05.2023 43
Original signal
150

100

50

0
0 20 40 60 80 100 120 140 160 180 200
Low pass Approx.(6tap) High pass Detail (6Tap)
200 50 L H

0
LL LH
0 -50
0 20 40 60 80 100 0 20 40 60 80 100

Detail2 coef. Detail2 coef.


250 50

0 -50
0 50 0 50

9.05.2023 44
Original signal
150

100

50

0
0 20 40 60 80 100 120 140 160 180 200

Reconstructed signal
150

100

50

0
0 20 40 60 80 100 120 140 160 180 200

Approximated signal
200

100

0
0 20 40 60 80 100

9.05.2023 45
Original signal
150

100

50

0
0 20 40 60 80 100 120 140 160 180 200

Reconstructed signal
150

100

50

0
0 20 40 60 80 100 120 140 160 180 200

9.05.2023 46
Dyadic Tree

Recursive application of a two-band filter bank to the lowpass band of the


previous stage yields octave band splitting:

Same concept can be derived from wavelet theory:


Discrete Wavelet Transform (DWT)

9.05.2023 47
2-D Subband Decomposition

9.05.2023 48
2-D 4 BAND FİLTER BANK (TRANSMIT)

9.05.2023 49
2-D 4 BAND FİLTER BANK (RECEIVE)

9.05.2023 50
9.05.2023 51
Original Image 4 Subband Image (LL, LH, HL, HH) 7 Subband Image (2nd iteration)

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 52
DOÇ.DR.HAKAN ÇAĞLAR
10 Subband Image (3nd iteration) 13 Subband Image (4rd iteration)

9.05.2023 53
Subband Decomposition:

9.05.2023 54
M-Band Subband coding

9.05.2023 55
Full Tree Decomposition (64 Band)

9.05.2023 56
Optimum Tree Decomposition

9.05.2023 57
Subband Decomposition

• N=2 Tap Orthogonal


• N=8 Tap Orthogonal
• Biorthogonal
• Symetrical (not PR)

9.05.2023 58
Subband Decomposition

a) Original image 512x512


b) Compressed 0.74 bpp
c) Compressed 0.48 bpp
d) Error images
e) Enlarged images

9.05.2023 59
Finger Print Compression:

(a) Original finger print, (b) JPEG comp.ratio=12.9, (c) Wavelet transform comp.ratio=12.9

9.05.2023 60
Subband coding vs. transform coding

Transform coding is a special case of subband coding


with:

• Number of bands = order of transform N


• Subsampling factor K = N
• Length of impulse responses of analysis/synthesis filters N
• Filters used in subband coders may be non-orthogonal.
• No linear phase PR-QMF solution (except trivial case N=2)

9.05.2023 61
Summary:
multiresolution and subband coding

• Resolution pyramids with subsampling 2:1 horizontally and vertically


• Pyramids: overcomplete representation of the image
• Critically sampled subband decomposition: number of samples not
increased
• Quadrature mirror filters: aliasing cancellation
• Discrete Wavelet Transform = cascaded 2:1 subband splits
• Transform coding is a special case of subband coding

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 62
DOÇ.DR.HAKAN ÇAĞLAR
CHAPTER 6: WAVELET TRANSFORM
9.05.2023 63
DOÇ.DR.HAKAN ÇAĞLAR
JPEG vs Wavelet Compression:
1.0 bpp

9.05.2023 64
JPEG vs Wavelet Compression:
0.82 bpp

9.05.2023 65
JPEG vs Wavelet Compression:
0.26 bpp

9.05.2023 66
JPEG vs Wavelet Compression:
0.15 bpp

9.05.2023 67
• JPEG 2000 Compression Standarts

• JPEG 2000 vs JPEG

9.05.2023 68
Why another still image compression standard?

The current standards fail to produce the best quality or performance,


as for example:

·Low bit-rate compression: for example below 0.25 bpp

·Lossless and lossy compression: No current standard exists that can provide
superior lossy and lossless compression in a single codestream.

·Computer generated imagery: JPEG was optimized for natural imagery and
does not perform well on computer generated imagery.

9.05.2023 69
Digital Image Processing
Chapter 6: Wavelet Transform

Why another still image compression standard? (cont’d)

·Transmission in noisy environments: The current JPEG standard has image


quality suffers dramatically when bit errors are encountered.

·Compound documents: Currently, JPEG is seldom used in the compression


of compound documents because of its poor performance when applied to
bi-level (text) imagery.

·Random codestream access and processing

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 70
DOÇ.DR.HAKAN ÇAĞLAR
Digital Image Processing
Chapter 6: Wavelet Transform

Why another still image compression standard? (cont’d)

· Open Architecture: Desirable to allow open architecture to optimise


the system for different image types and applications.
· Progressive transmission by pixel accuracy and resolution

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 71
DOÇ.DR.HAKAN ÇAĞLAR
JPEG at 0.125 bpp JPEG2000 at 0.125 bpp

9.05.2023 72
JPEG at 0.25 bpp JPEG2000 at 0.25 bpp

9.05.2023 73
JPEG at 0.5 bpp JPEG2000 at 0.5 bpp

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 74
DOÇ.DR.HAKAN ÇAĞLAR
JPEG compound image 1.0 bpp

9.05.2023 75
JPEG2000 compound image 1.0 bpp

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 76
DOÇ.DR.HAKAN ÇAĞLAR
Major Differences between
JPEG and JPEG2000
• New functionalities
– ROI
– Better error resiliency
– More flexible progressive coding
– ...
• Lossy to lossless in one system
• Better compression at low bit-rates
• Better at compound images and graphics (palletized)

9.05.2023 77
Multiresolution decomposition

9.05.2023 78
Multiresolution decomposition

9.05.2023 79
Multiresolution decomposition

9.05.2023 80
Multiresolution decomposition

9.05.2023 81
Scalability - Progressive By Resolution

9.05.2023 82
Scalability - Progressive By Resolution

9.05.2023 83
Scalability - Progressive By Resolution

9.05.2023 84
Scalability - Progressive By Resolution

9.05.2023 85
Scalability - Progressive By Accuracy

9.05.2023 86
Scalability - Progressive By Accuracy

9.05.2023 87
Scalability - Progressive By Accuracy

9.05.2023 88
Example:
Progressive by resolution
• Image: Woman
• Resolution levels: 5
• Decoded sizes: 1/16
1/8
1/4
1/2
1

9.05.2023 89
9.05.2023 90
0.125 bpp

9.05.2023 91
0.25 bpp

9.05.2023 92
0.5 bpp

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 93
DOÇ.DR.HAKAN ÇAĞLAR
1.0 bpp

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 94
DOÇ.DR.HAKAN ÇAĞLAR
2.0 bpp

9.05.2023 95
Region Of Interest coding

• Allows certain parts of an image to be coded or decoded in better


quality
• Static:
• The ROI is decided and coded once for all in the encoder side
• Dynamic:
• The ROI can be decided and decoded on the fly from a same bitstream

9.05.2023 96
ROI: Some visual results
69:1 overall compression ratio

No ROI Rectangular ROI

9.05.2023 97
Regions Of Interest

9.05.2023 98
Regions Of Interest

9.05.2023 99
Regions Of Interest

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 100
DOÇ.DR.HAKAN ÇAĞLAR
0.125 bpp

9.05.2023 101
0.25 bpp

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 102
DOÇ.DR.HAKAN ÇAĞLAR
0.5 bpp

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 103
DOÇ.DR.HAKAN ÇAĞLAR
1.0 bpp

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 104
DOÇ.DR.HAKAN ÇAĞLAR
2.0 bpp

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 105
DOÇ.DR.HAKAN ÇAĞLAR
4.0 bpp

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 106
DOÇ.DR.HAKAN ÇAĞLAR
Wavelet Transform

• Nyquist Sampling Theorem


• Continous Wavelet Transform
• Discrete Wavelet Transform (DWT)
• Relation between DWT and PR-QMF

9.05.2023 107
Sampling of Continuous-Time Signal


1

jt
xa (t ) = X ( j  ) e d
2
a
−


− jt
X a ( j ) = x a (t ) e dt
−

x(n) = xa (nT ) = xa (t ) t = nT sampling period (T )


1

jnT
x(n) = xa (nT ) = X ( j  ) e d
2
a
−

9.05.2023 108

1

j jn
x ( n) = X ( e ) e d
2 −

 ( 2 r +1) / T
1
x ( n) =
2

r = −
( 2 r −1) / T
X a ( j)e jnT d

2r
 =+ then
T
1   /2 2r jnT j 2rn
x ( n) =
2
 
r = −
− /2
X a ( j + j
T
)e e d

9.05.2023 109
Note that e j 2rn = 1

1  /T   2r  jnT
x ( n) =
2 − / T r
= −
X a ( j  + j ) e d
T 

substituti on  =  /T

1  1  j 2r  jn
x ( n) =
2 − T r
= −
X a (
T
+ j ) e d
T 

1  j 2r
X (e ) =  X a (
j
+j )
T r = − T T
or

1  2r
X (e jT
) =  X a ( j + j )
T r = − T

9.05.2023 110
X a ( j)


0 0

2 2
X (e j )


− 2 −  2
 0T  0T

2 2

111
• If the sampling period (T) too larde, the shifted versions of X a ( j / T )
overlap.

• In this case the upper frequencies in X a ( j) get reflected into lower
frequencies in X (e j )

• High frequency components get low frequency identity called “aliasing”

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 112
DOÇ.DR.HAKAN ÇAĞLAR
xa(t) can be recovered from the samples xa(nT)

1
X (e jT ) = X a ( j) , − /T     /T
T
Fourier Transform,
1  /T
xa (t ) =
2 
− /T
X a ( j) e jt d

1  /T
xa (t ) =
2 
− /T
T X (e jT ) e jt d

9.05.2023 113

X (e jT
)=  x (kT ) e
k = −
a
− jTk

T  /T   − jTk  jt
xa (t ) =
2

− / T k =− x a ( kT ) e  e d


T  /T 
xa (t ) = 
k = −
xa (kT ) 
 2
− / Te − j ( t −Tk )
d 

Evaluting the integral, we obtain;



sin (/T)(t - kT) 
xa (t ) =  x (kT )
k = −
a
(/T)(t - kT)

9.05.2023 114

xa (t ) = c 
k = −
k k (t ) ,

where the coefficients ck and the functions  k (t ) are given by

c = x ( kT )
k a

and

sin ( / T )(t − kT )


 k (t ) =
( / T )(t − kT )

9.05.2023 115
0 
Note that : 
2 T
we sample at the rate at least twice the highest frequency of

X a ( j) . Then; X (e j ) = X a ( / T ) in interval −     

Then; xa (t ) can be recovered from the samples xa (nT )

This rate called " Nyquist rate".

9.05.2023 116
• Fourier Transform, Gabor Transform (STFT), Wavelet Transform

• Continuous Wavelet Transform

• Discrete Wavelet Transform

• Multiresolution Signal Analysis

• Relations between Wavelet Transform and PR-QMF’s

9.05.2023 117
EARLY HISTORY OF WAVELET THEORY
• Roots found in a variety of disciplines: Mathematics, Signal Processing,
Computer Vision, Physics.
• 1910 Haar basis - first wavelet.
• 1946 The Gabor transform - short time Fourier transform.
• 1964 Calderon's work on singular integral operators contains the continuous
wavelet transform.
• 1971 A. Rosenfeld and M. Thurston: multi-resolution techniques invented in
machine vision - multi-resolution schemes inherent in the wavelet transform.
• 1976 A. Croiser, D. Estaban, C. Galand: quadrature mirror filter banks for
speech coding - digital implementation of wavelets.

9.05.2023 118
Historic Outline

Wavelet theory combines pure and applied mathematics, physics, computer


science, engineering, etc.
• 1981. Morlet: kept the number of oscillations within a window constant,
varying the width of the window.
• 1985. Grossmann: discrete wavelet transform is reversible.
• 1985. Meyer: prove of existence of orthogonal wavelets.
• 1986. Mallat and Meyer: multiscale analysis
• 1992. Daubechies: orthogonal wavelets with compact support.
• Since then. Wavelet analysis evolved from a mathematical curiosity to a
major foundation of signal and image processing algorithms.

9.05.2023 119
PROBLEMS WITH THE
FOURIER TRANSFORM:
EXAMPLE

9.05.2023 120
PROBLEMS WITH THE FOURIER TRANSFORM
• Fourier transform well-suited for stationary signals - signals that do not vary
with time. This model does not fit real signals well.
• For time-varying signals or signals with abrupt transitions, the Fourier
transform does not provide information on when transitions occur.
• Fourier transform has excellent frequency localization, but poor time
localization.
• Need a better way to represent functions that are localized in both time and
frequency.

9.05.2023 121
THE SHORT-TIME FOURIER TRANSFORM PROPERTIES
• Linear transform.
• Time resolution and frequency resolution are determined by w(t), and
remain fixed
• time and frequency cannot be sampled (discretized) so that the analysis
functions form an orthonormal basis.
• Biggest disadvantage: since time and frequency resolution are fixed by
choice of w(t), need to know a priori what w(t) will work for the desired
application.

9.05.2023 122
THE SHORT-TIME FOURIER TRANSFORM
TIME-FREQUENCY RESOLUTION

9.05.2023 123
THE WAVELET TRANSFORM TIME-FREQUENCY RESOLUTION

Wavelet Transform: time, frequency vary as a function of scale


(scale = 1/frequency).

9.05.2023 124
• Windowed fourier transform or Gaborlets :

• Wavelets :

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 125
DOÇ.DR.HAKAN ÇAĞLAR
Fourier Transform Base Functions

2 1 1 1

1.5 0.5 0.5 0.5

1 0 0 0

0.5 -0.5 -0.5 -0.5

0 -1 -1 -1
0 5 10 15 0 5 10 15 0 5 10 15 0 5 10 15

1 1 1 1

0.5 0.5 0.5 0.5

0 0 0 0

-0.5 -0.5 -0.5 -0.5

-1 -1 -1 -1
0 5 10 15 0 5 10 15 0 5 10 15 0 5 10 15

1 1 1 1

0.5 0.5 0.5 0.5

0 0 0 0

-0.5 -0.5 -0.5 -0.5

-1 -1 -1 -1
0 5 10 15 0 5 10 15 0 5 10 15 0 5 10 15

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 126
DOÇ.DR.HAKAN ÇAĞLAR
Wavelet Function in different shifts and scales
1

0 8 16

0 4 8

0 2 4

9.05.2023 127
Short time Fourier Wavelet

f f

t t
9.05.2023 128
Fourier Transform of f (t ),
 1 
F () =  f (t ) e − jt dt  f (t ) =  F () e jt d
− 2 −

Gabor (1946) resorted Short - Time Fourier Transform (STFT),



F (, ) =  f (t ) w (t −  ) e − jt dt
−

when w(t ) is Gaussian, the STFT called Gabor transform.

9.05.2023 129
Wavelet Transform of f ( t ),
 t −b
 ( ) f ( t )dt =  a ,b ( t ), f ( t ) 
−1 / 2
W f (a , b) = a
− a
where ψ(t) wavelet mother function and a - scale, b- shift parameters
t−b
 a ,b ( t ) =  ( )  a ,b ( ) = a (a ) e − jb
1/ 2

9.05.2023 130
The transform is invertible ,
1   dadb
f(t) =
Cψ   − 0
W f (a, b)  a ,b (t )
a2

where

 ()
2

Cψ =  d  
0 
 (t ) satisfies the admissibil ity condition. This implies

 (0) =   (t ) dt = 0
−

9.05.2023 131
The orthogonal wavelet t ransform preserves the energy
between the different scales such that,
2 2
  1
−
 (t ) dt = 
− a
 ab (t ) dt

There is a time - frequency resolution trade - off in the wavelet t ransform.

 t2 =  (t − t0 ) 2  (t ) dt   2 =  ( −  0 ) 2  () d
2 2

1 2
 ab2 = a 2 t2   ab2  = 
t
a2
1
The classical uncertainity principle states that,  t2  2 
2

9.05.2023 132
Morlet wavelet

0
ˆ
 ( ) = e −2 2 (  −  0 )

Morlet Wavelet
-1
-3 -2 -1 0 1 2 3

Mexican hat wavelet


1

2 −1/ 4
 ( x) = (  )(1 − x )e
2 − x2 / 2

3
0

Mexican Hat Wavele t


-0.5
-4 -3 -2 -1 0 1 2 3 4

9.05.2023 133
Meyer wavelet

ˆ ( ) = (2 ) −1/ 2 e j / 2 sin(   ( 3  − 1))


0 2 2
2 4
if  
3 3
-6 -4 -2 0 2 4 6

ˆ ( ) = (2 ) −1/ 2 e j / 2 cos(   ( 3  − 1))


2 2
Meyer scaling function

4 8
if  
1 3 3
ˆ ( ) = 0 ,
 otherwise
0

-6 -4 -2 0 2 4 6

9.05.2023 134
Complex Shannon wavelet shan1.5-1
1

0.5

-0.5 Shanon Wavelet

-10 -8 -6 -4 -2 0 2 4 6 8 10  ( x) = f B1/ 2 sin c( f B x) e j 2f x


c

Real part

1 f B : Bandwith frequency,
0.5 f C : Center frequency
0

-0.5

-10 -8 -6 -4 -2 0 2 4 6 8 10
Imaginary part

9.05.2023 135
Gaussian wavelet of order 8

0.5

-0.5

-4 -2 0 2 4

9.05.2023 136
Discrete Wavelet Transform (DWT)

1 t −b
 a ,b (t ) = 1/ 2
( ) Continuous Wavelet function
a a

a = a0m , b = nb0 a0m discrete sampling.

1
 m,n (t ) = m/2
 (a0−mt − nb0 ) Discrete Wavelet function
a0

a0 → 1, b0 → 0 then DWT → CWT

9.05.2023 137
Discrete Wavelet Transform (DWT)


W f (m, n) =  m,n , f = a   (a0−mt − nb0 ) f (t ) dt
−m / 2
0
−

f (t ) = W f (m, n)  m,n (t )


m n

where W f (m, n) discrete wavelet coefficien ts and


ψ m,n(t) discrete wavelet basis functions.

9.05.2023 138
The orthonormal Wavelets ψ m,n(t) satisfy,

m = m' , n = n '
(t) ψ m ',n '(t) dt = 
1,
ψ m,n
0, otherwise
 ψ m,n (t) ψ m ',n '(t) dt =  m − m ',n − n '

ψ m,n(t)orthonormal in both shift and scale.


The scaling functions m,n (t) satisfy th e orthonormality condition
only withi n the same scale.

n=l
(t) m,l (t) dt = 
1,
 m,n
0, otherwise
  m,n (t) m,l (t) dt =  n −l

The orthonormality condition between the wavelet and scaling function satisfy,

 m,n (t) m,l (t) dt = 0

9.05.2023 139
Orthonormal Wavelet Basis Satisfy

• ψ m,n (t) ψ m ',n '(t) dt = ψ m,n(t), ψ m ',n'(t) =  m− m ' n − n '

•  m,n (t) m,n '(t) dt = m,n(t), m,n '(t) =  n −n '

•  m,n (t) m ',n '(t) dt =  m,n(t), m ',n '(t) = 0

9.05.2023 140
Multiscale Analysis

Successive decomposition of a signal into a series of approximations and details.


• Approximation: contains the low frequencies,
• Detail: ‚collects‘ the remaining high frequencies.

9.05.2023 141
Multiresolution Signal Analysis

f  L2 and squence of closed subspaces Vm m  Z of L2(R)

 Containmen t :
 V2  V1  V0  V-1  V-2  

 Completene ss :
 V = 0,
mZ
m V
mZ
m = L2(R)

 Scaling property :
f(x)  Vm  f (2 x)  Vm −1 for any function f  L2(R)

 The Basis/Fram e property : There exists a scaling function  (t )  V0 such that m  Z ,


the set
 
m, n (t ) = 2 − m / 2  (2 − m t − n) is an orthonormal basis for Vm

CHAPTER 6: WAVELET TRANSFORM


9.05.2023 142
DOÇ.DR.HAKAN ÇAĞLAR
Multiresolution Signal Analysis

Let Wm be the orthogonal complement of Vm in Vm −1

Vm−1 = Vm  Wm , Vm ⊥ Wm

  W j  W j −1   W0   W− j +1  W− j + 2  = L2(R)

Associate the scaling function  (t ) with the space V0 ,


and the wavelet function  (t) with W0 .

Any function f (t ) can be expressed as a sum of projection s onto Vm and Wm

Pm −1 f = Pm f + Qm f

9.05.2023 143
Wavelet Representation of Signal in Multiresolution

 
f (t ) = 
n = −
s (0, n)  (t − n)  s (0, n) =  f (t )  (t − n) dt
−

Approximat ed signal f A1 (t )
 
t t
f (t ) =
1
A 
n = −
s (1, n )  (
2
− n )  s (1, n ) = −
f (t )  (
2
− n) dt

Ditailed signal f E1 (t ) = f(t) - f A1 (t )


 
t t
f (t ) =
1
E 
n = −
W f (1, n )  (
2
− n )  W f (1, n ) = −
f (t )  (
2
− n) dt

9.05.2023 144
 
t t
f (t ) =  s (1, n)  ( − n) +  W f (1, n)  ( − n)
n = − 2 n = − 2
 
t t
f (t ) =  s (2, n)  ( − n) and
2
A f (t ) =
E
2
W f ( 2, n )  ( − n)
n = − 4 n = − 4
  
t t t
f (t ) =  s (2, n)  ( − n) +  W f (2, n)  ( − n) +  W f (1, n)  ( − n)
n = − 4 n = − 4 n = − 2
In general;
 L 
t t
f(t) =  s ( L, n)  ( L − n) +   W f (m, n)  ( m − n)
n = − 2 m =1 n = − 2

9.05.2023 145
Wavelet Representation of Signal f(t)

 L 
t t
f(t) =  s ( L, n)  ( L − n) +   W f (m, n)  ( m
− n)
n = − 2 m =1 n = − 2

Approximated Signal Detailed Signal

 
t
f (t ) =   W f (m, n)  ( m
− n)
m =1 n = − 2

9.05.2023 146
Compactly supported Wavelet Basis


−j 
 (t ) =  h0 (n)  (2t − n)  () =  h0 (n) e
nT0
2
( )
n n 2


H 0 (e ) =  h0 (n) e
j
j jn
then  () = H 0 (e 2 )  ( ),  =  T0
n 2

 
 (2t ) = 2 h0 (n)  (4t − n) then ( ) = H 0 (e 4 ) ( )
j

n 2 4
 

() =  (0) H 0 (e
j
2k
) where  (0) =   (t ) dt = 1
−
k =1

9.05.2023 147
m,n(t) is orthonormal for any given scale m then (t − n)spans V0
 m,n(t) m,n '(t) dt = m,n(t), m,n '(t) =  n−n' →  ( + 2k ) = 1
2

2
H j ( + k ) 2
0 (e ) Φ(Ω + 2kπ = 1
k

 Φ(Ω + (2k + 1)π ) + H 0 (e j )  Φ(Ω + 2kπ ) = 1 then,


2 2
H 0 ( e j (  + ) )
2 2

2 k +1 2 k +1

Interscale coefficien t sequence h0(n);


2 2
H 0 ( e j ) + H 0 ( e j (  +  ) ) = 1

9.05.2023 148
Compactly supported Wavelet Basis


−j 
 (t ) =  h1 (n)  (2t − n)   () =  h1 (n) e
nT0
2
( )
n n 2


H1 (e ) =  h1 (n) e
j
j j n
then  () = H1 (e 2 )  ( ),  =  T0
n 2
  
 () = H1 (e 2 ) H 0 (e
j j
2k
)
k =2

9.05.2023 149
Since  (t − n) forms an orthonormal basis for W0

ψ m,n (t) ψ m ',n '(t) dt = ψ m,n(t), ψ m ',n '(t) =  m − m ' n − n '

 ( + 2k ) = 1 , similarly


2

Interscale coefficien t sequence h1(n) satifies ;


2 2
H 1 ( e j ) + H 1 ( e j (  +  ) ) = 1

9.05.2023 150
Finally, these scaling and wavelet functions also satisfy
the orthonormality condition

 m,n (t) m ',n '(t) dt =  m,n(t), m ',n '(t) = 0

 
k
(  + 2k  )  
( + 2k ) = 0 , implies that

H 0 ( e j ) H 1 ( e − j ) + H 0 ( e j (  +  ) ) H 1 ( e j (  +  ) ) = 0

9.05.2023 151
h0 (n) and h1 (n) satisfy th e below conditions ,
2 2
H 0 ( e j ) + H 0 ( e j (  +  ) ) = 1

j 2 j (  + ) 2
H 1 (e ) + H 1 (e ) =1

H 0 ( e j ) H 1 ( e − j ) + H 0 ( e j (  +  ) ) H 1 ( e j (  +  ) ) = 0

 H 0 ( e j )
j H 1 ( e j ) 
H AC (e ) =  j ( + ) j (  + )  , Paraunitary for all .
 H 0 (e ) H 1 (e )

9.05.2023 152
Compactly Supported Orthonormal Wavelet Design


 (0) =   (t ) dt = 0 → H 0 ( e j )  =
=0
−

j 2 j (  + ) 2
 m,n (t), m,n '(t) =  n − n ' → H 0 (e ) + H 0 (e ) =1

j 2 j (  + ) 2
 ψ m,n (t), ψ m ',n '(t) =  m − m ' n − n ' → H 1 (e ) + H 1 (e ) =1

  m,n (t), m ',n '(t) = 0 → H 0 (e j ) H1 (e − j ) + H 0 (e j ( + ) ) H1 (e j ( + ) ) = 0

Note That : h0 (n) and h1 (n) satisfy th e PR - QMF conditions ,

9.05.2023 153
Compactly supported Wavelet Basis

Find h0 (n) and h1 (n) satisfy th e PR - QMF with,

 (-1) h (n) = 0 ,
n
n
0 then

 
 (t ) =  h0 (n)  (2t − n)   () =  H 0 (e
j
2k
)
n k =1

  
 (t ) =  h1 (n)  (2t − n)   () = H1 (e 2 ) H 0 (e
j j
2k
)
n k =2

 N N
Note that : (t) compactly supported on 0, N - 1, then  (t ) on 1 - , 
 2 2
if h0 (n) N - Tap FIR filter.

9.05.2023 154
 (x) Haar Wavelet

x  1 0  x  1/ 2

(x) = − 1 1/ 2  x  1
0 1/2 1 0
 otherwise

Haar Scaling
 (x)
 ( x) = 01 0  x 1
x  otherwise

0 1

9.05.2023 155
Haar Wavelet Transform

 (x)  (x)
x x
0 0 1
1

 (2 x)  ( x − 1)

x x
0 1/2 0 1 2

9.05.2023 156
Wavelet Function Scaling Function
2 1.5

1 1

0 0.5

-1 0

-2 -0.5
0 1 2 3 0 1 2 3

High-Pass Filter h1(n) Low-Pass Filter h0(n)


1 1

0 0

-1 -1
0 1 2 3 0 1 2 3

9.05.2023 157
Wavelet Function Scaling Function
1.5 1.5

1
1
0.5
0.5
0

0
-0.5

-1 -0.5
0 2 4 6 0 2 4 6

High-Pass Filter h1(n) Low-Pass Filter h0(n)


1 1

0 0

-1 -1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

9.05.2023 158
Wavelet Function Scaling Function
1.5
1
1

0 0.5

0
-1
-0.5
0 5 10 15 0 5 10 15

High-Pass Filter h1(n) Low-Pass Filter h0(n)


1 1

0 0

-1 -1
0 2 4 6 8 10 12 14 16 0 2 4 6 8 10 12 14 16

9.05.2023 159

You might also like