Digital Image and Video Processing (UEC1722)
Unit – I Fundamentals of Image Processing
Dr. C. Vinoth Kumar
Asso. Prof. / ECE, SSNCE
Unit I – Fundamentals of Image Processing
• Image Representation and Formation
• Image sampling and quantization
• Pixel distribution
• Histogram equalization and matching
• Enhancement
• Color image processing
Session Objectives
• To discuss about the smoothing and sharpening filters in
frequency domain for image enhancement
• To understand the principle of homomorphic filtering for
image enhancement
Session Outcomes
• At the end of the session, students will be able to
- Understand and apply various smoothing and
sharpening filters in frequency domain for image
enhancement
- Study and apply homomorphic filtering for image
enhancement
Smoothing Frequency – Domain filters (LPF):
G(u,v) = H(u,v) F(u,v)
F(u,v) is the Fourier transform of the image to
be smoothed.
H(u,v) is the filter transfer function.
G(u,v) is the smoothened image.
Three types of Low pass filters: Ideal (very
sharp), Butterworth and Gaussian (very
smooth) filters.
For higher order, Butterworth filter approaches
the form of ideal filter and for lower order, it
approaches the Gaussian filter.
Ideal Low pass filter:
1 ifD (u , v) ≤ DO
H (u , v) =
0 ifD (u , v) > DO
[ 2
D(u , v) = (u − M / 2 ) + (v − N / 2) ]
2 1/ 2
To establish a set of standard cutoff frequency
loci is to compute circles that enclose specified
amounts of total image power PT.
This quantity is obtained by summing the
components of the power spectrum at each point
of (u,v), i.e.,
N −1 N −1
PT = ∑∑ P(u, v)
u =0 v =0
where
2
P(u, v) = F (u , v)
If the transform has been centered, a circle of
radius ‘r’ with origin at the center of the
frequency rectangle encloses α percent of
power, where
α = 100∑∑ P(u , v) / PT
u v
Butterworth Lowpass filters:
The transfer function of a Butterworth Lowpass filter
of order n with cutoff frequency at a distance DO from
the origin is defined as, 1
H (u, v) =
1 + [D(u, v) / DO ]
2n
Gaussian Lowpass Filters:
The form of these filters in two dimensions is
given by, 2 2
− D ( u ,v ) / 2 DO
H (u, v) = e
Sharpening Frequency – Domain filters (HPF):
Edges and abrupt changes in gray levels are
associated with high – frequency components.
The image sharpening can be achieved in the
frequency domain by a high pass filtering
process.
The zero – phase shift filters are used.
Hhp(u,v) = 1 – Hlp(u,v)
Three types of High pass filters: Ideal (very sharp),
Butter worth and Gaussian (very smooth) filters.
For higher order, Butter worth filter approaches
the form of ideal filter and for lower order, it
approaches the Gaussian filter.
The spatial representation of a frequency domain
filter is obtained by
(i) Multiplying H(u,v) by (-1)u+v for centering;
(ii) Computing the inverse DFT; and
(iii) Multiplying the real part of the inverse DFT by
(-1)x+y.
Ideal High pass filter:
0 ifD(u, v) ≤ DO
H (u, v) =
1 ifD(u, v) > DO
[ 2
D(u, v) = (u − M / 2) + (v − N / 2) ]
2 1/ 2
Butterworth Highpass filters:
The transfer function of a Butterworth Lowpass filter
of order n with cutoff frequency at a distance DO from
the origin is defined as, 1
H (u, v) =
1 + [DO / D(u, v)]
2n
Gaussian Lowpass Filters:
The form of these filters in two dimensions is
given by, 2 2
− D ( u ,v ) / 2 DO
H (u, v) = 1 − e
High – boost filtering is used to increase the
contribution made by the original image to the
overall filtered result.
Unsharp masking is obtaining a high pass filtered
image by subtracting from the image a low pass
filtered version of itself.
fhp(x,y) = f(x,y) - flp(x,y)
Hhp(u,v) = 1 - Hlp(u,v)
High boost filtering is obtained by
fhb(x,y) = A f(x,y) - flp(x,y)
Hhb(u,v) = (A – 1) + Hhp(u,v)
Homomorphic Filtering:
The function f(x,y) of an image may be
characterized by two components:
(1) the amount of source illumination incident on
the scene being viewed – illumination – i(x,y)
(2) the amount of illumination reflected by the
objects in the scene – reflectance – r(x,y)
The two functions combine as a product to form
f(x,y) is:
f(x,y) = i(x,y) . r(x,y)
where 0 < i(x,y) < ∞
and 0 < r(x,y) < 1
The above equation cannot be used directly to operate
separately on the frequency components of illumination
and reflectance, because the Fourier transform of the
product of two functions is not separable, i.e.,
F{f(x,y)} ≠ F{i(x,y)} F{r(x,y)}
Suppose,
z(x,y) = ln {f(x,y)} = ln {i(x,y)} + ln {r(x,y)}
F{z(x,y)}=F{ln{f(x,y)}}=F{ln{i(x,y)}}+F{ln{r(x,y)}}
Z(u,v) = Fi(u,v) + Fr(u,v)
If Z(u,v) is processed by means of a filter function
H(u,v), then
S(u,v) = H(u,v) Z(u,v)
= H(u,v) Fi(u,v) + H(u,v) Fr(u,v)
and
s(x,y) = F-1{S(u,v)}
= F-1{H(u,v) Fi(u,v)} + F-1{ H(u,v) Fr(u,v)}
By letting, i’(x,y) = F-1{H(u,v) Fi(u,v)}
r’(x,y) = F-1{ H(u,v) Fr(u,v)}
Therefore, s(x,y) = i’(x,y) + r’(x,y)
The inverse to logarithm (exponential)
operation yields the desired enhanced image,
g(x,y) = es(x,y) = ei’(x,y) er’(x,y) = io(x,y) ro(x,y)
The illumination component of an image generally
is characterized by slow spatial variations (low
frequency), while the reflectance component tends
to vary abruptly (high frequency).
The gain over the illumination and reflectance
components can be controlled with a
homomorphic filter.
If the parameters γH and γL are chosen such that γL
< 1 and γH > , then the filter function is as shown
below.
The low frequency components (illumination) are
decreased and the high frequency components
(reflectance) are amplified.
The net result is dynamic range compression and
contrast enhancement.
Summary
• The smoothing filters in frequency domain such as masking,
averaging and order-statistics for image enhancement are
studied.
• The sharpening filters in frequency domain such as
derivatives, gradient, and Laplacian for image enhancement
are discussed.
• The homomorphic filtering is studied.
Review Questions
1. Compare Gaussian and Butterworth low pass filter.
2. Mention the importance of homomorphic filtering.
Text Books and References
Text Books:
• Rafael C. Gonzalez, Richard E. Woods, ‘Digital Image Processing’, Pearson,
Third Edition, 2010.
• Anil K. Jain, ‘Fundamentals of Digital Image Processing’, Pearson, 2002.
References:
• Kenneth R. Castleman, ‘Digital Image Processing’, Pearson, 2006.
• Rafael C. Gonzalez, Richard E. Woods, Steven Eddins, ‘Digital Image
Processing using MATLAB’, Pearson Education, Inc., 2011.
• D. E. Dudgeon and RM. Mersereau, ‘Multidimensional Digital Signal
Processing’, Prentice Hall Professional Technical Reference, 1990.
• William K. Pratt, ‘Digital Image Processing’, John Wiley, New York, 2002
• Milan Sonka et al, ‘Image processing, analysis and machine vision’,
Brookes/Cole, Vikas Publishing House, 2nd edition, 1999.
Thank You