SlideShare a Scribd company logo
SPATIAL DOMAIN FILTERING
SHARPENING FILTERS
CS-467 Digital Image Processing
1
Sharpening
• The principal objective of sharpening is to
highlight transitions in intensity
• While image smoothing can be achieved by
averaging (integration) in a local
neighborhood, which leads to suppression of
high frequencies, image sharpening can be
accomplished by differentiation in a local
neighborhood, which leads to the high and
possibly medium frequencies enhancement
2
Sharpening
• There are two types of sharpening :
• Using high-pass filters – these filters suppress or
eliminate low and medium frequencies, passing
and possibly enhancing high frequencies. This is
resulted in edge detection and edge
enhancement
• Using frequency correcting filters – these filters
enhance high and possibly medium frequencies,
which leads to image sharpening and
distinguishing of the details whose area is about a
half by a half of the filtering window size
3
Frequency Correcting Filters
• Frequency correcting filters enhance high and
possibly medium frequencies, which leads to
visual image sharpening and visual distinguishing
of the details whose area is about a half by a half
of the filtering window size
• It is important to understand that these filters
improve visual perception, but they cannot
restore missing frequencies. Thus, they cannot be
used for image deblurring
• These filters are also called image preparation
filters
4
Unsharp Masking
• Unsharp masking is a classical frequency
corrector
• High frequencies enhancement is utilized through
a filter, which adds the “unsharp mask” to an
image
• The unsharp mask corresponding to the filtering
window is a pixel-wise difference between the
original image and its smoothed (averaged)
version
• Depending on the method of averaging this filter
can be linear or nonlinear
5
Unsharp Masking
• Mask
where is taken from the averaged
version of the image.
• Averaging is applied to a local window
• Filter
• where k is a weight (parameter)
6
( ) ( ) ( ), , ,maskg x y f x y f x y= −
( ),f x y
( ) ( ) ( ), , ,maskg x y f x y k g x y= + ⋅
Unsharp Masking
• Unsharp masking leads to the enhancement of
high frequencies
• It is the most efficient for 3x3 and 5x5 windows
• Averaging can be linear (arithmetic mean over a
filtering window) or nonlinear (median over a
filtering window)
• Unsharp masking enhances image details whose
area is about a half by a half of the filtering
window size
7
Unsharp Masking:
Practical Implementation
• Unsharp masking linear filter
• Filter kernel (mask) for a 3 x 3 window
8
( ) ( ) ( ) ( )( ), , , xyg x y f x y k f x y MEAN S= + −
9 9 9
1
9 9 9
9 9 9
k k k
k k k
k
k k k
 
− − − 
 
 − + − −
 
 
 − − − 
 
Unsharp Masking:
Practical Implementation
• The larger is k, the higher is a level of
sharpening
• k=1  regular unsharp masking
• k>1 highboost filtering
• k<1 slight enhancement of edges
9
( ) ( ) ( ) ( )( ), , , ,g x y f x y k f x y f x y= + −
Unsharp Masking:
Practical Implementation
• Unsharp masking nonlinear filter
10
( ) ( ) ( ) ( )( ), , , xyg x y f x y k f x y MED S= + −
Unsharp Masking:
Global Frequency Correction
• Unsharp masking can also be used to enhance
simultaneously high and medium frequencies.
• This global frequency correction not only leads to
image sharpening, but also can enhance details
whose area is a half by a half of the filtering
window size
• Again, depending on the method of averaging
this filter can be linear or nonlinear
11
( ) ( ) ( ) ( )( ) ( )1 2 3, , , , ,g x y k f x y k f x y f x y k f x y= + − +
Unsharp Masking:
Global Frequency Correction
• Global frequency correction linear
• Filter kernel (mask) for an m x n window
12
( ) ( ) ( ) ( )( ) ( )1 2 3, , , xy xyg x y k f x y k f x y MEAN S k MEAN S= + − +
3 2 3 2 3 2
3 2 3 2 3 2
1 2
3 2 3 2 3 2
... ...
... ... ...
... ...
... ... ...
... ...
k k k k k k
mn mn mn
k k k k k k
k k
mn mn mn
k k k k k k
mn mn mn
− − − 
 
 
 
 − − −
 + +
 
 
 
