






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.
www.ImageProcessingPlace.com
Gonzalez & Woods
-^
Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.
www.ImageProcessingPlace.com
Gonzalez & Woods
For a mask of size
m
n
, we assume that
m
a +1 and
n
b +1, where
a^
and
b
are positive integers
Thus our focus is on filters of odd size
-^
In general, linear spatial filtering of an image of size
with a
filter of size
m
n
is given by
where
x
and
y
are varied so that each pixel in
w
visits every pixel in
f
Boundary cases (where filter extends past edge of image) are dealtwith in a number of ways: zero-padding, mirroring
(^
)^
(^
)^
(^
)
a^
b
s^
a t
b
g^
x y
w s t
f^
x^
s y
t
=−
=−
∑ ∑
Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.
www.ImageProcessingPlace.com
Gonzalez & Woods
Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.
www.ImageProcessingPlace.com
Gonzalez & Woods
-^
-^
-^
-^
-^
Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.
www.ImageProcessingPlace.com
Gonzalez & Woods
Generating spatial filter masks
-^
Suppose we wanted to replace the pixels in an image bythe average intensity of a 3
3 neighborhood centered on
those pixels
-^
In vector representation this is
-^
The mask is thus
9 1 1
i i
z^
z
=
=
Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.
www.ImageProcessingPlace.com
Gonzalez & Woods
Generating spatial filter masks
-^
Suppose
σ
(^
)^
(^
)^
(^
)^
(^
)
(^
)^
(^
)^
( )
( )
2
2 2
2
2 2
1
1 2
1
1
1 2
9
1,
1
1,
1
...
1,
1,
w
h^
h^
e
w
h^
h^
e
σ
σ
−^
−
=^
−^
−^
=^
−^
−^
=
=^
=^
=
1
Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.
www.ImageProcessingPlace.com
Gonzalez & Woods
-^
Specify neighborhood
Specify operation
-^
-^
-^