0% found this document useful (0 votes)
18 views19 pages

Unit-3 NHM Transform

The document discusses various types of digital image transforms including sinusoidal orthogonal transforms, non-sinusoidal transforms, and unitary and orthogonal matrices. It describes discrete Fourier transforms, discrete cosine transforms, discrete sine transforms, and non-sinusoidal transforms such as Hadamard, Walsh, and Haar transforms. It provides definitions and properties of these transforms and examples of applying them to image sequences.

Uploaded by

Nikita Singh
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)
18 views19 pages

Unit-3 NHM Transform

The document discusses various types of digital image transforms including sinusoidal orthogonal transforms, non-sinusoidal transforms, and unitary and orthogonal matrices. It describes discrete Fourier transforms, discrete cosine transforms, discrete sine transforms, and non-sinusoidal transforms such as Hadamard, Walsh, and Haar transforms. It provides definitions and properties of these transforms and examples of applying them to image sequences.

Uploaded by

Nikita Singh
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/ 19

Digital Image Transforms

Types of image transforms


Essentially there are two categories of transforms available
1. Sinusoidal Orthogonal
2. Non-sinusoidal

Unitary and Orthogonal Matrices


If T is a unitary matrices then

T *'  T 1
T .T *'  I
where * denotes complex conjugate of T.
if T is unitary and also has only real elements, then it is an orthogonal matrix.

T .T '  I

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
Discrete Fourier Transform (DFT)

2D-DFT
N 1 N 1
  ux  vy  
F (u, v)   f ( x, y ) exp   j 2   
x 0 y 0   N 
2D-IDFT

1 N 1 N 1   ux  vy  
f ( x, y )  
NxN u  0 v  0
F (u , v ) exp 


j 2 
 N
 


Properties of DFT :-

The Saparability property :-


This property states that a DFT can be separated into two ID DPT
We know that
N 1 N 1
  ux  vy  
F (u, v)   f ( x, y ) exp   j 2   
x 0 y 0   N 
Determine the DFT of two following image
We shall use the DFT along the rows and the then along the column.
Hence we leave intermediate stage
Now using the ID DFT along the column of this intermediate image, we obtain
There fore, the final DFT of the entire image is
Determine the DFT of
Now DFT along the column of this intermediate image

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
Discrete Cosine Transform

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
 05 0.5 0.5 0.5 
 0.653 0.2705  0.2705  0.653 
W  
 0.5  0.5  0.5 0.5 
 
0.2705  0.653 0.653  0.2705

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
Q. Find the DCT of the following sequence

f ( x)  1 2 4 7

 05 0.5 0.5 0.5 


 0.653 0.2705  0.2705  0.653 
W  
 0.5  0.5  0.5 0.5 
 
0.2705  0.653 0.653  0.2705

F (u)  7  4.459 1  0.317

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
Discrete Sine Transform

2-dimensional Sine transform is defined as


2 N 1 N 1  ( x  1)(u  1)   ( y  1)(v  1) 
F (u, v)  
N  1 x 0 y 0
f ( x, y ) sin  N 1  sin  N 1 

it's inverse is given by:


2 N 1 N 1  ( x  1)(u  1)   ( y  1)(v  1) 
f ( x, y )  
N  1 u 0 v 0
F (u, v) sin 
 N 1  sin  N 1 

the NxN sine transform matrix

2  (u  1)(v  1) 
 (u, v)  sin   0<=u, v<=N-1
N 1  N 1

0.3717 0.6015 0.6015 0.3717 


0.6015 0.3717  0.3717  0.6015
  
0.6015  0.3717  0.3717 0.6015 
 
0.3717  0.6015 0.6015  0.3717 

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
The sine transform is real, symmetric and orthogonal. thus the forward and inverse transform are
identical

F   . f .

Q. Find the Discrete sine transform of the following sequence

f ( x)  11 12 4 45

0.3717 0.6015 0.6015 0.3717 


0.6015 0.3717  0.3717  0.6015
  
0.6015  0.3717  0.3717 0.6015 
 
0.3717  0.6015 0.6015  0.3717 

F (u)  30.4392  17.4774 27.7368  17.44

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
Non Sinusoidal Transform
These orthogonal functions consists of either square or rectangular wave. It consists of Hadamard,
Walsh and the Haar functions.

The Kronecker product:


The kronecker product AxB of two matrices A and B is obtained by multiplying B with each
element aij of A and substituing the multiplied matrices aijB for the elements of A.
Thus W=AxB

 a11B a12 B .... a1n B 


a B a22 B ... a1n B 
W   21
 ... ... ... ... 
 
