Você está na página 1de 18

Image Processing: Digital Image

transform
Introduction
The image compression is primarily based in image transform
Applications that requires of image transform are: Video
conferencing, medical applications, wireless transmission of
images, finger print storing, smart card reading and many
mores
The studied transform are:
Fourier
Cosine
Hadamark
Hotelling
Hough
Wavelet
They are considered in the forward and inverse domain.


Ing. Eddie Galarza Z.MSc. ESPE Latacunga
2
Two dimensional discrete Fourier
Transform
The Fourier transform decomposes the digital image as a
sum of modular sinusoids.
The forward two dimensional discrete Fourier transform is
defined by:

Ing. Eddie Galarza Z.MSc. ESPE Latacunga
3

= =

=
M
m
N
n
N
v n
j
M
m u
j
e e n m f v u F
1 1
) 1 )( 1 ( 2 ) 1 )( 1 ( 2
) , ( ) , (
t t
u y v are the new variables of the transform
M is the image rows, N is the image columns
f(m, n) is the image matrix
F(u, v) is the Fourier Transform matrix


Two dimensional discrete Fourier
Transform
The Fourier Transform matrix is the same size as the image
matrix.
We use: Abs, angle, real and imaginary of FTT
Always is used a flipped image of the Fourier Transform for
image representation
Ing. Eddie Galarza Z.MSc. ESPE Latacunga
4
Matlab command: fft2 (f)
Example: to get the Fourier Transform matrix of:
(


=
11 7 0
5 3 10
) , ( n m f
Two dimensional discrete Fourier
Transform
The Fourier Transform is applied to images.
Initially we use: Abs, angle, real and imaginary of FTT
The flipped image of the Fourier Transform for the image
representation is obtained using the Matlab command: fftshift
of the fft of the image
Ing. Eddie Galarza Z.MSc. ESPE Latacunga
5
Two Dimensional Inverse Discrete
Fourier Transform
The Inverse Discrete Fourier Transform is the recovery of the
main image matrix f(m, n)
It is calculated by:
Ing. Eddie Galarza Z.MSc. ESPE Latacunga
6

= =

=
M
v
N
u
N
v n
j
M
m u
j
e e v u F
MN
n m f
1 1
) 1 )( 1 ( 2 ) 1 )( 1 ( 2
] , [
1
) , (
t t
The inverse can get the original matrix
Two Dimensional Discrete Cosine
Transform
The FFT involves the use of complex exponential thereby
involving all image calculation complex
The DCT involves only real numbers calculations. Use the
cosine function:
Ing. Eddie Galarza Z.MSc. ESPE Latacunga
7

= =

=
M
m
N
n
N
v n
M
u m
n m f v u w v u F
1 1
2
) 1 )( 1 2 (
cos
2
) 1 )( 1 2 (
cos ] , [ ] , [ ) , (
t t

> = > =
= =
=
otro
MN
u v v u
MN
v u
MN
v u w
4
2 ; 1 2 ; 1
2
1 1
1
] , [
Matlab command: dct2
Two Dimensional Inverse Discrete
Cosine Transform
The Inverse DCT can recover the original matrix
It is the same size of the Image matrix
Matlab command: idct2
The formula is the same, the difference is established by
w(u,v)
Ing. Eddie Galarza Z.MSc. ESPE Latacunga
8

= =
=
otro
MN
v u
MN
v u w
2
1 1
1
] , [
Two Dimensional Discrete Hadamard
Transform
The Hadamard matrix is used in matrix images analysis
The forward two dimensional Hadamard is defined in terms of
matrix multiplication:
Ing. Eddie Galarza Z.MSc. ESPE Latacunga
9
N M
H n m f H v u F ] , [ ] , [ =
Both, the image matrix f[m,n] and the transform matrix are of
order M x N.
The image matrix must be or order M = 2
m
y N = 2
n
.
(

=
1 1
1 1
2
H
(

=
2 2
2 2
4
H H
H H
H
Matlab command: hadamard(N).
Two Dimensional Inverse Discrete
Hadamard Transform
The Inverse two dimensional Hadamard matrix is used in
matrix images analysis
It is calculated using:
Ing. Eddie Galarza Z.MSc. ESPE Latacunga
10
= =
MxN
H v u F H
n m f
N M
] , [
] , [
(

=
1 1
1 1
2
H
(

=
2 2
2 2
4
H H
H H
H
Matlab command: there is not command for the inverse
Hadamard in Matlab
Hotelling Transform
The Hotelling Transform is based on the local gray level
statistical properties of a digital image
This transform is called as:
Eigenvector
Principal component
Karhunen Loeve Discrete Transform (KLT)
For understanding this transform is necessary to study the
concepts of: eigenvalue, eigenvector and correlation.

Ing. Eddie Galarza Z.MSc. ESPE Latacunga
11
Eigenvalues and eigenvectors of a
square matrix
The eigenvalue is only applicable to square matrix
The equation:

Ing. Eddie Galarza Z.MSc. ESPE Latacunga
12
0 = A I
It is called the characteristic equation of matrix A of N x N
order.
It has N roots
Matlab command: eig(A)
Ex: Determine the eigenvalues of matrix:

(
(
(


3 0 0
1 3 4
5 4 3
Eigenvalues and eigenvectors of a
square matrix
For each eigenvalue there is a matrix X of order N x 1, which
satisfies the matrix equation:

Ing. Eddie Galarza Z.MSc. ESPE Latacunga
13
X AX =
If the equation is satisfied by the vector X, then X is called the
eigenvector of matrix A
For the N eigenvalues, we must have N eigenvectors.
The eigenvalues are unique but the eigenvector are not.
Matlab command: [Y X] = eig(A)
Calculate the eigenvector for the matrix:

(
(
(


3 0 0
1 3 4
5 4 3
Covariance of random variables
A random variable observation is arranged as the rows or
columns in a rectangular matrix.
The observation are placed as elements of a columns, and the
number of columns are the variables
The covariance express the relationship between variables
The covariance is calculated as:


Ing. Eddie Galarza Z.MSc. ESPE Latacunga
14
1
) )( (
1


=

=
M
A A A A
V
M
k
j kj i ki
ij
is the median of a column I, M is the number of rows
Matlab command: cov(A)

i
A
Obtaining the Hotelling Transform
For calculating the Hotelling transform of a image of pixel size
N x N, the pixels allocated on a column are assumed as the
random variable.
The forward Hotelling is calculated as:

Ing. Eddie Galarza Z.MSc. ESPE Latacunga
15
) ] , [ ( * ] , [ C n m f T v u F =
The calculating steps are:
First we find the V covariance of f
Then we find the eigenmatrix of V, that is the matrix T.
All the elements of matrix C is the median of every column
Then we calculate the transform F.
There is not Matlab command
Inverse Hotelling Transform
The inverse Hotelling Transform is calculated as:

Ing. Eddie Galarza Z.MSc. ESPE Latacunga
16
) ] , [ ( ' ] , [ C v u F T n m f =
T is the transpose of the matrix of the transform matrix T.
For matrix C we use Matlab command repmat(Matrix,M,1).
Hough Transform
The Hough Transform detects straight lines present in a
image.
The transform considers only the non zero gray levels in the
digital image.
A line AB is mapped to a single point (r,)
The equation that is used is:

Ing. Eddie Galarza Z.MSc. ESPE Latacunga
17
) sin( . ) cos( . u u n m r + =
varies between -90 and +90 degrees.
For every pixel in the image, we have one sinusoidal curve.

Hough Transform
The algorithm employed is the following:
Select variation steps from -90 to 90.
Find the nonzero gray level in the image f[m,n] located at the
pixel (m,n) an show the position indexes in the array.
Compute r for every position index for all variation using
the equation

Store all computed r in a rectangular matrix T as row. T is the
Hough Transform
Finally plot all rows of the rectangular matrix against .
The intersection point gives de values of r y .
Ing. Eddie Galarza Z.MSc. ESPE Latacunga
18
) sin( . ) cos( . u u n m r + =

Você também pode gostar