0% found this document useful (0 votes)
42 views64 pages

Transforms 1

The document discusses various types of transforms used in image processing, including separable and unitary transforms. It describes properties like discrete Fourier transforms having a separable and unitary kernel. General linear transforms are defined using forward and inverse kernels. Unitary transforms preserve the Euclidean norm and angles between vectors. Specific transforms discussed include the discrete cosine transform.

Uploaded by

mhahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views64 pages

Transforms 1

The document discusses various types of transforms used in image processing, including separable and unitary transforms. It describes properties like discrete Fourier transforms having a separable and unitary kernel. General linear transforms are defined using forward and inverse kernels. Unitary transforms preserve the Euclidean norm and angles between vectors. Specific transforms discussed include the discrete cosine transform.

Uploaded by

mhahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Separable and Unitary Transforms

Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Image Transforms
EE 604

Govind Sharma

Department of Electrical Engineering


Indian Institute of Technology, Kanpur

26/2/2019

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Outline

Separable and Unitary Transforms

Sinusoidal transforms

Non-sinusoidal transforms

Wavelet Transform

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Image Transforms

Transforms are used in many image processing applications.


(a) Image representation
(b) Mathematical convenience (Filtering)
(c) Image compression/ Dimensionality reduction
(d) Feature extraction
(e) Pattern recognition
(f) Pre-processing step
There is no universally good transform.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Discrete Fourier Transform

For an M × N image array f [m, n] its two-dimensional DFT F [u, v ]


is defined as

1 M−1
X N−1 um vn
f [m, n] |e −j2π({zM + N })
X
F [u, v ] = √
MN m=0 n=0 kernel

and the IDFT is given by

1 M−1
X N−1
X um
+ vn
f [m, n] = √ F [u, v ] |e j2π({z
M N
)
MN u=0 v =0 kernel
}

This is a Linear, Separable kernel, Unitary transform.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

General Linear Transform

For an M × N image array f [m, n] its two-dimensional transform


F [u, v ] is defined as
M−1
X N−1
X
F [u, v ] = f [m, n] A[m, n; u, v ]
m=0 n=0
| {z }
forward kernel

Inverse transform gives mapping from transform domain to image


space
M−1
X N−1
X
f [m, n] = F [u, v ] B[m, n; u, v ]
u=0 v =0
| {z }
inverse kernel

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Separable Kernel

Transform has separable kernel if

A[m, n; u, v ] = AC [m; u]AR [n; v ]


B[m, n; u, v ] = BC [m; u]BR [n; v ]

where subscripts C and R refer to one dimensional column and row


transform kernels.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Unitary Transform

Transform is unitary if
M−1
P N−1
A[m, n; u, v ]A∗ [m, n; u 0 , v 0 ] = δ[u − u 0 , v − v 0 ]
P
m=0 n=0
M−1
P N−1
B[m, n; u, v ]B ∗ [m, n; u 0 , v 0 ] = δ[u − u 0 , v − v 0 ]
P
m=0 n=0
M−1
P N−1
A[m, n; u, v ]A∗ [m0 , n0 ; u, v ] = δ[m − m0 , n − n0 ]
P
u=0 v =0
M−1
P N−1
B[m, n; u, v ]B ∗ [m0 , n0 ; u, v ] = δ[m − m0 , n − n0 ]
P
u=0 v =0

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Unitary Transform in Vector Space form

Notation
f = matrix with f [m, n] as elements
F = matrix with F [u, v ] as elements
f = columns of f stacked togather
F = columns of F stacked togather

f and F are vectors in MN-dimensional vector space

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Unitary Transform in Vector Space form


Forward transform can be written as

F = Af

and inverse transform can be written as

f = BF

It can be seen easily that B = A−1 . Transform is unitary if

AH A = I = AAH or B H B = I = BB H

If A and B are real matrices then transform is called orthogonal


transform.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Separable Transform in Matrix notation

If A is an m × n matrix and B is a p × q matrix then Left


Kronecker product A ⊗ B is an mp × nq matrix defined by

b11 A · · · b1q A
 

A⊗B = 
 .. . . .. 
. . . 
bp1 A · · · bpq A

