Beruflich Dokumente
Kultur Dokumente
Processing
Dr. K. Adalarasu
KA Digital Image Processing Unit III OCT, 2012, PSNACET
Reference
William K. Pratt, Digital Image Processing ,
John Willey ,2001
Milkman Sonka, Vaclav Hlavac, Roger Boyle,
Broos/Colic, Thompson Learniy, Vision,
Image Processing Analysis and Machine,
1999.
Jain A.K., Fundamentals of Digital Image
Processing, PHI, 1995.
Chanda Dutta Magundar, Digital Image
Processing and Applications, PHI, 2000
KA Digital Image Processing Unit III OCT, 2012, PSNACET
Image Enhancement
Techniques
Basics of Spatial
Filtering
KA Digital Image Processing Unit III OCT, 2012, PSNACET
Contents
Spatial filtering techniques
What is spatial filtering?
Smoothing Spatial filters
Sharpening Spatial Filters
Combining Spatial Enhancement Methods
Neighbourhood Operations
Neighbourhood operations simply
operate on a larger neighbourhood of
pixels than point operations
Neighbourhoods are mostly a
rectangle around a central pixel
Any size rectangle and any shape filter
are possible
Neighbourhood Operations
Origin
(x, y)
Neighbourhood
Image f (x, y)
Neighbourhood Operations
Each pixel in origin image, outcome is written
on same location at target image
Origin
Origin
Neighbourhood
Target
(x, y)
Image f (x, y)
KA Digital Image Processing Unit III OCT, 2012, PSNACET
Max
Set the pixel value to the maximum in the
neighbourhood
Spatial Filtering
Use mask/ kernel/ template or window for
filtering
Values in a filter subimage are referred to as
coefficients, rather than pixel
Our focus will be on masks of odd sizes, e.g.
3x3, 5x5, 7x7,
10
11
Simple 3*3
Neighbourhood
3*3 Filter
Original Image
Pixels
Image f (x, y)
Filter (w)
12
R w1 z1 w2 z 2 ... wmn z mn
mn
wi zi
i i
W - mask coefficients
z- values of image gray levels corresponding to those
coefficients
mn is total number of coefficients in mask
KA Digital Image Processing Unit III OCT, 2012, PSNACET
13
14
15
16
Spatial Filtering
Process of linear filtering is similar to a
frequency domain convolution
Hence, linear spatial filtering is referred
as convolving a mask with an image
Filter masks are called as convolution
masks / convolution kernel
17
18
Spatial Filtering
Another representation of a general 3*3 spatial
filter mask
Noise reduction
Blurring with a linear filter and also by
nonlinear filtering
KA Digital Image Processing Unit III OCT, 2012, PSNACET
19
20
21
22
box filter
weighted average
23
24
25
Simple 3*3
Neighbourhood
1
1
1
/9 100
/9 108
/9
104
1
/9 106
/9 198
/9
99
/9 190
/9 185
/9
95
90
85
Original Image
3*3 Smoothing
Pixels
/9
/9
/9
/9
/9
/9
/9
/9
/9
Filter
Filter
Image f (x, y)
e = 1/9*106 +
1
/9*104 + 1/9*100 + 1/9*108 +
1
/9*99 + 1/9*98 +
1
/9*95 + 1/9*90 + 1/9*85
= 98.3333
26
Spatial Filters
1 1 1
1
1
1
1
9
1 1 1
1 1 1
1 8 1
1 1 1
A low-pass filter
A high-pass filter
27
28
29
30
Image Smoothing
Important application of spatial
averaging is to blur an image for
purpose getting a gross representation
of objects of interest
Intensity of smaller objects blends with
background and larger objects become
bloblike and easy to detect
31
32
Spatial Filtering
Order-Statistics Filters
Nonlinear filters whose response is based on
ordering (ranking) pixels contained in image
area encompassed by filter
Then replacing value of the center pixel with
value determined by the ranking result
One example is Median filter
Replaces value of a pixel by median of gray levels
in the neighborhood of that pixel
33
34
Median filter
Median filters are nonlinear
Median filtering reduces noise without
blurring edges and other sharp details
Median Filter
10 20 10
25 10 75
90 85 100
Order-Statistics Filters
With considerably less blurring than linear
smoothing filters of similar size
Particularly effective in presence of impulse
noise, also called salt-and-pepper noise
Because of its appearance as white and black dots
superimposed on an image Similarly
35
Original Image
With Noise
Image After
Averaging Filter
Image After
Median Filter
36
37
38
Median
Filter
39
40
Spatial Filtering
Salt&Pepper
noise added
Original
3x3
averaging
filter
3x3
median
filter
41
42
Summary
The image enhancement spatial
smoothing technique is studied.
The types of smoothing filtering, such as
averaging filter, weighted averaging and
median filters are learned.
43
Questions
1. What is the another name for
averaging filter?
2. Name some order statistics
filters