SlideShare a Scribd company logo
1 of 14
Download to read offline
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

What's hot

Spatial filtering
Spatial filteringSpatial filtering
Spatial filteringDeepikaT13
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filtersA B Shinde
 
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...Hemantha Kulathilake
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainDEEPASHRI HK
 
New approach for generalised unsharp masking alogorithm
New approach for generalised unsharp masking alogorithmNew approach for generalised unsharp masking alogorithm
New approach for generalised unsharp masking alogorithmeSAT Publishing House
 
Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)Kalyan Acharjya
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIPbabak danyal
 
04 image enhancement edge detection
04 image enhancement edge detection04 image enhancement edge detection
04 image enhancement edge detectionRumah Belajar
 
Image Enhancement
Image Enhancement Image Enhancement
Image Enhancement Deven Sahu
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainMadhu Bala
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point ProcessingGayathri31093
 
Digital image processing img smoothning
Digital image processing img smoothningDigital image processing img smoothning
Digital image processing img smoothningVinay Gupta
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filteringGautam Saxena
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...Hemantha Kulathilake
 

What's hot (20)

Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
 
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
New approach for generalised unsharp masking alogorithm
New approach for generalised unsharp masking alogorithmNew approach for generalised unsharp masking alogorithm
New approach for generalised unsharp masking alogorithm
 
Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIP
 
04 image enhancement edge detection
04 image enhancement edge detection04 image enhancement edge detection
04 image enhancement edge detection
 
2.spatial filtering
2.spatial filtering2.spatial filtering
2.spatial filtering
 
Image Enhancement
Image Enhancement Image Enhancement
Image Enhancement
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point Processing
 
Digital image processing img smoothning
Digital image processing img smoothningDigital image processing img smoothning
Digital image processing img smoothning
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filtering
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
 

Similar to Lecture 7

Image enhancement
Image enhancementImage enhancement
Image enhancementAyaelshiwi
 
A Presentation on various techniques used in Image Filtering
A Presentation on various techniques used in Image FilteringA Presentation on various techniques used in Image Filtering
A Presentation on various techniques used in Image FilteringPaperkutsBooks
 
Modified adaptive bilateral filter for image contrast enhancement
Modified adaptive bilateral filter for image contrast enhancementModified adaptive bilateral filter for image contrast enhancement
Modified adaptive bilateral filter for image contrast enhancementeSAT Publishing House
 
Spatial Filtering in intro image processingr
Spatial Filtering in intro image processingrSpatial Filtering in intro image processingr
Spatial Filtering in intro image processingrkumarankit06875
 