− − − 
 
 
Unsharp Masking:
Global Frequency Correction
• Global frequency correction - nonlinear
13
( ) ( ) ( ) ( )( ) ( )1 2 3, , , xy xyg x y k f x y k f x y MED S k MED S= + − +
Unsharp Masking:
Global Frequency Correction
• The larger is k2, the higher is a level of
medium frequencies enhancement (the best
choice is )
• are responsible for a level of high
frequencies enhancement, they should be
taken such that
14
( ) ( ) ( ) ( )( ) ( )1 2 3, , , , ,g x y k f x y k f x y f x y k f x y= + − +
23 7k≤ ≤
1 3,k k
1 3 1k k+ =

More Related Content

PPTX
SPATIAL FILTERING IN IMAGE PROCESSING
PPT
Spatial filtering
PPT
Image processing spatialfiltering
PPTX
PPT
Spatial filtering using image processing
PPT
Spatial domain and filtering
PPTX
Filtering an image is to apply a convolution
PPTX
Adaptive unsharp masking
SPATIAL FILTERING IN IMAGE PROCESSING
Spatial filtering
Image processing spatialfiltering
Spatial filtering using image processing
Spatial domain and filtering
Filtering an image is to apply a convolution
Adaptive unsharp masking

What's hot (20)

PPT
Spatial filtering
PPSX
Image Processing: Spatial filters
PPTX
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
PPTX
Image Enhancement in Spatial Domain
PPT
Spatial filtering
PDF
New approach for generalised unsharp masking alogorithm
PPTX
Spatial Filters (Digital Image Processing)
PDF
Lecture 4
PPT
Image enhancement
PPT
06 spatial filtering DIP
PDF
04 image enhancement edge detection
PPTX
2.spatial filtering
PDF
Image Enhancement
PPTX
Smoothing Filters in Spatial Domain
PPTX
Image Enhancement - Point Processing
PPTX
Digital image processing img smoothning
PDF
Lecture 3
PPTX
Homomorphic filtering
PPTX
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
Spatial filtering
Image Processing: Spatial filters
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
Image Enhancement in Spatial Domain
Spatial filtering
New approach for generalised unsharp masking alogorithm
Spatial Filters (Digital Image Processing)
Lecture 4
Image enhancement
06 spatial filtering DIP
04 image enhancement edge detection
2.spatial filtering
Image Enhancement
Smoothing Filters in Spatial Domain
Image Enhancement - Point Processing
Digital image processing img smoothning
Lecture 3
Homomorphic filtering
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
Ad

Similar to Lecture 7 (20)

PDF
A new approach for generalised unsharp masking alogorithm
PPTX
imge enhncement sptil filtering55555.pptx
PPT
3 intensity transformations and spatial filtering slides
PPTX
Image filtering in Digital image processing
PDF
Spatial Domain Filtering.pdf
PDF
Performance and analysis of improved unsharp masking algorithm for image
PDF
PPT s04-machine vision-s2
PDF
An Adaptive Two-level Filtering Technique for Noise Lines in Video Images
PPTX
SPATIAL FILTERING. FOR UNDERGRADUATE .pptx
PPTX
Lec5_AIP [Spatial Filtering] (1).pptxJJJJJJJJJJJJJJJJJJJJJJJ
PDF
A study to improve the quality of image enhancement
PPTX
Image enhancement
PPTX
Lec5_AIP [Spatial Filtering] (1).pptxt767686777
PDF
CSE367 Lecture- image sinal processing lecture
PPTX
Module 31
PPTX
spatial_filtering fundamentals from textbook
PPT
Digital Image Processing UNIT-2.ppt
PPTX
Computer Vision Btech ECE MOD 1-PART 2.pptx
PDF
Digital Image Processing - Image Enhancement
PDF
Digital image processing - Image Enhancement (MATERIAL)
A new approach for generalised unsharp masking alogorithm
imge enhncement sptil filtering55555.pptx
3 intensity transformations and spatial filtering slides
Image filtering in Digital image processing
Spatial Domain Filtering.pdf
Performance and analysis of improved unsharp masking algorithm for image
PPT s04-machine vision-s2
An Adaptive Two-level Filtering Technique for Noise Lines in Video Images
SPATIAL FILTERING. FOR UNDERGRADUATE .pptx
Lec5_AIP [Spatial Filtering] (1).pptxJJJJJJJJJJJJJJJJJJJJJJJ
A study to improve the quality of image enhancement
Image enhancement
Lec5_AIP [Spatial Filtering] (1).pptxt767686777
CSE367 Lecture- image sinal processing lecture
Module 31
spatial_filtering fundamentals from textbook
Digital Image Processing UNIT-2.ppt
Computer Vision Btech ECE MOD 1-PART 2.pptx
Digital Image Processing - Image Enhancement
Digital image processing - Image Enhancement (MATERIAL)
Ad

More from Wael Sharba (20)

PDF
Project 8
PDF
Project 7
PDF
Project 6
PDF
Project 5
PDF
Project 4
PDF
Project 2
PDF
Project 1
PDF
Project 3
PDF
Project 9
PDF
Lecture 14
PDF
Lecture 13
PDF
Lecture 11
PDF
Lecture 12
PDF
Lecture 10
PDF
Lecture 9
PDF
Lecture 8
PDF
Lecture 6
PDF
Lecture 5
PDF
Lecture 2
PDF
Lecture 1
Project 8
Project 7
Project 6
Project 5
Project 4
Project 2
Project 1
Project 3
Project 9
Lecture 14
Lecture 13
Lecture 11
Lecture 12
Lecture 10
Lecture 9
Lecture 8
Lecture 6
Lecture 5
Lecture 2
Lecture 1

Recently uploaded (20)

PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PDF
Empowerment Technology for Senior High School Guide
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
Introduction to Building Materials
PDF
Trump Administration's workforce development strategy
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PPTX
Digestion and Absorption of Carbohydrates, Proteina and Fats
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
1_English_Language_Set_2.pdf probationary
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Empowerment Technology for Senior High School Guide
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Introduction to Building Materials
Trump Administration's workforce development strategy
What if we spent less time fighting change, and more time building what’s rig...
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Digestion and Absorption of Carbohydrates, Proteina and Fats
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
LDMMIA Reiki Yoga Finals Review Spring Summer
A powerpoint presentation on the Revised K-10 Science Shaping Paper
1_English_Language_Set_2.pdf probationary
History, Philosophy and sociology of education (1).pptx
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Unit 4 Skeletal System.ppt.pptxopresentatiom
Orientation - ARALprogram of Deped to the Parents.pptx
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
UNIT III MENTAL HEALTH NURSING ASSESSMENT
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE

