SlideShare a Scribd company logo
1
UNIT-2
IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN
Introduction to Image enhancement:
 Image enhancement is to process a given image so that the result is more
suitable than the original image for a specific application.
 Objective of Image enhancement
Principle objective of Image enhancement is to process an image so that result
is more suitable than original image for specific application
 Image enhancement approaches fall into two broad categories:
1. Spatial domain methods
2. Frequency domain methods
 Spatial domain refers to the image plane itself, and approaches in this category
are based on direct manipulation of pixels in an image.
 Frequency domain processing techniques are based on modifying the Fourier
transform of an image.
2
1. Spatial domain:-
Spatial domain refers to the image plane itself, and approaches in this category are
based on direct manipulation of pixels in an image.
Spatial domain processes will be denoted by the expression
g (x, y) = T [f (x, y)]
Where,
f(x, y) - input image,
g(x, y) - processed image
T - Operator on f, defined over some neighborhood of (x, y).
The neighborhood about a point (x, y) is to use a square or rectangular sub image area
centered at (x, y)
Figure 1: 3*3 neighborhood about a point (x, y) in an image.
The center of sub image is moved from pixel to pixel starting at the top left
corner. The operator T is applied to each location (x,y) to find the output g at
that location . The process utilizes only the pixel in the area of the image
spanned by the neighborhood.
Basic Gray Level Transformation Functions
Here, T is a gray-level transformation function of the form:
s = T(r)
Where, r and s - denote the gray level of f(x, y) and g(x, y) at any point (x, y).
3
(a) (b)
Figure 2 a, b: Gray level transformation functions for contrast enhancement.
Image enhancement can be done through gray level transformations which are
discussed below.
Intensity/ Gray Level Transformations:
These are the simplest image enhancement techniques.
1. Linear (negative & Identity) transformation
2. Logarithmic (log & inverse) transformations
3. Power law(nth
& nth
root) transformations
4. Piecewise-Linear transformation functions
1. Linear transformation
1. Image Negative:-
The negative of an image with gray levels in the range [0, L-1] is obtained by using the
negative transformation.
Where r= gray level value at pixel (x,y)
L is the largest gray level consists in the image
S = L – 1 - r
4
i. If r=0, S = L – 1
ii. If r=L – 1, S = 0
Fig. Negative transformations
This type of processing is particularly suited for enhancing white or gray detail embedded in dark
regions of an image, especially when the black areas are dominant in size.
2. Logarithmic transformations
Logarithmic transformation further contains two type of transformation. Log
transformation and inverse log transformation.
a) Log Transformations:
The log transformations can be defined by this formula
s = c log (1 + r)
Where S and r are the pixel values of the output and the input image and c is a
constant and it is assumed that r ≥ 0
During log transformation, the dark pixels in an image are expanded as compare to the
higher pixel values. The higher pixel values are kind of compressed in log
transformation. This result in following image enhancement
The inverse log transformation is opposite to log transformation so will reduce
low contrast image.
5
3. Power-Law Transformations
Power-law transformations have the basic form
s = c ry
Where c and γ are positive constants. Also can be represented as
s = c (r+ε) y
This symbol γ is called gamma
We use gamma transformation where we need to expand or compress darker region
i. If γ = 1, No change
ii. If γ > 1, compresses dark values and expands bright values
iii. If γ < 1, expands dark values Compresses bright values
6
Power law curves with fractional values of y map a narrow range of dark input values
into a wider range of output values, with the opposite being true for higher values of
input gray levels. We may get various curves by varying values of y.
Piecewise-Linear Transformations
1. Contrast Stretching
 It is the simplest piecewise linear transformation function
 The idea behind contrast stretching is to increase the dynamic range of
gray levels in the image being processed.
a) If r1=s1 and r2=s2, linear transformation
b) If r1=r2 & s1=0, s2=L-1, thresholding
c) Intermediate values of (r1, s1) and (r2, s2) produce various degrees of spread
in the gray value
7
2. Gray-level Slicing
Gray level slicing is used to Highlighting a specific range of gray levels in an image.
For example when enhancing features such as masses of water in satellite
image and enhancing flaws in x- ray images.
There are two methods of doing this-
(1) One method is to display a high value for all gray level in the range of interest and
a low value for all other gray level
(2) Second method is to brighten the desired ranges of gray levels but preserve the
background and gray level tonalities in the image.
8
3. Bit-plane Slicing
 Highlighting the contribution made to total image appearance by specific bits
