4. Fundamentals
Fourier: a periodic function can be represented
by the sum of sines/ cosines of different
frequencies, multiplied by a different
coefficient (Fourier series).
Non-periodic functions can also be represented
as the integral of sines/ cosines multiplied
by weighing function (Fourier transform)
5. •The relationship between the harmonics returns by the DFT and the
periodic component in the time domain is illustrated below.
6.
7. Introduction to
the Fourier Transform
f(x): continuous function of a real
variable x
Fourier transform of f(x):
dxuxjxfuFxf ]2exp[)()()(
where
1j
8. Introduction to
the Fourier Transform
(u) is the frequency variable.
The integral of Eq. shows that F(u) is
composed of an infinite sum of sine
and cosine terms and…
Each value of u determines the
frequency of its corresponding sine-
cosine pair.
9.
10. Introduction to
the Fourier Transform
Given F(u), f(x) can be obtained by the
inverse Fourier transform:
)()}({1
xfuF
duuxjuF ]2exp[)(
The above two equations are the Fourier
transform pair.
11. Discrete Fourier Transform
The discrete Fourier transform pair that
applies to sampled functions is given
by:
F(u)
1
M
f (x)exp[ j2ux / M]
x 0
M 1
For u=0,1,2,…,M-1
f (x) f (u)exp[ j2ux / M]
u 0
M 1
For x=0,1,2,…,M-1
12. Discrete Fourier Transform
• In a 2-variable case, the discrete FT
pair is:
1
0
1
0
)]//(2exp[),(
1
),(
M
x
N
y
NvyMuxjyxf
MN
vuF
1
0
1
0
)]//(2exp[),(),(
M
u
N
v
NvyMuxjvuFyxf
For u=0,1,2,…,M-1 and v=0,1,2,…,N-1
For x=0,1,2,…,M-1 and y=0,1,2,…,N-1
20. Enhancement in
the Frequency Domain
Types of enhancement that can be done:
Lowpass filtering: reduce the high-
frequency content -- blurring or
smoothing
Highpass filtering: increase the magnitude
of high-frequency components relative to
low-frequency components -- sharpening.
23. Lowpass Filtering
in the Frequency Domain
Edges, noise contribute significantly to the
high-frequency content of the FT of an
image.
Blurring/smoothing is achieved by reducing a
specified range of high-frequency
components:
),(),(),( vuFvuHvuG
24. Smoothing
in the Frequency Domain
G(u,v) = H(u,v) F(u,v)
Ideal
Butterworth (parameter: filter order)
Gaussian
25. Ideal Filter (Lowpass)
A 2-D ideal low-pass filter:
0
0
),(if0
),(if1
),(
DvuD
DvuD
vuH
where D0 is a specified nonnegative quantity and
D(u,v) is the distance from point (u,v) to the center of
the frequency rectangle.
Center of frequency rectangle: (u,v)=(M/2,N/2)
Distance from any point to the center (origin) of the FT:
2/122
)(),( vuvuD
27. Ideal Filter (Lowpass)
Ideal:
all frequencies inside a circle of radius D0
are passed with no attenuation
all frequencies outside this circle are
completely attenuated.
28. Ideal Filter (Lowpass)
Cutoff-frequency: the point of transition
between H(u,v)=1 and H(u,v)=0 (D0)
To establish cutoff frequency loci, we
typically compute circles that enclose
specified amounts of total image
power PT.
31. Butterworth Filter (Lowpass)
• This filter does not have a sharp
discontinuity establishing a clear cutoff
between passed and filtered
frequencies.
n
DvuD
vuH 2
0 ]/),([1
1
),(
32. Butterworth Filter (Lowpass)
To define a cutoff frequency locus: at
points for which H(u,v) is down to a
certain fraction of its maximum value.
When D(u,v) = D0, H(u,v) = 0.5
i.e. down 50% from its maximum value of 1.
35. Gaussian Lowpass Filter
D(u,v): distance from the origin of FT
Parameter: =D0 (cutoff frequency)
The inverse FT of the Gaussian filter is
also a Gaussian
H(u,v) eD2
(u,v)/2 2
42. Sharpening (Highpass) Filtering
Image sharpening can be achieved by a highpass
filtering process, which attenuates the low-
frequency components without disturbing
high-frequency information.
Zero-phase-shift filters: radially symmetric and
completely specified by a cross section.
Hhp (u,v) 1 Hlp (u,v)
43. Ideal Filter (Highpass)
This filter is the opposite of the ideal lowpass filter.
0
0
),(if1
),(if0
),(
DvuD
DvuD
vuH
50. L
DvuDc
LH
o
evuH
]1)[(),( )/),(( 22
It affects the low and high frequency components of the Fourier
Transform in different ways.
51. By using the homomorphic filter the dynamic range in the brightness
is reduced, together with an increase in contrast, this effect brought
Out the details of objects inside the shelter, in Fig. 4.33, and balance
The gray levels of the outside wall, The enhanced image also sharper.
52. Fast Fourier Transform
The decomposition of FT makes the
number of multiplications and
additions proportional to M log2M:
Fast Fourier Transform or FFT algorithm.
E.g. if M=1021 the usual method will
require 1000000 operations, while FFT
will require 10000.
60. Where m is the mean of the average value of z,
And is the standard deviation.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73. By using the data from the image strips, the mean m and the
Variance s of the gray level can be calculated, where:
74. Noise Removal Restoration Method
Mean filters:
1-Arithmetic mean filter,
2-Geometric mean filter,
3-Harmonic mean filter,
4-Contra-harmonic mean
filter.
Adaptive filters
1-Adaptive local noise
reduction filter,
2-Adaptive median
filter.
Order statistics filters:
1-Median filter,
2-Max and min filters,
3-Mid-point filter,
4-Alpha-trimmed filters.
85. , Pa, Pb less than 0.2.
The following algorithm try to decided that zmed , zx,y are not
an impulse, (Zmin and zmax are considered to be impulse values), then
keep the value of zx,y ,.Otherwise, change window size up to
Smax before assigning the center pixel the to zmed or zx,y value.
Zx,y: gray level at coordinates center (x,y).
86.
87.
88.
89. Where D(u,v) is the distance
from the origin, W is the
width of the band, and Do is
its radial center.
D
W
D0
A frequency band
Ideal
Butterworth
Gaussian
115. Hough transform algorithm;
1- define the desired increments Dr,and Dq , and qunatize
the space accordingly,
2- For every point of interest(typically points found by edge
detectors that exceed some threshold value), plug the values
for x, and y into the transform equation, then , for each value
of q in the quantized space, solve for r,
3- for each r,q pair from step 2 , record the x,y pair in the
corresponding block. This constitutes a hit for that particular
block.
When this process is completed, the number of hits in each
block corresponds to the number of pixels on the line . Next ,
select a threshold and examine the quantization blocks that
contain more points than the threshold.
116. Fig.10.20-a shows five points, 1-2-3-4-5, b- is the corresponding
lines in HT space, r = N, N is the image size.
-90 90
-45 45
126. Basic adaptive thresholding:
It an approach to reduce the effect of nonuniform illumination by divide the image
into subimages, such that the illumination of each Subimages is approximately
uniform . The following are the steps to perform basic adaptive thresholding
to the previous image:
136. Solu:
2 to 1= 3 directions, counterclockwise, 2_3 + 3_0+ 0_1, and so on,
1 to 0 = 3, 0 to 1 = 1, 1 to 0 = 3, 0 to 3 = 3,
3 to 3 = 0, 3 to 2 = 3, 2 to 2 = 0.
First difference code normalize chain code w.r.t rotation.
So we get normalization w.r.t starting point
1 0
1 0
3
3
22
Starting point
142. This algorithm is applied for thinning binary images.
Region points are assumed to have value 1 and
background points have value 0. The method consists
of successive passes of two basic steps applied to the
contour points of the given region. With reference to
the 8-neighboring notation one can determine the
contour points. The first step in the algorithm will be
as follows:
143.
144.
145.
146.
147.
148.
149. •Curvature:
–Rate of change of slope
–i.e. using the difference between the slopes of
adjacent boundary segments, which have been
represented as straight lines, as a descriptor of
curvature at the point of intersection of the segments.
– Convex segment: change in slope at p is nonnegative
–Concave segment: change in slope at p is negative
–Ranges in the change of slope:
•Less than 10° line
•More than 90° corner