Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 38

Module 2

IMAGE ENHANCEMENT

Spatial Domain filtering : The Mechanics of Spatial


Filtering, Smoothing Spatial Filters-Linear Filters-
Averaging filter, Order-Statistic Filters- Median filter,
Application of Median filtering for Noise removal
Sharpening Spatial Filters- The Laplacian, Unsharp
Masking and High boost Filtering, Using First-Order
Derivatives —The Gradient- Sobel, Prewitt and Roberts
Enhancement
 Qualitative
 That suits the purpose
 Applications: Numerous, medical
imaging, sports imaging,
entertainment

07/15/2024 2
Source: http://www.cse.iitd.ernet.in/~pkalra/col783/week-2.pdf
07/15/2024 3
07/15/2024 4
Background
 Spatial domain process
g ( x, y )  T [ f ( x, y )]

 where f ( x, y ) is the input image, g ( x, y ) is


the processed image, and T is an operator
on f, defined over some neighborhood of ( x, y )
 linear spatial filter performs a sum-
of-products operation between an
image f and a filter kernel, w.
 The kernel is an array whose size
defines the neighborhood of
operation, and whose coefficients
determine the nature of the filter.
SMOOTHING (LOWPASS)
SPATIAL FILTERS
 Smoothing (also called averaging)
spatial filters are used to reduce
sharp transitions in intensity
LOWPASS GAUSSIAN FILTER
KERNELS
image padding
 Zero padding
 mirror (also called symmetric) padding, in
which values outside the boundary of the
image are obtained by mirror-reflecting
the image across its border
 replicate padding, in which values
outside the boundary are set equal to the
nearest image border value
Order-statistic filters

 median filter: Replace the value of a pixel by


the median of the gray levels in the
neighborhood of that pixel
 Noise-reduction
UQP
UQP-Dec’19
UQP-May 19
Sharpening Spatial Filters
 The principal objective of
sharpening is to highlight fine detail
in an image or to enhance detail
that has been blurred, either in
error or as an natural effect of a
particular method of image
acquisition
 The image blurring is accomplished
in the spatial domain by pixel
averaging in a neighborhood.
 Since averaging is analogous to
integration.
 Sharpening could be accomplished
by spatial differentiation.
Sharpening (High Pass) Spatial Filters
Laplacian as an isotropic second
derivative
Practical implementation of
Laplacian
Results of sharpening: Original,
Laplacian, scaled Laplacian, and
sharpened images
Unsharp
masking
• Blur the original image.
• mask = original – blurred
• output = original + mask
Sample
results
of
unsharp

masking
a. Original c. a+b

b. Laplacian d. Sobel of a
e. Sobel smoothened with 5x5 g. a+f

f. Mask e * c h. Gamma correction of g

You might also like