Transform kernel is separable if

A = AC ⊗ AR
B = BC ⊗ BR

where AC , AR , BC , BR are matrices for one-dimensional transforms.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Separable Kernel Unitary Transform

When the transform is separable kernel and unitary we can write


image matrix f and transform-domain matrix F as

F = AC fAT
R

and
f = BC FBRT
where BC = A−1 −1
C and BR = AR .

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Outer Product Form

Let aC [m], aR [m] represent mth row of unitary matrices AC and AR


respectively, then
M−1
X N−1
X
F= α[u, v ]aC [u]aRT [v ]
u=0 v =0

The unit rank matrices aC [u]aRT [v ] are called basis matrices.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Properties of Unitary Transform

Euclidean norm of the MN dimensional vector is preserved

kf k = kF k

Angle between vectors (for real case) are also preserved.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Cosine transform

Cosine transform is defined as


N−1
X N−1
2 π 1 π 1
X      
F [u, v ] = C [u]C [v ] f [m, n]cos um + cos vn +
N m=0 n=0
N 2 N 2

The inverse transform is given as

2 N−1
X N−1 π 1 π
X     
f [m, n] = C [u]C [v ]F [u, v ]cos u (m + cos v (n
N m=0 n=0 N 2 N

where C [0] = 1/ 2 and C [m] = 1, m 6= 0.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Properties of Cosine Transform

Linear, separable, unitary transform. It is symmetric,anti-periodic


for 2N but periodic for 4N in one-dimension. Let X [k] denote the
cosine transform of x [n] sequence of length N then
(a) X [−k] = X [k]
(b) X [k + 2N] = −X [k]
(c) X [k + 4N] = X [k]
(d) Convolution property does not hold
(e) Diagonalizes symmetric tri-diagonal matrix shown in next slide

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Properties of Cosine Transform

Symmetric tri-diagonal matrix diagonalized by cosine transform

1 − α −α
 


 −α 1 −α 0 


 .. .. .. 
 . . . 
0
 
 
 −α 1 −α 
−α 1 − α

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Modified Cosine Transform

Image data is generally divided into blocks and then transform is


taken for these blocks. Coding may create artificial effects at block
boundaries. To reduce this modified DCT is used.
(a) Instead of N data points take 2N data points and take 2N
point DCT and retain only first N coefficients.
(b) For the next block of 2N points take N points from previous
block and N new points and repeat first step.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Sine Transform

Discrete sine transform (DST) for a sequence {x [n], 0 ≤ n ≤ N − 1}


and its inverse are defined as
q N−1
2
x [n] sin π(k+1)(n+1) 0 ≤ k ≤ N −1
P
X [k] = N+1 N+1 ,
n=0
q N−1
2
X [k] sin π(k+1)(n+1) , 0 ≤ n ≤ N −1
P
x [n] = N+1 N+1
k=0

In 2 − D case we take row wise transform and then column wise


transform.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Properties of Sine Transform

Linear, separable, orthogonal transform. It is symmetric. Forward


and inverse transforms are same. It diagonalizes the Toeplitz
matrix shown below:
1 −α
 

 −α

 1 −α 0 


 .. .. .. 
 . . . 
0
 
 
 −α 1 −α 
−α 1

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Hartley Transform

Hartely transform pair is defined by


N−1
P N−1  
1 2π
0 ≤ u, v ≤ N − 1
P
F [u, v ] = N f [m, n]cas N (um + vn)
m=0 n=0
N−1
P N−1  
1 2π
0 ≤ u, v ≤ N − 1
P
f [m, n] = N F [u, v ]cas N (um + vn)
u=0 v =0

where cas(θ) = cos(θ) + sin(θ). This is not a separable transform.


Separable discrete Hartley transform has been defined by first
taking row wise transform and then taking column wise transform.
This transform is closely related to DFT.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Examples of image transforms

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Examples of image transforms

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Hadamard Transform
The elements of the basis vectors for Hdamard transform take only
±1 so no multiplication is required. This is defined easily for
N = 2m , although can be defined for some multiples of 4 also.
Hadamard matrices are defined below:
" #
1 1 1
H2 = √
2 1 −1
For larger values of N, we define recursively as
" #
1 HN HN
H2N = HN ⊗ H2 = √
2 HN −HN
Using the notation defined earlier f for image matrix and F for
transform coefficient, for a N × N image the Hadamard transform
is given by
F = HN fHNT
G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Properties of Hadamard Transform

(a) Matrix H is real, symmetric and orthogonal.


(b) 1-D transform can be calculated using N log N addition and
subtraction operations.
(c) It has good energy compaction for highly correlated images.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Haar Transform
The Haar transform can be calculated recursively using the
following matrices: " #
VN
H̃N =
WN
where VN is a N/2 × N scaling (approximation) matrix and WN is
a N/2 × N wavelet (detail) matrix given below:
 
1 1 0 0 0 ··· 0 0 0 0
0 0 1 1 0 · · · 0 0 0 0
 
1  .. 
VN = √  . 
2
 
0 0 0 0 0 · · · 1 1 0 0

0 0 0 0 0 ··· 0 0 1 1

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Haar Transform

 
1 −1 0 0 0 ··· 0 0 0 0
0
 0 1 −1 0 · · · 0 0 0 0
1  .. 
WN = √  . 
2
 
0 0 0 0 0 · · · 1 −1 0 0

0 0 0 0 0 ··· 0 0 1 −1

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Haar Transform

The first level Haar transform of a N × 1 vector f is

f 1 = H̃N f = [a1 |d 1 ]T

where a1 = VN f represents approximate part and d 1 = WN f


represents detail part. The next step in the recursion process is to
compute Haar transform from the approximate part a1 . The result
is
f 2 = [a2 |d 2 |d 1 ]T
where a2 = VN/2 a1 and d 2 = WN/2 a1 .

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Examples of image transforms


For the girl image in earlier example

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Haar Transform, Daubechies Transform

The process continues until for N = 2J we obtain

f J = [aJ |d J |d J−1 | · · · |d 1 ]T

Haar transform does not have good energy compaction property


for images. The Haar transform utilizes running average and
running difference of two elements of the vector. The Daubechies
transform uses weighted sums and differences over longer lengths.
For example Daubechies transform of support four, denoted by
Daub4 is similar to Haar transform with VN and WN matrices
defined below:

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Daubechies Transform
 
α1 α2 α3 α4 0 0 · · · 0 0 0 0
 0
 0 α1 α2 α3 α4 · · · 0 0 0 0 


VN =  .. 

. 

 0 0 0 0 0 0 · · · α1 α2 α3 α4 
 


α 1 α 2 0 0 0 0 ··· 0 0 α3 α4 
β1 β2 β3 β4 0 0 · · · 0 0 0 0
 0
 0 β1 β2 β3 β4 · · · 0 0 0 0  

WN =  .. 

. 

 0 0 0 0 0 0 ··· β1 β2 β3 β4 
 

β1 β2 0 0 0 0 ··· 0 0 β3 β4
√ √ √
1+√ 3 3+√ 3 3−√ 3
where α1 = −β4 = 4 2
, α2 = β3 = 4 2
,, α3 = −β2 = 4 2
,

1−√ 3
α4 = β1 = 4 2
G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Sub-band coding

Haar transform and Daubechies transform are special cases of


wavelet transform. Sub-band coding, multi-resolution analysis
(MRA) and wavelet transform are closely related.
In two band sub-band coding the input signal x [n] is divided in two
signals, a low pass signal xLP [n] and a high pass signal xHP [n] as
shown below. the signal x [n] can be reconstructed perfectly from
xLP [n] and xHP [n] as shown below.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Sub-band coding
h0 [n] ↓2 xLP [n]

x [n] Analysis Filter bank

h1 [n] ↓2 xHP [n]

xLP [n] ↑2 g0 [n]

Synthesis Filter bank + x̂ [n]

xHP [n] ↑2 g1 [n]

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Sub-band coding
|H0 (e jω )| |H1 (e jω )|

ω
0 π/2 π
For perfect reconstruction(x [n] = x̂ [n]) we have
( (
g0 [n] = (−1)n h1 [n] g0 [n] = (−1)n+1 h1 [n]
or
g1 [n] = (−1)n+1 h0 [n] g1 [n] = (−1)n h0 [n]

The filter impulse responses should also satisfy the biorthogonality


condition

hhi [2n − k], gj [k]i = δ[i − j]δ[n], i, j ∈ {0, 1}

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Sub-band coding

In some cases filters satisfy an additional constraint

hgi [n], gj [n + 2m]i = δ[i − j]δ[m], i, j ∈ {0, 1}

which defines orthonormality for perfect reconstruction filter banks.


In this case all filter responses can be computed from a single
prototype response h0 [n]. In case of images we apply filters first in
one dimension (say row-wise) and then apply them in the other
dimension (column-wise).

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Multi Resolution Analysis (MRA)

Consider a set of functions {φk (x ), x ∈ R, k ∈ Z}. Suppose


X
f (x ) = αk φk (x )
k

If αk are unique then φk ’s are linearly independent and are called


basis functions. Let
V = span{φk (x )}
k

where over-bar represents closure of the set i.e. if


fn (x ) → f (x ), fn (x ) ∈ V then f (x ) is also included in V . For
expansion set {φk (x )} there is a set of dual functions {φ̃k (x )} that
can be used to calculate coefficients {αk }.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Multi Resolution Analysis (MRA)

+∞
Z
αk = hf (x ), φ̃k (x )i = f (x )φ̃k (x )dx
−∞

There are three possibilities

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Multi Resolution Analysis (MRA)

(a) {φk (x )} form an orthonormal basis for V . In this case


φ̃k (x ) = φk (x )
(b) {φk (x )} are linearly independent. We can use dual functions
φ̃k (x ) to calculate αk , provided following condition called
frames condition is satisfied:
X
Akf k2 ≤ |hf (x ), φk (x )i|2 ≤ Bkf k2 , A > 0, B < ∞
k

(c) {φk (x )} satisfy frames condition but are not linearly


independent. In this case we have a series representation but
αk ’s are not unique. In this case the set {φk (x )} and its dual
are said to be overcomplete.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Multi Resolution Analysis (MRA)

Let φ(x ) be real square integrable function. We define

φj,k (x ) = 2j/2 φ(2j x − k), j, k ∈ Z

For a fixed j define


Vj = span{φj,k (x )}
k

It is seen readily that


Vj ⊂ Vj+1
We say that the scaling function φ(x ) satisfies requirements of
MRA if:

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Multi Resolution Analysis (MRA)

Requirements of MRA
(a) Ortogonal Translation: Integer translates of scaling functions
are mutually orthonormal, i.e.
hφ(x − k), φ(x − m)i = δ[k − m].
(b) Nesting property: f (x ) ∈ Vj ⇒ f (2x ) ∈ Vj+1 and

V−∞ ⊂ · · · V−1 ⊂ V0 ⊂ V1 ⊂ · · · ⊂ V∞

(c) Only function common to all Vj ’s is f (x ) = 0.


(d) Any finite energy signal can be represented in terms of
φj,k (x ), i.e. V∞ = L2 (R).

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Multi Resolution Analysis (MRA)

Let (
1 06x <1
φ(x ) =
0 otherwise
satisfies all the requirements of MRA. There are many scale
functions with finite and infinite support that satisfy MRA
requirements.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Multi Resolution Analysis (MRA)

V2
V1
V0

Orthogonal complement of V0 in V1 is called W0 , i.e. every


function f (x ) ∈ V1 can be written uniquely as f (x ) = s(x ) + w (x )
where s(x ) ∈ V0 and w (x ) ∈ W0 and they are orthogonal. This we
write as V1 = V0 ⊕ W0 .

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Multi Resolution Analysis (MRA)


In a similar manner orthogonal complement of V1 in V2 is called
W1 and so on. We can write

VJ = VJ−1 ⊕ WJ−1
= VJ−2 ⊕ WJ−2 ⊕ WJ−1
= V0 ⊕ W0 ⊕ · · · ⊕ WJ−2 ⊕ WJ−1

Similarly

L2 (R) = V0 ⊕ W0 ⊕ W1 ⊕ · · ·
= VJ ⊕ WJ ⊕ WJ+1 ⊕ · · ·
= · · · W−1 ⊕ W0 ⊕ W1 ⊕ · · ·

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet series

Given a scaling function φ(x ) that meets MRA requirements


{φj,k (x ), k ∈ Z} is an orthonormal basis of Vj . It can be shown
that there exists a corresponding function ψ(x ) such that

{ψj,k (x ) = 2j/2 ψ(2j x − k), j, k ∈ Z}

forms an orthonormal basis for Wj . Scaling function φ(x ) is


sometimes called as father wavelet and function ψ(x ) is called
mother wavelet.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet series
Since V0 ⊂ V1 , and φ0,0 (x ) = φ(x ) we get
X
φ0,0 (x ) = hφ [n]φ1,n (x )
n
X √
φ(x ) = hφ [n] 2φ(2x − n)
n

Similarly W0 ⊂ V1 , and ψ0,0 (x ) = ψ(x ) we get


X √
ψ(x ) = hψ [n] 2φ(2x − n)
n

It can be shown that hψ [n] is related to hφ [n] as

hψ [n] = (−1)n hφ [1 − n]

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet series
For Haar wavelet
√ scaling √
coefficients and wavelet
√ coefficients√are
hφ [0] = 1/ 2, hφ [1] = 1/ 2 and hψ [0] = 1/ 2, hψ [1] = −1/ 2.
Given a square integrable function f (x ) we can start at any scale J
and express it as

X ∞ X
X ∞
f (x ) = cJ [k]φJ,k (x ) + dj [k]ψj,k (x )
k=−∞ j=J k=−∞

where

cJ [k] = hf (x ), φJ,k (x )i
dj [k] = hf (x ), ψj,k (x )i

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet series
Example: Given (
1 06x <1
f (x ) =
0 otherwise
using Haar wavelet we get for j = 0 and j = 1

c0 [0] = 1/3
d0 [0] = −1/4

d1 [0] = − 2/32

d1 [1] = −3 2/32

We can calculate more coefficients.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet series
An algorithm to calculate wavelet series coefficients
X √
φ(x ) = hφ [n] 2φ(2x − n)
n
j
X √
φ(2 x − k) = hφ [n] 2φ(2(2j x − k) − n)
n
X √
= hφ [n] 2φ(2j+1 x − 2k − n)
n
X √
= hφ [m − 2k] 2φ(2j+1 x − m), (putting) m = 2k + n
m

Similarly
X √
ψ(2j x − k) = hψ [m − 2k] 2φ(2j+1 x − m)
m

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet series
Now

cj [k] = hf (x ), φj,k (x )i
= hf (x ), 2j/2 φ(2j x − k)i
X √
= hf (x ), 2j/2 hφ [m − 2k] 2φ(2j+1 x − m)i
m
X j+1
= hφ [m − 2k]hf (x ), 2 2 φ(2j+1 x − m)i
m
X
= hφ [m − 2k]hf (x ), φj+1,m (x )i
m
X
= hφ [m − 2k]cj+1 [m]
m

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet series
Similarly X
dj [k] = hψ [m − 2k]cj+1 [m]
m

We can also write these two relations as

cj [k] = hφ [−n] ∗ cj+1 [n] |n=2k


dj [k] = hψ [−n] ∗ cj+1 [n] |n=2k

hφ [−n] ↓2 cj [n]
cj+1 [n]
hψ [−n] ↓2 dj [n]

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet series

Inverse of these relations can be shown to be


X X
cj+1 [k] = hφ [k − 2n]cj [n] + hψ [k − 2n]dj [n]
n n

cj [n] ↑2 hφ [n]

+ cj+1 [n]

dj [n] ↑2 hψ [n]

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet series
Sequences hφ [n] and hψ [n] satisfy the following conditions known
as quadrature mirror filter (QMF) conditions
1. hψ [n] = (−1)n hφ [1 − n]
P √
2. hφ [n] = 2
n
P
3. hψ [n] = 0
n
hφ [n]hφ [n − 2k] = δ[k]
P
4.
n
hψ [n]hψ [n − 2k] = δ[k]
P
5.
n
hψ [n]hφ [n − 2k] = 0
P
6.
n
hφ [m − 2n]hφ [k − 2n] + hψ [m − 2n]hψ [k − 2n] = δ[m − k]
P P
7.
n n

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet series

From the QMF conditions it can be seen that if hφ [n] is a finite


length sequence then so is hψ [n] and both sequences have same
length. Each sequence must have even length.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Discrete time wavelet transform


Suppose that we are given a discrete time sequence {x [n]}. We
define a function f (x ) by
X
f (x ) = x [n]φ0,n (x )
n

so that c0 [n] = x [n]. Thus we have assumed that given sequence


values are scaling coefficients for some function f (x ). Note that
coefficients are not the sample values of the function f (x ). Using
previously developed algorithm we can calculate scale and detail
coefficients cj [n] and dj [n] for j < 0. Given J,the discrete time
wavelet transform of a sequence is the collection

{c−J [k], k ∈ Z} ∪ {dj [k], −J ≤ j ≤ −1, k ∈ Z}

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Discrete wavelet transform (DWT)

Consider a finite length sequence c0 [n], 0 ≤ n ≤ 2N − 1. We can


assume it to be discrete time signal with other values zero. If hφ [n]
and hψ [n] have length L, then output of the filters have length
2N + L − 2. After decimation by 2 length of c−1 [n] and d−1 [n]
N
sequences will be 2 2+L , so total no. of coefficients will be 2N + L.
Similarly after each decomposition this length will increase by L.
Hence after J decomposition DWT length will become 2N + JL.
For small values of J and L this increase may be acceptable.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Discrete wavelet transform (DWT)

Another method of treating a finite sequence is to assume that it is


a period of periodic sequence. Since the output of a linear system
with periodic input is also periodic with same period, lengths of the
filter outputs do not change. Hence after decimation by 2 length of
N
c−1 [n] and d−1 [n] sequences will be 22 , so total no. of coefficients
will be 2N . Since the length of sequence does not change after
decomposing into approximation and detail sequences, after J
decompositions total no. of coefficients will remain 2N . Thus DWT
algorithms assume periodic extension of the given finite sequence.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet transform of images


For 2-D data we use separable transform. We apply 1-D transform
column-wise and then apply transform row-wise.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet transform of images

Resulting decomposition

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet transform of images


Synthesis of image

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Example of wavelet transform of images

First level decomposition using Haar wavelet

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Bi-orthogonal wavelets
For images we would like that hφ [n] and hψ [n] have symmetric
responses. But we have seen earlier that length of these sequences
is even so symmetric response is not possible. To use a symmetric
response we drop the orthogonality condition and use bi-orthogonal
wavelets. As mentioned earlier in discussion of MRA coefficients
are calculated using dual functions. Hence

X ∞ X
X ∞
f (x ) = cJ [k]φJ,k (x ) + dj [k]ψj,k (x )
k=−∞ j=J k=−∞

where
cJ [k] = hf (x ), φ̃J,k (x )i
dj [k] = hf (x ), ψ̃j,k (x )i

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Bi-orthogonal wavelets

hφ̃ [−n] ↓2 cj [n]


cj+1 [n]
hψ̃ [−n] ↓2 dj [n]

cj [n] ↑2 hφ [n]

+ cj+1 [n]

dj [n] ↑2 hψ [n]

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

Wavelet transform of images

Daubechies 9/7 and LeGall 5/3 are examples of bi-orthogonal


wavelets where first number refers to no. of coefficients in analysis
filter and second number refers to number of coefficients in
synthesis filter. Energy is not preserved in non-orthogonal
transforms.
We decompose only the scale coefficients. If we decompose detail
coefficients also we get wavelet packets.

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

decomposition lena.jpg

G. Sharma Transforms
Separable and Unitary Transforms
Sinusoidal transforms
Non-sinusoidal transforms
Wavelet Transform

References

1. Introduction to Digital Image Processing, William K. Pratt,


CRC Press.
2. Digital Image Processing, Rafael C. Gonzalez and Richard E.
Woods, Prentice Hall.
3. Fundamentals of Digital Image Processing, Anil K. Jain,
Prentice Hall.

G. Sharma Transforms

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy