Sayısal Görüntü İşleme Teknikleri
Doç. Dr. Mehmet Serdar Güzel
Slides are mainly adapted from the following course page:
http://www.comp.dit.ie/bmacnamee
Lecturer
Instructor: Assoc. Prof Dr. Mehmet S Güzel
Office hours: Tuesday, 1:30-2:30pm
Open door policy – don’t hesitate to stop by!
Watch the course website
Assignments, lab tutorials, lecture notes
•slide 2
Interesting article in the March, 2006
issue of Wired magazine
Read it here
Image Enhancement
(Spatial Filtering 1)
Contents
In this lecture we will look at spatial filtering techniques:
Neighbourhood operations
What is spatial filtering?
Smoothing operations
What happens at the edges?
Correlation and convolution
Neighbourhood Operations
Neighborhood operations merely operate on a larger neighborhood of pixels than point operations
Neighborhoods are regularly a rectangle around a central pixel
Any size rectangle and any shape filter are possible
Origin x
y Image f (x, y)
(x, y)
Neighbourhood
Simple Operations
Some simple neighbourhood operations given as:
Min: Set the pixel value to the minimum along the neighbourhood
Max: Set the pixel value to the maximum along the neighbourhood
Median: The median value of a set of numbers is the midpoint value in that set (e.g. from the set [11, 27, 35, 48, 54] 35 is the median). The median usually works better than the average
The Spatial Filtering Process
r s t
u y w
x y z
Origin x
y Image f (x, y)
e
new= y *x +
r *a + s *b + t *c +
u *d + w *f +
x *g + y *h + z *i
Filter
3*3
Neighbourhood e 3*3 Filter
a b c
d x f
g h i
Original Image Pixels
*
This process is repeated for every pixel in the original
image to produce the enhanced image
Smoothing Spatial Filters
1
/
9 1/
9 1/
91
/
9 1/
9 1/
91
/
9 1/
9 1/
9 Average Filtering
Simply average all of the pixels in a neighbourhood around a central value
Particularly useful in eliminating noise from images
Also useful for highlighting unrefined feature
Averaging filter
example
Smoothing Spatial Filtering
1
/
9 1/
9 1/
91
/
9 1/
9 1/
91
/
9 1/
9 1/
9Origin x
y Image f (x, y)
e =
1/
9*306 +
1
/
9*194 +
1/
9*100 +
1/
9*108 +
1
/
9*99 +
1/
9*98 +
1
/
9*65 +
1/
9*70 +
1/
9*35 =
Average Filter
Simple 3*3
Neighbourhood 106
104 99 95
100 108 98 90 85
1/9 1/9 1/9
1/9 1/9 1/9
1/9 1/9 1/9
3*3 Smoothing Filter
194 100 108 99 306 98 65 70 35
Image Pixels
*
Weighted Smoothing Filters
2
/
32 4/
32 2/
324
/
32 8/
32 4/
322
/
32 4/
32 2/
32 Pixels closer to the central pixel are more significant
It is called as weighted averaging