Machine Project.pptx___''''''""'""_-#(($!_!_!$!$!$(3(($($?$
Machine Project.pptx___''''''""'""_-#(($!_!_!$!$!$(3(($($?$Machine Project.pptx___''''''""'""_-#(($!_!_!$!$!$(3(($($?$
Machine Project.pptx___''''''""'""_-#(($!_!_!$!$!$(3(($($?$sidhantkumarpdt
 
Image enhancement
Image enhancementImage enhancement
Image enhancementjuhi mishra
 
Spatial enhancement
Spatial enhancement Spatial enhancement
Spatial enhancement abinarkt
 
A Novel and Robust Wavelet based Super Resolution Reconstruction of Low Resol...
A Novel and Robust Wavelet based Super Resolution Reconstruction of Low Resol...A Novel and Robust Wavelet based Super Resolution Reconstruction of Low Resol...
A Novel and Robust Wavelet based Super Resolution Reconstruction of Low Resol...CSCJournals
 
Digital image processing - Image Enhancement (MATERIAL)
Digital image processing  - Image Enhancement (MATERIAL)Digital image processing  - Image Enhancement (MATERIAL)
Digital image processing - Image Enhancement (MATERIAL)Mathankumar S
 
Digital Image Processing - Image Enhancement
Digital Image Processing  - Image EnhancementDigital Image Processing  - Image Enhancement
Digital Image Processing - Image EnhancementMathankumar S
 
Open GL T0074 56 sm3
Open GL T0074 56 sm3Open GL T0074 56 sm3
Open GL T0074 56 sm3Roziq Bahtiar
 
12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.pptAJAYMALIK97
 
Accelerated Joint Image Despeckling Algorithm in the Wavelet and Spatial Domains
Accelerated Joint Image Despeckling Algorithm in the Wavelet and Spatial DomainsAccelerated Joint Image Despeckling Algorithm in the Wavelet and Spatial Domains
Accelerated Joint Image Despeckling Algorithm in the Wavelet and Spatial DomainsCSCJournals
 
A new approach for generalised unsharp masking alogorithm
A new approach for generalised unsharp masking alogorithmA new approach for generalised unsharp masking alogorithm
A new approach for generalised unsharp masking alogorithmeSAT Journals
 

Similar to Lecture 7 (20)

Module 31
Module 31Module 31
Module 31
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
A Presentation on various techniques used in Image Filtering
A Presentation on various techniques used in Image FilteringA Presentation on various techniques used in Image Filtering
A Presentation on various techniques used in Image Filtering
 
Modified adaptive bilateral filter for image contrast enhancement
Modified adaptive bilateral filter for image contrast enhancementModified adaptive bilateral filter for image contrast enhancement
Modified adaptive bilateral filter for image contrast enhancement
 
2. filtering basics
2. filtering basics2. filtering basics
2. filtering basics
 
Review (1)
Review (1)Review (1)
Review (1)
 
Spatial Filtering in intro image processingr
Spatial Filtering in intro image processingrSpatial Filtering in intro image processingr
Spatial Filtering in intro image processingr
 
Machine Project.pptx___''''''""'""_-#(($!_!_!$!$!$(3(($($?$
Machine Project.pptx___''''''""'""_-#(($!_!_!$!$!$(3(($($?$Machine Project.pptx___''''''""'""_-#(($!_!_!$!$!$(3(($($?$
Machine Project.pptx___''''''""'""_-#(($!_!_!$!$!$(3(($($?$
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
channel_mzhazbay.pdf
channel_mzhazbay.pdfchannel_mzhazbay.pdf
channel_mzhazbay.pdf
 
Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
 
Spatial enhancement
Spatial enhancement Spatial enhancement
Spatial enhancement
 
A Novel and Robust Wavelet based Super Resolution Reconstruction of Low Resol...
A Novel and Robust Wavelet based Super Resolution Reconstruction of Low Resol...A Novel and Robust Wavelet based Super Resolution Reconstruction of Low Resol...
A Novel and Robust Wavelet based Super Resolution Reconstruction of Low Resol...
 
Digital image processing - Image Enhancement (MATERIAL)
Digital image processing  - Image Enhancement (MATERIAL)Digital image processing  - Image Enhancement (MATERIAL)
Digital image processing - Image Enhancement (MATERIAL)
 
Digital Image Processing - Image Enhancement
Digital Image Processing  - Image EnhancementDigital Image Processing  - Image Enhancement
Digital Image Processing - Image Enhancement
 
Open GL T0074 56 sm3
Open GL T0074 56 sm3Open GL T0074 56 sm3
Open GL T0074 56 sm3
 
12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt
 
Anti aliasing
Anti aliasingAnti aliasing
Anti aliasing
 
Accelerated Joint Image Despeckling Algorithm in the Wavelet and Spatial Domains
Accelerated Joint Image Despeckling Algorithm in the Wavelet and Spatial DomainsAccelerated Joint Image Despeckling Algorithm in the Wavelet and Spatial Domains
Accelerated Joint Image Despeckling Algorithm in the Wavelet and Spatial Domains
 
A new approach for generalised unsharp masking alogorithm
A new approach for generalised unsharp masking alogorithmA new approach for generalised unsharp masking alogorithm
A new approach for generalised unsharp masking alogorithm
 

More from Wael Sharba (20)

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

Recently uploaded

Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxdhanalakshmis0310
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 

Recently uploaded (20)

Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 

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+ =