Professional Documents
Culture Documents
3 X 3 Average 5 X 5 Average
3500
3000
+
Original histogram
3500
3000
=
Equalized histogram
2500 2500
Noisy image
2000 2000
500
Blurry Image Laplacian 500
0 0
0 50 100 150 200 250 0 50 100 150 200 250
7 X 7 Average Median
Image Enhancement
Purposes: To make an image better appealing and
easier to deal with than the original image
Three categories:
1. Spatial domain methods: operate on the images
itself,
Point processing, e.g., image averaging; logic
operation; contrast stretching ...
Mask processing, e.g., filtering or mask
operation, (blurring, median
Image Enhancement …
2. Frequency domain methods:
work on the Fourier transformed output of the image,
examples: from the convolution theory
g(x,y) = f(x,y) h(x,y)
=> G(u,v) = F(u,v) • H(u,v)
=> certain properties of F(u,v) can be
emphasized into G(u,v)
Flute
Tabla
Sitar
Fourier Series
Any function that
periodically repeats
itself can be expressed
as the sum of sines
and/or cosines of
different frequencies,
each multiplied by a
different coefficients. This
sum is called a Fourier
series.
Joseph Fourier (1768-1830)
Had crazy idea (1807):
Any periodic function can be
rewritten as a weighted sum of
Sines or Cosines of different
frequencies.
Don’t believe it?
Neither did Lagrange,
Laplace, Poisson and other
big wigs
Not translated into English
until 1878!
But it’s true!
called Fourier Series
Possibly the greatest tool
used in Engineering
Periodic Signals
Fourier Series
y(x) = A sin(fx + p)
Any mathematical function that periodically repeats itself can be
expressed as a sum of sines &/or cosines with different amplitudes A,
frequencies f, and phases p.
Even functions that are not periodic (but whose area under
the curve is finite) can be expressed as the integral of
sines &/or cosines multiplied by a weighting function.
A sum of sines and cosines
=
3 sin(x) A
+ 1 sin(3x) B A+B
+ 0.8 sin(5x) C
A+B+C
+ 0.4 sin(7x) D
A+B+C+D
Amplitude and Phase
The spectrum is the set of waves representing a
signal as frequency components. It specifies for
each frequency:
The amplitude (related to the energy)
The phase (its „position‟ relative to other frequencies)
Amplitude Phase
Fourier Transform
We want to understand the frequency w of our signal. So, let‟s
reparametrize the signal by w instead of x:
Fourier
f(x) F()
Transform
• For every from 0 to inf, F() holds the amplitude A and phase of
the corresponding sine Asin(x
– How can F hold both? Complex number trick!
F ( ) R( ) iI ( )
I ( )
A R( ) I ( )
2 2
tan 1
R( )
Inverse Fourier
F() f(x)
Transform
Time and Frequency
= +
Frequency Spectra
example : g(t) = sin(2pf t) + (1/3)sin(2p(3f) t)
= +
The Continuous Fourier Transform
Represent the signal as an infinite weighted
sum of an infinite number of sinusoids
f (t ) F (u ) f (t )e( j 2ut ) dt
F(u) is called the Fourier Transform of f(t). We say that f(t) lives
in the “time domain,” and F(u) lives in the “frequency domain.”
u is called the frequency variable.
The Inverse Fourier Transform
Given F(u), f(t) can be obtained by the inverse
Fourier transform (IFT)
1F (u ) f (t ) F (u ) e ( j 2ut )
du
AW Fourier
Transform
-1/W 1/W
The Fourier spectrum tells us:
Fourier
The pulse is made up of infinite Spectrum
frequencies.
The frequency component at 0 has the
maximum amplitude.
At higher frequencies, the amplitude goes
on decreasing.
If we add up all these frequencies (u), we
get back the original signal.
Discrete Fourier Transform (DFT)
A continuous function f(x) is discretized as:
{ f ( x0 ), f ( x0 x), f ( x0 2x),..., f ( x0 ( M 1)x)}
Discrete Fourier Transform (DFT)
Let x denote the discrete values (x=0,1,2,…,M-1),
i.e.
f ( x) f ( x0 xx)
then
{ f ( x0 ), f ( x0 x), f ( x0 2x),..., f ( x0 ( M 1)x)}
M 1
1
F (u )
M
f ( x )e
x 0
( j 2ux / M )
u=0,1,2,…,M-1
and
M 1
f ( x) F (u )e ( j 2ux / M )
x=0,1,2,…,M-1
u 0
Example: A simple one-dimensional DFT
Polar Coordinate Representation of FT
Twiddle Factor
A new factor defined as
DFT: Example
The DFT now reduces to
F=W.f
Here WM will be a 4x4 matrix
2-D Discrete Fourier Transform …
x x
(0,0) v
F(u,v) Column
Transformation
u
Properties of DFT …
Thus, if
Then,
What happens when
u0 = M/2 & v0 = N/2
Why?
For an M x N image, what are the
coordinates of the centre pixel?
Since (x + y) is an integer
So sin(x+y) = 0 & cos(x+y) is
1 if (x+y) is even & -1 if it is odd
F(0, 0) is at the
origin
F(M/2, N/2) is
at the origin
A common
practice …
Shift
The Average Value Property
1 M 1 N 1
F (u, v)
MN x 0 y 0
f ( x, y ) e ( j 2 ( ux / M vy / N ))
0 1 2 1
1 2 3 2
2 3 4 3
1 2 3 2
Hint:
First do row-wise transformation & then column-wise.
Problems …
Find the DFT of f(x)= {0,1,2,1}
Assignment …
Any Questions ?