Lecture 7

  • 1. SPATIAL DOMAIN FILTERING SHARPENING FILTERS CS-467 Digital Image Processing 1
  • 2. Sharpening • The principal objective of sharpening is to highlight transitions in intensity • While image smoothing can be achieved by averaging (integration) in a local neighborhood, which leads to suppression of high frequencies, image sharpening can be accomplished by differentiation in a local neighborhood, which leads to the high and possibly medium frequencies enhancement 2
  • 3. Sharpening • There are two types of sharpening : • Using high-pass filters – these filters suppress or eliminate low and medium frequencies, passing and possibly enhancing high frequencies. This is resulted in edge detection and edge enhancement • Using frequency correcting filters – these filters enhance high and possibly medium frequencies, which leads to image sharpening and distinguishing of the details whose area is about a half by a half of the filtering window size 3
  • 4. Frequency Correcting Filters • Frequency correcting filters enhance high and possibly medium frequencies, which leads to visual image sharpening and visual distinguishing of the details whose area is about a half by a half of the filtering window size • It is important to understand that these filters improve visual perception, but they cannot restore missing frequencies. Thus, they cannot be used for image deblurring • These filters are also called image preparation filters 4
  • 5. Unsharp Masking • Unsharp masking is a classical frequency corrector • High frequencies enhancement is utilized through a filter, which adds the “unsharp mask” to an image • The unsharp mask corresponding to the filtering window is a pixel-wise difference between the original image and its smoothed (averaged) version • Depending on the method of averaging this filter can be linear or nonlinear 5
  • 6. Unsharp Masking • Mask where is taken from the averaged version of the image. • Averaging is applied to a local window • Filter • where k is a weight (parameter) 6 ( ) ( ) ( ), , ,maskg x y f x y f x y= − ( ),f x y ( ) ( ) ( ), , ,maskg x y f x y k g x y= + ⋅
  • 7. Unsharp Masking • Unsharp masking leads to the enhancement of high frequencies • It is the most efficient for 3x3 and 5x5 windows • Averaging can be linear (arithmetic mean over a filtering window) or nonlinear (median over a filtering window) • Unsharp masking enhances image details whose area is about a half by a half of the filtering window size 7
  • 8. Unsharp Masking: Practical Implementation • Unsharp masking linear filter • Filter kernel (mask) for a 3 x 3 window 8 ( ) ( ) ( ) ( )( ), , , xyg x y f x y k f x y MEAN S= + − 9 9 9 1 9 9 9 9 9 9 k k k k k k k k k k   − − −     − + − −      − − −   
  • 9. Unsharp Masking: Practical Implementation • The larger is k, the higher is a level of sharpening • k=1  regular unsharp masking • k>1 highboost filtering • k<1 slight enhancement of edges 9 ( ) ( ) ( ) ( )( ), , , ,g x y f x y k f x y f x y= + −
  • 10. Unsharp Masking: Practical Implementation • Unsharp masking nonlinear filter 10 ( ) ( ) ( ) ( )( ), , , xyg x y f x y k f x y MED S= + −
  • 11. Unsharp Masking: Global Frequency Correction • Unsharp masking can also be used to enhance simultaneously high and medium frequencies. • This global frequency correction not only leads to image sharpening, but also can enhance details whose area is a half by a half of the filtering window size • Again, depending on the method of averaging this filter can be linear or nonlinear 11 ( ) ( ) ( ) ( )( ) ( )1 2 3, , , , ,g x y k f x y k f x y f x y k f x y= + − +
  • 12. Unsharp Masking: Global Frequency Correction • Global frequency correction linear • Filter kernel (mask) for an m x n window 12 ( ) ( ) ( ) ( )( ) ( )1 2 3, , , xy xyg x y k f x y k f x y MEAN S k MEAN S= + − + 3 2 3 2 3 2 3 2 3 2 3 2 1 2 3 2 3 2 3 2 ... ... ... ... ... ... ... ... ... ... ... ... k k k k k k mn mn mn k k k k k k k k mn mn mn k k k k k k mn mn mn − − −         − − −  + +       − − −     
  • 13. Unsharp Masking: Global Frequency Correction • Global frequency correction - nonlinear 13 ( ) ( ) ( ) ( )( ) ( )1 2 3, , , xy xyg x y k f x y k f x y MED S k MED S= + − +
  • 14. Unsharp Masking: Global Frequency Correction • The larger is k2, the higher is a level of medium frequencies enhancement (the best choice is ) • are responsible for a level of high frequencies enhancement, they should be taken such that 14 ( ) ( ) ( ) ( )( ) ( )1 2 3, , , , ,g x y k f x y k f x y f x y k f x y= + − + 23 7k≤ ≤ 1 3,k k 1 3 1k k+ =