might be desired.
 It is useful in image compression.
Suppose that each pixel in an image is represented by 8 bits. Imagine that the image is
composed of eight 1-bit planes, ranging from bit-plane 0 for the least significant bit to
bit plane 7 for the most significant bit. In terms of 8-bit bytes, plane 0 contains all the
lowest order bits in the bytes comprising the pixels in the image and plane 7 contains
all the high-order bits.
Example 1:- find the bit planes of given 3x3 image
Solution:
9
Example 2: find the bit planes of given 3x3 image
Solution: binary representation of given image
Histogram Processing
The histogram of a digital image with gray levels in the range [0, L-1] is a discrete
function
h(rk)=nk
Where rk is the kth
gray level and nk is the number of pixels in the image having gray
level rk.
p(rk) is an estimate of the probability of occurrence of intensity level rk in an image.
10
Histogram Equalization
Histogram equalization is a technique for enhancing the appearance of images.
Let us consider the transformations as,
s=T(r), where 0 ≤ r ≤ 1
We assume that the transformation function T(r) satisfies the following conditions:
a. T(r) is a monotonically increasing function in the interval 0 ≤ r ≤ L-1:
b. 0 ≤ T(r) ≤ L-1 for 0 ≤ r ≤ L-1:
Equalization automatically determines a transformation function that seeks to produce
an output image that has a uniform histogram. It is a good approach when automatic
enhancement is needed
Histogram Equalization (Example)
11
Solution: based on above table histogram of input image
12
13
Figure: Processed histogram
So, that
Input image output image
Example:
14
Processed Histogram
15
Question:
Is histogram equalization always good?
Ans: No
16
17
Normalized hitogram
18
Basics of Spatial Filtering
 Filter term in “image processing” is referred to the subimage
 This sub image is called a filter, mask, kernel, template or window;
 The values in the filter sub image are referred to as coefficients rather than
pixel. Spatial filtering operations are performed directly on the pixels values
of the image
 The process consists of moving the filter mask from point to point in the image.
 The filter mask may be 3x3 mask or 5x5 mask or to be 7x7 mask.
1. Smoothing Spatial Filters:
Smoothing filters are used for blurring and noise reduction in the image.
 Blurring is pre-processing steps for removal of small details and Noise
Reduction is accomplished by blurring.
 Noise reduction can be accomplished blurring with a linear filter and also by
non-linear filtering.
Types of Smoothing Spatial Filter:
There are two way of smoothing special filters
1. Smoothing Linear Filters:
2. Order Statistics Filters:-
1. Smoothing Linear Filter:-
 The output of a smoothing liner spatial filter is simply the average of the pixel
contained in the neighborhood of the filter mask.
 These filters are also called averaging filters or low pass filters.
 A major application of smoothing is noise reduction.
19
a) Averaging filter:
A spatial averaging filter in which all coefficients are equal is sometimes
referred to as a “box filter”
Example:
b) Weighted averaging filter:
A weighted average filter is the one in which pixel are multiplied by different
coefficients.
Example:
.
2. Order Statistics Filter:-
Median filter
 In this filter the values of the center pixel is replaced by median of gray levels in the
neighborhood of that pixel.
 Median filters are popular because, provide excellent noise-reduction capabilities,
with less blurring than linear smoothing filters.
20
 These filters are particularly effective in the case of impulse or salt and pepper noise.
Example
Max filters
This filter is useful for finding the brightest points in an image.
Min filters
This filter is useful for finding the darkest points in an image.
Sharpening Filters:
The principal objective of sharpening is to highlight fine details in an image
21

More Related Content

Similar to UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU

Digital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainDigital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domain
Malik obeisat
 

Similar to UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU (20)

Digital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainDigital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domain
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
image enhancement
 image enhancement image enhancement
image enhancement
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
 
Chap5 imange enhancemet
Chap5 imange enhancemetChap5 imange enhancemet
Chap5 imange enhancemet
 
h.pdf
h.pdfh.pdf
h.pdf
 
Image_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptxImage_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptx
 
image processing intensity transformation
image processing intensity transformationimage processing intensity transformation
image processing intensity transformation
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lecture
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
 
4 image enhancement in spatial domain
4 image enhancement in spatial domain4 image enhancement in spatial domain
4 image enhancement in spatial domain
 
Lec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfLec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdf
 
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.ppt
 