an1 B an 2 B ... ann B 
if A is a nxn matrix and B is a mxm then W is a mn x mn matrix.

Walsh Hadamard Transform


the Hadamard matrix of order 2 is given by,

1 1 
H (2)   
1  1
the Rows and column of the Hadamard matrix are orthogonal. For orthogonality of vectors the dot
product has to be zero.

A normalized 2x2 Hadamard transform is given by,

1 1 1 
H N (2)   
2 1  1

Hadamard matrices of order 2n can be recursively generated through the Kronecker product.

H (2 n )  H (2) xH (2 n1 )

H (2)  H (2) xH (20 )


H (2)  H (2)

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
H (4)  H (2) xH (2)
From the Kronecker product

1.[ H (2)] 1.[ H (2)] 


H (4)   
1.[ H (2)]  1.[ H (2)]
sign change

1 1 1 1 0
1  1 1  1 3
H (4)  
1 1 1 1 1
 
1  1 1  1 2

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
Haar Transform
The kernel of Haar transform is generated using the following procedure:

1. Find the order N. Let n = log N


2. Determine p and q
a. p ranges from 0 to n-1
b. If p = 0, then q = 0 to n – 1
Else, 1 < q < 2p
3. The value k is determine as

 1 1 1 1 
 1 1  1  1 
1 
Haar (4) 
4 2  2 0 0 
 
 0 0 2  2

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
Q- fine the Haar transform of the following signal x(n)={1,2,0,3}

 1 1 1 1  1   6 
 1 1  1  1  2 1  0 
  
1 
x(t )  =
4 2  2 0 0  0  4 2
    
 0 0 2  2   3  3 2 
Ans

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
The Slant transform :-
The unitary kernel matrix for the slant transform is obtained by starting with a 2*2 haar or
hadamard transform
The slant matrix for N=4 can be written as
Where a and b are real constants to be determined subject to the following condition
1. Step size must be uniform
2. S(4) must be orthogonal
Let us check the step size of I 4 2 element of 2nd column
= (a+b) – (a-b) = 2b
Step size of 2 and 3 element of 2nd column
= (a-b) – (-a+b) = 2a -2b
Step size must be uniform
We shall now find a and b using orthogonal condition
Now s(u) becomes
Fine the slant transform of the given signal
Given a image calculate the slant transform

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
Singular value - Decomposition transform
The SVD method transforms the given matrix A into the product UxSxV-1 .
SVD re factors the image into three matrices.
The image a can be written as
A=UxSxV-1
The matrix U is an (mxm) orthogonal matrix,

uiT xu j   ij  {1 for i  j; 0 for i j


The matrix V is an nxn orthogonal matrix.
S is a matrix whose dimensions are mxn with singular values as
 1 0  0 0
0   0 0 
 2

s   
 
   0 n
 0 0  0 0 

σ1,σ1 ,.....,σn are called singular values which are the square roots of the eigen values and form the
diagonal of S.
U and V are not unique and are calculated as again values of AA-1 and A-1 A respectively.

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
Karhunen – Loeve transform (KLT):-
The idea of the KL transform is to transform a given set of measurements to new set of
features, so that the features exhibits high information packing properties. this leads to a reduced
and compact set of features.
Consider a group of random vectors of the form
 x1 
x 
x   2
.
 
 xn 
mean vector  x  E{x}

where E{.} is the expected value and the subscript x is associated with the population of x vectors.
The covariance matrix can be calculated as

cx  E{( x   x )( x   x )T }
M
1
cx 
M
x x
k 1
k
T
k   x  xT

This covariance matrix is real and symmetric.


The eigen values an eigen vectors λi and ei are calculated. Based on this, the transform kernel is
constructed. Let the transform kernel be A. Then the matrix rows are formed from the eigen
vectors of covariance matrix.
The mapping of the vectors x to y using the transformation can now be described as
y = A (x-µx)
This transformation is called KL transform. The mean of the y vectors will be zero and the matrix
is of the form.
1 0 ... 0 
 0  ... 0 
cy   2 
: : : :
 
 0 0 ... n 
The original vector x can now be reconstructed as x = AT y + ux
 KL transform is not fixed unlike in other transform.

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune
 KL transform is optimum in the sense that it minimizes mean square error between x and x
cap, where x is the original vector and x cap is the reconstructed vector.
 KL transform is based on statistical properties of vector representation of image.

References: S. Sridhar, “Digital Image Processing”, OXFORD University Press, Second Edition
Dhananjay K. Theckedath, "Digital Image Processing" Tech-Max Publication, Pune

You might also like