0% found this document useful (0 votes)
4 views20 pages

Lecture 13-Neighborhood Processing

The document discusses noise in digital images, identifying it as undesired information that contaminates images, with sources including illumination and acquisition devices. It covers various noise models such as Gaussian, Uniform, and Impulse, and explains spatial filtering techniques used to reduce noise through convolution and averaging methods. Additionally, it highlights the use of non-linear filters like median and min/max filters for specific types of noise.

Uploaded by

sanjaysajivkumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views20 pages

Lecture 13-Neighborhood Processing

The document discusses noise in digital images, identifying it as undesired information that contaminates images, with sources including illumination and acquisition devices. It covers various noise models such as Gaussian, Uniform, and Impulse, and explains spatial filtering techniques used to reduce noise through convolution and averaging methods. Additionally, it highlights the use of non-linear filters like median and min/max filters for specific types of noise.

Uploaded by

sanjaysajivkumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Noise

08/03/2026 1
Noise in Digital Images
 Any undesired information that contaminates an
image can be considered as a noise.
 Sources of Noise in Machine Vision
 Illumination
 Environment
 Acquisition Devices
 Transmission
 Spatial Noise descriptor is characterized by a
probability density function.
 Common noise models worth learning
 Gaussian
 Uniform
 Impulse
2 08/03/20
Noise Model - Gaussian
Gaussian Noise
where
z: gray scale
μ = mean (average)
σ = standard
deviation

3 08/03/20
Noise Model - Uniform
 Uniform Noise

4 08/03/20
Noise Model - Impulse
 Salt and Pepper noise

Where b>a

5 08/03/20
NEIGHBORHOOD PROCESSING

6 08/03/20
Spatial Domain
Procedures that operate
directly on pixels
g(x, y) = T[ f(x, y) ]
where
 f(x, y) is the input image
 g(x, y) is the processed image
 T is the operator on f defined
over some neighbourhood of (x,
y)

7 08/03/20
Filter
 The term is basically borrowed
from the frequency domain
 Also called as spatial masks,
kernels, templates and windows
 Neighbourhood of a point (x, y)
can be defined by using a
square/rectangular (commonly
used) or circular subimage area
centred at (x, y) – mask or filter
 The centre of the subimage is
moved from pixel to pixel starting
at the top left corner of the image

8 08/03/20
Spatial Filtering
 A spatial filter consists of
 A neighbourhood
 A pre-defined operation
 The values of a filter subimage
are referred to as coefficients,
rather than pixel intensities.

9 08/03/20
Linear Spatial Filtering

10 08/03/20
Linear Filtering
 Linear Filtering of an image f of size M x N by filter by
mask of size m x n is given by the expression

 To generate a complete filtered image this equation must


be applied for x = 0, 1, 2, ..., M-1 and y = 0, 1, 2, ..., N-1
 The mask falls outside the edge
 Copy the same values for corner pixels
 Ignore the edges
 The resultant image is smaller than the original
 Pad with zeros
 Introduces unwanted artifacts

11 08/03/20
Filtering Operation
 Convolution of an image with a filter kernel or
mask.
 Such filtering often addresses the removal (or
suppression) of noise (smoothing)
 Most effectively accomplished using convolver
(or filtering) hardware.

12 08/03/20
Smoothing Spatial Filters
 Use: For blurring images & noise reduction
 Blurring is used in preprocessing steps, such as
 Removal of small details from an image prior to object extraction
 Bridging of small gaps in lines or curves
 Smoothing of false contours

 Noise Reduction can be accomplished by blurring with linear or


non-linear filters
 Output is simply the average of the pixels contained in the
neighbourhood of the filter mask
 The main drawback is that they tend to blur edges which are
main features in machine vision applications.
13 08/03/20
Averaging Filter
 Replace each pixel by the average of pixels in a
square window surrounding this pixel
 3x3 averaging filter

14 08/03/20
Weighted Averaging
 Instead of averaging all the pixel values in the window, give the
closer-by pixels higher weighting, and far-away pixels lower
weighting
 Reduce value of coefficients as a function of increasing distance
from the origin
 An attempt to reduce blurring in the smoothing process
 Its generally difficult to find difference between box filter and
weighted filter for small masks.

15 08/03/20
Weighted Averaging

Box Filter Weighted Averaging

Other Filters

16 08/03/20
An Example
 What happens if we use
an averaging filter with
a larger window?
 Original image, size
500x500 pixels
 Results of smoothing
with averaging filter
masks of size n=3, 5, 9,
15, 35 respectively

17 08/03/20
Non-Linear Filters

 Order-statistic filters are generally used for

smoothing.

 Response is based on ordering (ranking) the

pixels contained in the image area

encompassed by the filter

18 08/03/20
Order-Statistic Filters
 Median Filter
 Replaces the value of a pixel by the median of the
intensity levels in the neighborhood of that pixel

 Best suited for random and impulse noise


 Min Filter
 Select the smallest value within an ordered window of
pixel values, denoted as

 Works best when the noise is primarily of the salt-type


(high value)
19 08/03/20
Order-Statistic Filters
 Max Filter
 Select the largest value within an ordered window of
pixel values, denoted as

 Works best for pepper-type noise (low value)


 Midpoint filter
 Select the average of the maximum and minimum pixel
values within the window, denoted as

 Works best for randomly distributed noise like Gaussian


or uniform noise
20 08/03/20

You might also like