Recently uploaded

RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
Atif Razi
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Hall booking system project report .pdf
Hall booking system project report  .pdfHall booking system project report  .pdf
Hall booking system project report .pdf
Kamal Acharya
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
Kamal Acharya
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
AbrahamGadissa
 

Recently uploaded (20)

KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and VisualizationKIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data StreamKIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Peek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdfPeek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdf
 
fluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerfluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answer
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
 
IT-601 Lecture Notes-UNIT-2.pdf Data Analysis
IT-601 Lecture Notes-UNIT-2.pdf Data AnalysisIT-601 Lecture Notes-UNIT-2.pdf Data Analysis
IT-601 Lecture Notes-UNIT-2.pdf Data Analysis
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
Hall booking system project report .pdf
Hall booking system project report  .pdfHall booking system project report  .pdf
Hall booking system project report .pdf
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docxThe Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
 
Furniture showroom management system project.pdf
Furniture showroom management system project.pdfFurniture showroom management system project.pdf
Furniture showroom management system project.pdf
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
 

UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU

  • 1. 1 UNIT-2 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN Introduction to Image enhancement:  Image enhancement is to process a given image so that the result is more suitable than the original image for a specific application.  Objective of Image enhancement Principle objective of Image enhancement is to process an image so that result is more suitable than original image for specific application  Image enhancement approaches fall into two broad categories: 1. Spatial domain methods 2. Frequency domain methods  Spatial domain refers to the image plane itself, and approaches in this category are based on direct manipulation of pixels in an image.  Frequency domain processing techniques are based on modifying the Fourier transform of an image.
  • 2. 2 1. Spatial domain:- Spatial domain refers to the image plane itself, and approaches in this category are based on direct manipulation of pixels in an image. Spatial domain processes will be denoted by the expression g (x, y) = T [f (x, y)] Where, f(x, y) - input image, g(x, y) - processed image T - Operator on f, defined over some neighborhood of (x, y). The neighborhood about a point (x, y) is to use a square or rectangular sub image area centered at (x, y) Figure 1: 3*3 neighborhood about a point (x, y) in an image. The center of sub image is moved from pixel to pixel starting at the top left corner. The operator T is applied to each location (x,y) to find the output g at that location . The process utilizes only the pixel in the area of the image spanned by the neighborhood. Basic Gray Level Transformation Functions Here, T is a gray-level transformation function of the form: s = T(r) Where, r and s - denote the gray level of f(x, y) and g(x, y) at any point (x, y).
  • 3. 3 (a) (b) Figure 2 a, b: Gray level transformation functions for contrast enhancement. Image enhancement can be done through gray level transformations which are discussed below. Intensity/ Gray Level Transformations: These are the simplest image enhancement techniques. 1. Linear (negative & Identity) transformation 2. Logarithmic (log & inverse) transformations 3. Power law(nth & nth root) transformations 4. Piecewise-Linear transformation functions 1. Linear transformation 1. Image Negative:- The negative of an image with gray levels in the range [0, L-1] is obtained by using the negative transformation. Where r= gray level value at pixel (x,y) L is the largest gray level consists in the image S = L – 1 - r
  • 4. 4 i. If r=0, S = L – 1 ii. If r=L – 1, S = 0 Fig. Negative transformations This type of processing is particularly suited for enhancing white or gray detail embedded in dark regions of an image, especially when the black areas are dominant in size. 2. Logarithmic transformations Logarithmic transformation further contains two type of transformation. Log transformation and inverse log transformation. a) Log Transformations: The log transformations can be defined by this formula s = c log (1 + r) Where S and r are the pixel values of the output and the input image and c is a constant and it is assumed that r ≥ 0 During log transformation, the dark pixels in an image are expanded as compare to the higher pixel values. The higher pixel values are kind of compressed in log transformation. This result in following image enhancement The inverse log transformation is opposite to log transformation so will reduce low contrast image.
  • 5. 5 3. Power-Law Transformations Power-law transformations have the basic form s = c ry Where c and γ are positive constants. Also can be represented as s = c (r+ε) y This symbol γ is called gamma We use gamma transformation where we need to expand or compress darker region i. If γ = 1, No change ii. If γ > 1, compresses dark values and expands bright values iii. If γ < 1, expands dark values Compresses bright values
  • 6. 6 Power law curves with fractional values of y map a narrow range of dark input values into a wider range of output values, with the opposite being true for higher values of input gray levels. We may get various curves by varying values of y. Piecewise-Linear Transformations 1. Contrast Stretching  It is the simplest piecewise linear transformation function  The idea behind contrast stretching is to increase the dynamic range of gray levels in the image being processed. a) If r1=s1 and r2=s2, linear transformation b) If r1=r2 & s1=0, s2=L-1, thresholding c) Intermediate values of (r1, s1) and (r2, s2) produce various degrees of spread in the gray value
  • 7. 7 2. Gray-level Slicing Gray level slicing is used to Highlighting a specific range of gray levels in an image. For example when enhancing features such as masses of water in satellite image and enhancing flaws in x- ray images. There are two methods of doing this- (1) One method is to display a high value for all gray level in the range of interest and a low value for all other gray level (2) Second method is to brighten the desired ranges of gray levels but preserve the background and gray level tonalities in the image.
  • 8. 8 3. Bit-plane Slicing  Highlighting the contribution made to total image appearance by specific bits might be desired.  It is useful in image compression. Suppose that each pixel in an image is represented by 8 bits. Imagine that the image is composed of eight 1-bit planes, ranging from bit-plane 0 for the least significant bit to bit plane 7 for the most significant bit. In terms of 8-bit bytes, plane 0 contains all the lowest order bits in the bytes comprising the pixels in the image and plane 7 contains all the high-order bits. Example 1:- find the bit planes of given 3x3 image Solution:
  • 9. 9 Example 2: find the bit planes of given 3x3 image Solution: binary representation of given image Histogram Processing The histogram of a digital image with gray levels in the range [0, L-1] is a discrete function h(rk)=nk Where rk is the kth gray level and nk is the number of pixels in the image having gray level rk. p(rk) is an estimate of the probability of occurrence of intensity level rk in an image.
  • 10. 10 Histogram Equalization Histogram equalization is a technique for enhancing the appearance of images. Let us consider the transformations as, s=T(r), where 0 ≤ r ≤ 1 We assume that the transformation function T(r) satisfies the following conditions: a. T(r) is a monotonically increasing function in the interval 0 ≤ r ≤ L-1: b. 0 ≤ T(r) ≤ L-1 for 0 ≤ r ≤ L-1: Equalization automatically determines a transformation function that seeks to produce an output image that has a uniform histogram. It is a good approach when automatic enhancement is needed Histogram Equalization (Example)
  • 11. 11 Solution: based on above table histogram of input image
  • 12. 12
  • 13. 13 Figure: Processed histogram So, that Input image output image Example:
  • 16. 16
  • 18. 18 Basics of Spatial Filtering  Filter term in “image processing” is referred to the subimage  This sub image is called a filter, mask, kernel, template or window;  The values in the filter sub image are referred to as coefficients rather than pixel. Spatial filtering operations are performed directly on the pixels values of the image  The process consists of moving the filter mask from point to point in the image.  The filter mask may be 3x3 mask or 5x5 mask or to be 7x7 mask. 1. Smoothing Spatial Filters: Smoothing filters are used for blurring and noise reduction in the image.  Blurring is pre-processing steps for removal of small details and Noise Reduction is accomplished by blurring.  Noise reduction can be accomplished blurring with a linear filter and also by non-linear filtering. Types of Smoothing Spatial Filter: There are two way of smoothing special filters 1. Smoothing Linear Filters: 2. Order Statistics Filters:- 1. Smoothing Linear Filter:-  The output of a smoothing liner spatial filter is simply the average of the pixel contained in the neighborhood of the filter mask.  These filters are also called averaging filters or low pass filters.  A major application of smoothing is noise reduction.
  • 19. 19 a) Averaging filter: A spatial averaging filter in which all coefficients are equal is sometimes referred to as a “box filter” Example: b) Weighted averaging filter: A weighted average filter is the one in which pixel are multiplied by different coefficients. Example: . 2. Order Statistics Filter:- Median filter  In this filter the values of the center pixel is replaced by median of gray levels in the neighborhood of that pixel.  Median filters are popular because, provide excellent noise-reduction capabilities, with less blurring than linear smoothing filters.
  • 20. 20  These filters are particularly effective in the case of impulse or salt and pepper noise. Example Max filters This filter is useful for finding the brightest points in an image. Min filters This filter is useful for finding the darkest points in an image. Sharpening Filters: The principal objective of sharpening is to highlight fine details in an image
  • 21. 21