Digital Image Processing Chapter3 Nagaraja N S
Digital Image Processing Chapter3 Nagaraja N S
Chapter 3
Image Transformations
Introduction
Two dimensional unitary transforms play an important role in image processing. The
term image transform refers to a class of unitary matrices used for representation of
images.
UNITARY MATRICES and UNITARY (ORTHOGONAL) TRANSFORM
A square matrix = [ , , , . . ] ( for the ith column vector of A) is unitary if
1D Unitary Transforms:
represent by a vector of
A one dimensional sequence u(n) where n=0,1,2,3, N-1, is represented
size N.
A unitary transformation of this 1 dimensional discrete sequence is given by
=
Where A is a unitary matrix and this can be represented expanded in the form
for (3.1)
The matrix A will be said to be a unitary matrix if it obeys the relation that .
So, this says that A into A conjugate transpose, that should be same as A conjugate
1
= = = where I is the identity matrix .
for (3.2)
Equation (3.2)
2) can be viewed as a series representation of sequence u(n) .
or is the inverse transformation kernel.
The columns of i.e., the vectors
(3.3)
The inverse transformation to get the original 2 dimensional matrix from the
transformation coefficient matrix can be written as.
(3.4)
ak,l(m,n) ak(n)bl(n)
where {ak(m) k=0,1,N-1} and { bl(n) , l=0,1N-1} are 1-D
D complete orthogonal sets of
basis vectors.
On imposition of completeness and orthonormality properties we can show that
2
Page
i.e = = and = =
and = (4.1.5)
(4.1.6)
and =
Eqn (4.1.5) can be performed by first transforming each column of and then
=
Then equ (6) and (5) give a series representation, for the images as ,
= and =
Therefore any image can be expanded in a series using a complete set of basis
images.
Example: Let = ; =
= =
= =
= =
= =
1x + 2x + 3x + 4x
=
Proof
= = = .
This implies, unitary transformation preserves signal energy or equivalently the length
=
4
Page
= = =
2) Energy Compaction Property:
Most unitary transforms have a tendency to pack a large fraction of average energy of an
image into relatively few transform coefficients. Since total energy is preserved this
implies that many transform coefficients will contain very little energy. If and
denote the mean and covariance of vector then corresponding quantities for are :
= =
And
=
=
Variances of the transform coefficients are given by the diagonal elements of
i.e. =
= = =
5
and
Page
= =
=
and
= =
=
Then variances of transform coefficients can be written as a separable product,
where
= ;
Given the entropy of an Gaussian random vector with mean and covariance
, as :
Let =
= =
= =
Now
=
Hence
The total average energy is 2, but average energy in is greater than that in .
Now
It follows that:
For we find
correlation between transform coefficients has reduced.
8
Page
Fourier Representations
Any periodic function can be expressed as the sum of sines and/or cosines of different
frequencies, each multiplied by a different coefficient (we now call this sum a Fourier
series). Functions that are not periodic (but whose area under the curve is finite) can be
expressed as the integral of sines and/or cosine
cosines multiplied by a weighing function. The
formulation in this case is the Fourier transform.
A function, expressed in either a Fourier series or transform, can be reconstructed
(recovered) completely via an inverse process, with no loss of information.
This is one of the most important characteristics of these representations because it
allows us to work in the "Fourier domain" and then return to the original domain of the
function without losing any information.
Fourier Transform
Let f (x) be a continuous function
unction of a real variable x. The Fourier transform of f (x),
denoted as F { f (x) } or F(u), is defined by the equation
where
The reverse transformation is defined as
Fig. (a) Time domain signal Fig. (b) Fourier Transform Fig. (c) Fourier Spectrum (Magnitude of FT)
Page
The result in the last step of the preceding expression is known as the sinc function.
Where u and v are the frequency variables. When referring to images x and y are
interpreted to be continuous spatial variables. As in the I-D
D case, the domain of the
variables u and v defines the continuous frequency domain.
Figure given below shows a 2-D
2 D function (analogous to the 1
1-D case in previous
Example: Compute 2D Fourier Transform.
10
Page
The spectrum is
12
Page
Note that the separations between samples in the frequency domain are inversely
proportional both to the spacing between spatial samples and the number of samples.
Separability
separability property: the Fourier transform F(u, v) for the function f(x, y) can be
obtained in two steps by successively applying one-dimensional Fourier transform
The DFT pair that we have already discussed in equations is represented here for
convenience.
13
Page
The same results can also be obtained by taking transforms along the columns of f(x, y)
and then along the rows using columns result.
14
Page
Periodicity
As in the 1D case, the 2D Fourier transform (and its inverse) are infinitely periodic in
the u and v directions; that is,
Or
.
If we plot a DFT with its origin at one corner of the display window, viz, the location
(0,0), only one fourth of the complete Fourier spectrum can be viewed. In order to view
the complete we need to shift the centre of the spectrum at another location (M/2, N/2).
15
Page
16
Page
17
i.e,
Page
Hence, to find G(u,v), we take the 2-D DFT of the input image, then, we find the transfer
function of the filter, H(u, v), and simply multiply the two. We finally take the inverse
Fourier transform of G(u, v) to get the modified image, i.e., g(x, y).
18
Page