Beruflich Dokumente
Kultur Dokumente
Dr. Y. K. Dubey
Assist. Professor
Department of Electronics & Telecommunication
Engineering, YCCE, Nagpur.
UNIT 2:- SYLLABUS
a b
g ( x, y ) = w(s, t ) f ( x + s, y + t )
s =− a t =− b
(m − 1) b=
(n − 1)
a=
2 2
LECTURE 1:- Smoothing Spatial Filtering
❑ Smoothing Linear Filter (Image Averaging Operation)
❑ The output (response) of a smoothing, linear spatial filter is simply the
average of the pixels.
❑ These filters are called averaging filters. and also are referred to a lowpass
filters
❑ Replaces the intensity value of the pixel under consideration with the
average of the intensity values of its neighbourhood.
❑ The mask used here is
1 2 1
1 1 1 1
1
1 1 1 16 2 4 2
9
1 1 1 1 2 1
a b
w(s, t ) f ( x + s, y + t )
g ( x, y ) = s =− a t =− b
a b
w(s, t )
s =− a t =− b
[ Before 100 85 98
Filtering ] 99 95 102 Sorting of neighboring pixels in Ascending Order
90 101 108
85 90 95 98 99 100 101 102 108
Median
[ After 100 85 98
99
Filtering ] 99 99 102
90 101 108
df
= f ( x + 1) − f ( x) First Order Derivative
dx
d2 f
2
= f ( x + 1) + f ( x − 1) − 2 f ( x) Second Order Derivative
dx
8
7
6
5
4
3
2
1
0
5 5 4 3 2 1 0 0 0 6 0 0 0 0 1 3 1 0 0 0 0 7 7
f’
f’’
[Observation of 1st order and 2nd order Derivative over a 1-D signal]
LECTURE 3:- Sharpening Spatial Filtering
• Use of Second order derivative for Image Sharpening –The
Laplacian
• Laplacian of a function in continuous domain
2
f 2
f
f =
2
+ 2
x 2
y
• Laplacian in discrete domain
2 f
= f ( x + 1, y ) + f ( x − 1, y ) − 2 f ( x, y )
x 2
2 f
= f ( x, y + 1) + f ( x, y − 1) − 2 f ( x, y )
y 2
2 f 2 f
f = 2 + 2 = f ( x + 1, y ) + f ( x − 1, y ) + f ( x, y + 1) + f ( x, y − 1) − 4 f ( x, y )
2
x y
LECTURE 4:- Sharpening Spatial Filtering
0 1 0 0 -1 0 1 1 1 -1 -1 -1
1 -4 1 -1 4 -1 1 -8 1 -1 8 -1
0 1 0 0 -1 0 1 1 1 -1 -1 -1
For Horizontal & vertical Lines For Horizontal & vertical and
diagonal Lines
Thus, the basic way in which the Laplacian for image enhancement
is use is as follows:
f ( x, y ) − f ( x, y )
2 If the center coefficient of the
g ( x, y ) =
Laplacian mask is negative
f ( x , y ) + 2
f ( x, y ) If the center coefficient of the
Laplacian mask is positive
LECTURE 4:- Sharpening Spatial Filtering
LECTURE 4:- Sharpening Spatial Filtering
LECTURE 5:- Sharpening Spatial Filtering
f
f = mag ( f )
Gx x 1
f = = = Gx 2 + G y 2 2
G y f
y 1
f 2 f 2
2
= +
x y
f Gx + G y
LECTURE 6:- Sharpening Spatial Filtering
Z2 Z2 Z3
Z4 Z5 Z6
Z7 Z8 Z9
Gx = ( Z8 − Z 5 ) and G y = ( Z 6 − Z 5 )
Gx = ( Z 9 − Z 5 ) and G y = ( Z8 − Z 6 )
1
f = ( Z 9 − Z 5 ) + ( Z 8 − Z 6 )
2
2 2
-1 0 0 -1
f Z 9 − Z 5 + Z 8 − Z 6 0 1 1 0
-1 -2 -1 -1 0 1
0 0 0 -2 0 2
1 2 1 -1 0 1
f ( Z 7 + 2Z8 + Z 9 ) − ( Z1 + 2Z 2 + Z 3 ) +
( Z3 + 2Z 6 + Z9 ) − ( Z1 + 2Z 4 + Z 7 )
Sobel Operator
DTEL
LECTURE 6:- Sharpening Spatial Filtering
-1 -1 -1 -1 0 1
0 0 0 -1 0 1
1 1 1 -1 0 1
f ( Z 7 + Z8 + Z 9 ) − ( Z1 + Z 2 + Z 3 ) +
( Z3 + Z 6 + Z9 ) − ( Z1 + Z 4 + Z 7 )
Prewit Operator
LECTURE 6:- Sharpening Spatial Filtering
UNIT 2:-
References
• Digital Image Processing, R. C. Gonzalez and
R. E. Woods.
• Fundamentals of Digital Image Processing,
A. K. Jain.
UNIT 2:-