DIP Lecture
DIP Lecture
Lecture (4)
Pp 116- 124
Image Filtering
Input image Output image
(x,y) (x,y)
pointwise
transformation
(x,y) (x,y)
neighbourhood
transformation
Image Filtering
The output g(x,y) can be a linear or non-linear
function of the set of input pixel grey levels { f(x-M,y-
M)…f(x+M,y+M}.
(x-1,y-1)
(x,y) (x,y)
(x+1,y+1)
Spatial Filtering
R w1 z1 w2 z 2 ... wmn z mn
mn
wi zi
i i
Basics of Spatial Filtering - Linear
Spatial filtering are filtering
operations performed on the
pixel intensities of an
image and not on the
frequency components of
the image.
a b
g ( x, y ) w(s, t ) f ( x s, y t )
s a t b
a = (m - 1) / 2 b = (n - 1) / 2
Example
Computation for the median is a nonlinear operation.
Smoothing Spatial Filtering - Linear
Averaging (low-pass) Filters
Smoothing filters are used
- Noise reduction
- Smoothing of false contours
- Reduction of irrelevant detail
Box Weighted
filter average
Smoothing Spatial Filtering - Linear
Averaging (low-pass) Filters
Used for blurring and for noise reduction
Blurring is used in preprocessing steps, such as
removal of small details from an image prior to
object extraction
Noise reduction can be accomplished by blurring
with a linear filter and also by a nonlinear filter
n=3
n=5 n=9
n = 35
n = 15
H.R. Pourreza
Smoothing Spatial Filtering
Averaging & Threshold
filter size Thrsh = 25% of
n = 15 highest intensity
Smoothing Spatial Filtering-nonlinear
Order Statistic Filters