SlideShare uma empresa Scribd logo
1 de 37
Spatial Filtering : 1
Spatial FilteringSpatial Filtering
Spatial Filtering : 2
Basics of Spatial FilteringBasics of Spatial Filtering
Image enhancement operations can also work with the values of
the image pixels in the neighborhood and the corresponding values
of a subimage that has the same dimensions as the neighborhood.
The subimage is called a filter, mask, kernel, template, or window.
The values in a filter subimage are referred to as coefficients, rather
than pixels.
The process consists simply of moving the filter mask from point to
point in an image.
For linear spatial filtering, the response is given by a sum of
products of the filter coefficients and the corresponding image
pixels in the area spanned by the filter mask
Spatial Filtering : 3
Linear Spatial FilterLinear Spatial Filter
Spatial Filtering : 4
Linear Spatial Filter (Cont.)Linear Spatial Filter (Cont.)
The result (or response), R, of linear filtering with the filter mask at
a point (x, y) in the image is:
In general, linear filtering of an image f of size M X N with a filter
mask of size m X n is given by the expression:
( 1, 1) ( 1, 1) ( 1,0) ( 1, )
(0,0) ( , ) (1,0) ( 1, ) (1,1) ( 1, 1)
R w f x y w f x y
w f x y w f x y w f x y
= − − − − + − − +
+ + + + + + +
L
L
( 1)/2 ( 1)/2
( 1)/2 ( 1)/2
( , ) ( , ) ( , )
m n
s m t n
g x y w s t f x s y t
− −
=− − =− −
= + +∑ ∑
Spatial Filtering : 5
Linear Spatial Filter (Cont.)Linear Spatial Filter (Cont.)
When interest lies on the response, R, of an m X n mask at any
point (x, y), and not on the mechanics of implementing mask
convolution
1 1 2 2
1
mn mn
mn
i i
i
R w z w z w z
w z
=
= + + +
= ∑
L
Spatial Filtering : 6
Linear Spatial Filter (Cont.)Linear Spatial Filter (Cont.)
1 1 2 2 9 9
9
1
i i
i
R w z w z w z
w z
=
= + + +
= ∑
L
Spatial Filtering : 7
Noise reduction by Spatial FilteringNoise reduction by Spatial Filtering
Image averaging takes advantage of information redundancy from
the individual images to reduce noise
Not always possible to acquire so many images!
Alternative option: Take advantage of information redundancy from
different pixels within the same image to reduce noise
Spatial Filtering : 8
Averaging FilterAveraging Filter
Instead of averaging between images, we can average neighboring pixels
9
1
1
9
i
i
R z
=
= ∑
Spatial Filtering : 9
Averaging FilterAveraging Filter
Spatial Filtering : 10
Weighted Average FilterWeighted Average Filter
Problem: Simple averaging of neighboring pixels lead to
over-smoothing
Possible solution: Instead of weighting all neighboring pixels
equally, assign higher weights to pixels that are closer to the
pixel being convolved
Spatial Filtering : 11
Weighted Average FilterWeighted Average Filter
Spatial Filtering : 12
Weighted Averaging Filter:Weighted Averaging Filter:
ExampleExample
Spatial Filtering : 13
Weighted Averaging Filter:Weighted Averaging Filter:
ExampleExample
Spatial Filtering : 14
Order-Statistic FiltersOrder-Statistic Filters
Nonlinear spatial filters
Steps
Order pixels within an area
Replace value of center pixel with value determined by ordering
Best known example: median filters
( ) ( ) ( )H af bg aH f bH g+ ≠ +
Spatial Filtering : 15
Median FilterMedian Filter
Provides good noise reduction for certain types of noise such as
impulse noise
Considerably less blurring than weighted averaging filter
Forces a pixel to be like its neighbors
Steps
Order pixels within an area
Replace value of center pixel with median value (half of all
pixels have intensities greater than or equal to the median
value)
Spatial Filtering : 16
Median Filter: ExampleMedian Filter: Example
Spatial Filtering : 17
Median Filter: ExampleMedian Filter: Example
Spatial Filtering : 18
Spatial Filtering: SharpeningSpatial Filtering: Sharpening
Goal: highlight or enhance details in images
Some applications:
Photo enhancement
Medical image visualization
Industrial defect detection
Spatial Filtering : 19
Sharpening Spatial FilteringSharpening Spatial Filtering
Goal: highlight or enhance details in images
Some applications:
Photo enhancement
Medical image visualization
Industrial defect detection
Basic principle:
Averaging (blurring) is analogous to integration
Therefore, logically, sharpening accomplished by differentiation
Spatial Filtering : 20
Derivatives of digital functionDerivatives of digital function
First-order derivative
Second-order derivative
( 1) ( )
f
f x f x
x
∂
= + −
∂
2
2
( 1) ( 1) 2 ( )
f
f x f x f x
x
∂
= + + − −
∂
Spatial Filtering : 21
Derivatives of digital functionDerivatives of digital function
First-order derivatives generally produce thicker edges
Second-order derivatives have stronger response to fine detail
(e.g., thin lines and points)
First-order derivatives have stronger response to step changes
Second-order derivatives produce double response at step
changes
Spatial Filtering : 22
Derivatives of digital function:Derivatives of digital function:
ExampleExample
Spatial Filtering : 23
Derivatives of digital function:Derivatives of digital function:
ExampleExample
Spatial Filtering : 24
Sharpening using LaplacianSharpening using Laplacian
Second-order derivatives is better suited for most applications for
sharpening
How?
By constructing a filter based on discrete formulation of second-
order derivatives
Simplest isotropic derivative operator: Laplacian
2 2
2
2 2
f f
f
x y
∂ ∂
∇ = +
∂ ∂
Spatial Filtering : 25
How to create Laplacian filterHow to create Laplacian filter
2 2
2
2 2
f f
f
x y
∂ ∂
∇ = +
∂ ∂
2
2
( 1, ) ( 1, ) 2 ( , )
f
f x y f x y f x y
x
∂
= + + − −
∂
2
2
( , 1) ( , 1) 2 ( , )
f
f x y f x y f x y
y
∂
= + + − −
∂
[ ]2
( 1, ) ( 1, ) ( , 1) ( , 1) 4 ( , )f f x y f x y f x y f x y f x y∇ = + + − + + + − −
Spatial Filtering : 26
Laplacian FilterLaplacian Filter
Spatial Filtering : 27
Sharpening using LaplacianSharpening using Laplacian
Problem: While applying Laplacian highlights fine detail, it
de-emphasizes smooth regions (e.g., background features)
Results in featureless background with grayish fine details
Solution: Add original image to recover background
features
2
2
( , ) ( , ), negative filter center
( , )
( , ) ( , ), positive filter center
f x y f x y
g x y
f x y f x y
 −∇
= 
+∇
Spatial Filtering : 28
ExampleExample
Spatial Filtering : 29
Sharpening using Unsharp MaskingSharpening using Unsharp Masking
Subtract blurred version of image from the
image itself to produce sharp image
( , ) ( , ) ( , )g x y f x y f x y= −
Spatial Filtering : 30
ExampleExample
Spatial Filtering : 31
Sharpening using High-boostSharpening using High-boost
FilteringFiltering
Generalization of unsharp masking
As A increases, contribution of sharpening decreases
( , ) ( , ) ( , )g x y Af x y f x y= −
Spatial Filtering : 32
Sharpening using High-boostSharpening using High-boost
FilteringFiltering
Spatial Filtering : 33
Example
Spatial Filtering : 34
First Derivatives for EnhancementFirst Derivatives for Enhancement
Implemented as magnitude of gradient in image processing
f
x
f
f
y
∂ 
 ∂
 ∇ =
∂ 
 ∂ 
1/222
f f
f
x y
  ∂ ∂ 
∇ = +  ÷ ÷
∂ ∂    
Spatial Filtering : 35
ImplementationImplementation
Problem: Expensive to implement directly
Solution: Approximate using absolute values
Can be implemented using two 2x2 filters
Even filters difficult to implement, so 3x3 filters are used for
approximation
9 5 8 6f z z z z∇ ≈ − + −
7 8 9 1 2 3
3 6 9 1 4 7
( 2 ) ( 2 )
( 2 ) ( 2 )
f z z z z z z
z z z z z z
∇ ≈ + + − + +
+ + + − + +
Spatial Filtering : 36
Gradient MasksGradient Masks
Spatial Filtering : 37
Example: Defect DetectionExample: Defect Detection

Mais conteúdo relacionado

Mais procurados

Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processingAnuj Arora
 
Image Restoration
Image RestorationImage Restoration
Image RestorationPoonam Seth
 
Image Restoration And Reconstruction
Image Restoration And ReconstructionImage Restoration And Reconstruction
Image Restoration And ReconstructionAmnaakhaan
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
Chapter 6 color image processing
Chapter 6 color image processingChapter 6 color image processing
Chapter 6 color image processingasodariyabhavesh
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainMadhu Bala
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and SegmentationA B Shinde
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: BasicsA B Shinde
 
Fields of digital image processing slides
Fields of digital image processing slidesFields of digital image processing slides
Fields of digital image processing slidesSrinath Dhayalamoorthy
 
6 spatial filtering p2
6 spatial filtering p26 spatial filtering p2
6 spatial filtering p2Gichelle Amon
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency DomainAmnaakhaan
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsKalyan Acharjya
 

Mais procurados (20)

Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processing
 
SPATIAL FILTER
SPATIAL FILTERSPATIAL FILTER
SPATIAL FILTER
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Unit3 dip
Unit3 dipUnit3 dip
Unit3 dip
 
Image Restoration And Reconstruction
Image Restoration And ReconstructionImage Restoration And Reconstruction
Image Restoration And Reconstruction
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Chapter 6 color image processing
Chapter 6 color image processingChapter 6 color image processing
Chapter 6 color image processing
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: Basics
 
Fields of digital image processing slides
Fields of digital image processing slidesFields of digital image processing slides
Fields of digital image processing slides
 
6 spatial filtering p2
6 spatial filtering p26 spatial filtering p2
6 spatial filtering p2
 
Image compression .
Image compression .Image compression .
Image compression .
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):Basics
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
 
Mathematical tools in dip
Mathematical tools in dipMathematical tools in dip
Mathematical tools in dip
 

Destaque

Pertemuan 3 - Digital Image Processing - Spatial Filtering - Citra Digital
Pertemuan 3 - Digital Image Processing - Spatial Filtering - Citra DigitalPertemuan 3 - Digital Image Processing - Spatial Filtering - Citra Digital
Pertemuan 3 - Digital Image Processing - Spatial Filtering - Citra Digitalahmad haidaroh
 
Pertemuan 1 - Introduction - Citra Digital
Pertemuan 1 - Introduction - Citra DigitalPertemuan 1 - Introduction - Citra Digital
Pertemuan 1 - Introduction - Citra Digitalahmad haidaroh
 
5 spatial filtering p1
5 spatial filtering p15 spatial filtering p1
5 spatial filtering p1Gichelle Amon
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquessakshij91
 
Image enhancement
Image enhancementImage enhancement
Image enhancementAyaelshiwi
 
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
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquesSaideep
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domainAshish Kumar
 

Destaque (10)

Pertemuan 3 - Digital Image Processing - Spatial Filtering - Citra Digital
Pertemuan 3 - Digital Image Processing - Spatial Filtering - Citra DigitalPertemuan 3 - Digital Image Processing - Spatial Filtering - Citra Digital
Pertemuan 3 - Digital Image Processing - Spatial Filtering - Citra Digital
 
Pertemuan 1 - Introduction - Citra Digital
Pertemuan 1 - Introduction - Citra DigitalPertemuan 1 - Introduction - Citra Digital
Pertemuan 1 - Introduction - Citra Digital
 
5 spatial filtering p1
5 spatial filtering p15 spatial filtering p1
5 spatial filtering p1
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
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
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 

Semelhante a 06 spatial filtering DIP

CSE367 Lecture- image sinal processing lecture
CSE367 Lecture- image sinal processing lectureCSE367 Lecture- image sinal processing lecture
CSE367 Lecture- image sinal processing lectureFatmaNewagy1
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processingAbinaya B
 
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
 
Image_filtering (1).pptx
Image_filtering (1).pptxImage_filtering (1).pptx
Image_filtering (1).pptxwdwd10
 
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 slidesBHAGYAPRASADBUGGE
 
Image processing spatialfiltering
Image processing spatialfilteringImage processing spatialfiltering
Image processing spatialfilteringJohn Williams
 
Spatial Domain Filtering.pdf
Spatial Domain Filtering.pdfSpatial Domain Filtering.pdf
Spatial Domain Filtering.pdfswagatkarve
 
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.pdfnagwaAboElenein
 
DIP_Lecture6.pdf. jdowjwdieehekehdjejrejwhehr
DIP_Lecture6.pdf. jdowjwdieehekehdjejrejwhehrDIP_Lecture6.pdf. jdowjwdieehekehdjejrejwhehr
DIP_Lecture6.pdf. jdowjwdieehekehdjejrejwhehrstudyd133
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filteringDeepikaT13
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGmuthu181188
 
13 fourierfiltrationen
13 fourierfiltrationen13 fourierfiltrationen
13 fourierfiltrationenhoailinhtinh
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portionMoe Moe Myint
 
Non-essentiality of Correlation between Image and Depth Map in Free Viewpoin...
Non-essentiality of Correlation between Image and Depth Map in Free Viewpoin...Non-essentiality of Correlation between Image and Depth Map in Free Viewpoin...
Non-essentiality of Correlation between Image and Depth Map in Free Viewpoin...Norishige Fukushima
 

Semelhante a 06 spatial filtering DIP (20)

CSE367 Lecture- image sinal processing lecture
CSE367 Lecture- image sinal processing lectureCSE367 Lecture- image sinal processing lecture
CSE367 Lecture- image sinal processing lecture
 
4 image enhancement in spatial domain
4 image enhancement in spatial domain4 image enhancement in spatial domain
4 image enhancement in spatial domain
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processing
 
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
 
Image_filtering (1).pptx
Image_filtering (1).pptxImage_filtering (1).pptx
Image_filtering (1).pptx
 
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
 
Image processing spatialfiltering
Image processing spatialfilteringImage processing spatialfiltering
Image processing spatialfiltering
 
Spatial Domain Filtering.pdf
Spatial Domain Filtering.pdfSpatial Domain Filtering.pdf
Spatial Domain Filtering.pdf
 
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
 
DIP_Lecture6.pdf. jdowjwdieehekehdjejrejwhehr
DIP_Lecture6.pdf. jdowjwdieehekehdjejrejwhehrDIP_Lecture6.pdf. jdowjwdieehekehdjejrejwhehr
DIP_Lecture6.pdf. jdowjwdieehekehdjejrejwhehr
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSING
 
13 fourierfiltrationen
13 fourierfiltrationen13 fourierfiltrationen
13 fourierfiltrationen
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
M.sc. m hassan
M.sc. m hassanM.sc. m hassan
M.sc. m hassan
 
Non-essentiality of Correlation between Image and Depth Map in Free Viewpoin...
Non-essentiality of Correlation between Image and Depth Map in Free Viewpoin...Non-essentiality of Correlation between Image and Depth Map in Free Viewpoin...
Non-essentiality of Correlation between Image and Depth Map in Free Viewpoin...
 
Ppt ---image processing
Ppt ---image processingPpt ---image processing
Ppt ---image processing
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
 

Mais de babak danyal

Easy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client SocketsEasy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client Socketsbabak danyal
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streamsbabak danyal
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Javababak danyal
 
block ciphers and the des
block ciphers and the desblock ciphers and the des
block ciphers and the desbabak danyal
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network securitybabak danyal
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systemsbabak danyal
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systemsbabak danyal
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systemsbabak danyal
 
Lecture6 Signal and Systems
Lecture6 Signal and SystemsLecture6 Signal and Systems
Lecture6 Signal and Systemsbabak danyal
 
Lecture5 Signal and Systems
Lecture5 Signal and SystemsLecture5 Signal and Systems
Lecture5 Signal and Systemsbabak danyal
 
Lecture4 Signal and Systems
Lecture4  Signal and SystemsLecture4  Signal and Systems
Lecture4 Signal and Systemsbabak danyal
 
Lecture3 Signal and Systems
Lecture3 Signal and SystemsLecture3 Signal and Systems
Lecture3 Signal and Systemsbabak danyal
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systemsbabak danyal
 
Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signababak danyal
 
Lecture9 Signal and Systems
Lecture9 Signal and SystemsLecture9 Signal and Systems
Lecture9 Signal and Systemsbabak danyal
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniquesbabak danyal
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Securitybabak danyal
 

Mais de babak danyal (20)

applist
applistapplist
applist
 
Easy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client SocketsEasy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client Sockets
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streams
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Java
 
Tcp sockets
Tcp socketsTcp sockets
Tcp sockets
 
block ciphers and the des
block ciphers and the desblock ciphers and the des
block ciphers and the des
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network security
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systems
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systems
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systems
 
Lecture6 Signal and Systems
Lecture6 Signal and SystemsLecture6 Signal and Systems
Lecture6 Signal and Systems
 
Lecture5 Signal and Systems
Lecture5 Signal and SystemsLecture5 Signal and Systems
Lecture5 Signal and Systems
 
Lecture4 Signal and Systems
Lecture4  Signal and SystemsLecture4  Signal and Systems
Lecture4 Signal and Systems
 
Lecture3 Signal and Systems
Lecture3 Signal and SystemsLecture3 Signal and Systems
Lecture3 Signal and Systems
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systems
 
Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signa
 
Lecture9 Signal and Systems
Lecture9 Signal and SystemsLecture9 Signal and Systems
Lecture9 Signal and Systems
 
Lecture9
Lecture9Lecture9
Lecture9
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniques
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Security
 

Último

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
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
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
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
 
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
 
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
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 

Último (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
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.
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
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
 
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
 
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
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 

06 spatial filtering DIP

  • 1. Spatial Filtering : 1 Spatial FilteringSpatial Filtering
  • 2. Spatial Filtering : 2 Basics of Spatial FilteringBasics of Spatial Filtering Image enhancement operations can also work with the values of the image pixels in the neighborhood and the corresponding values of a subimage that has the same dimensions as the neighborhood. The subimage is called a filter, mask, kernel, template, or window. The values in a filter subimage are referred to as coefficients, rather than pixels. The process consists simply of moving the filter mask from point to point in an image. For linear spatial filtering, the response is given by a sum of products of the filter coefficients and the corresponding image pixels in the area spanned by the filter mask
  • 3. Spatial Filtering : 3 Linear Spatial FilterLinear Spatial Filter
  • 4. Spatial Filtering : 4 Linear Spatial Filter (Cont.)Linear Spatial Filter (Cont.) The result (or response), R, of linear filtering with the filter mask at a point (x, y) in the image is: In general, linear filtering of an image f of size M X N with a filter mask of size m X n is given by the expression: ( 1, 1) ( 1, 1) ( 1,0) ( 1, ) (0,0) ( , ) (1,0) ( 1, ) (1,1) ( 1, 1) R w f x y w f x y w f x y w f x y w f x y = − − − − + − − + + + + + + + + L L ( 1)/2 ( 1)/2 ( 1)/2 ( 1)/2 ( , ) ( , ) ( , ) m n s m t n g x y w s t f x s y t − − =− − =− − = + +∑ ∑
  • 5. Spatial Filtering : 5 Linear Spatial Filter (Cont.)Linear Spatial Filter (Cont.) When interest lies on the response, R, of an m X n mask at any point (x, y), and not on the mechanics of implementing mask convolution 1 1 2 2 1 mn mn mn i i i R w z w z w z w z = = + + + = ∑ L
  • 6. Spatial Filtering : 6 Linear Spatial Filter (Cont.)Linear Spatial Filter (Cont.) 1 1 2 2 9 9 9 1 i i i R w z w z w z w z = = + + + = ∑ L
  • 7. Spatial Filtering : 7 Noise reduction by Spatial FilteringNoise reduction by Spatial Filtering Image averaging takes advantage of information redundancy from the individual images to reduce noise Not always possible to acquire so many images! Alternative option: Take advantage of information redundancy from different pixels within the same image to reduce noise
  • 8. Spatial Filtering : 8 Averaging FilterAveraging Filter Instead of averaging between images, we can average neighboring pixels 9 1 1 9 i i R z = = ∑
  • 9. Spatial Filtering : 9 Averaging FilterAveraging Filter
  • 10. Spatial Filtering : 10 Weighted Average FilterWeighted Average Filter Problem: Simple averaging of neighboring pixels lead to over-smoothing Possible solution: Instead of weighting all neighboring pixels equally, assign higher weights to pixels that are closer to the pixel being convolved
  • 11. Spatial Filtering : 11 Weighted Average FilterWeighted Average Filter
  • 12. Spatial Filtering : 12 Weighted Averaging Filter:Weighted Averaging Filter: ExampleExample
  • 13. Spatial Filtering : 13 Weighted Averaging Filter:Weighted Averaging Filter: ExampleExample
  • 14. Spatial Filtering : 14 Order-Statistic FiltersOrder-Statistic Filters Nonlinear spatial filters Steps Order pixels within an area Replace value of center pixel with value determined by ordering Best known example: median filters ( ) ( ) ( )H af bg aH f bH g+ ≠ +
  • 15. Spatial Filtering : 15 Median FilterMedian Filter Provides good noise reduction for certain types of noise such as impulse noise Considerably less blurring than weighted averaging filter Forces a pixel to be like its neighbors Steps Order pixels within an area Replace value of center pixel with median value (half of all pixels have intensities greater than or equal to the median value)
  • 16. Spatial Filtering : 16 Median Filter: ExampleMedian Filter: Example
  • 17. Spatial Filtering : 17 Median Filter: ExampleMedian Filter: Example
  • 18. Spatial Filtering : 18 Spatial Filtering: SharpeningSpatial Filtering: Sharpening Goal: highlight or enhance details in images Some applications: Photo enhancement Medical image visualization Industrial defect detection
  • 19. Spatial Filtering : 19 Sharpening Spatial FilteringSharpening Spatial Filtering Goal: highlight or enhance details in images Some applications: Photo enhancement Medical image visualization Industrial defect detection Basic principle: Averaging (blurring) is analogous to integration Therefore, logically, sharpening accomplished by differentiation
  • 20. Spatial Filtering : 20 Derivatives of digital functionDerivatives of digital function First-order derivative Second-order derivative ( 1) ( ) f f x f x x ∂ = + − ∂ 2 2 ( 1) ( 1) 2 ( ) f f x f x f x x ∂ = + + − − ∂
  • 21. Spatial Filtering : 21 Derivatives of digital functionDerivatives of digital function First-order derivatives generally produce thicker edges Second-order derivatives have stronger response to fine detail (e.g., thin lines and points) First-order derivatives have stronger response to step changes Second-order derivatives produce double response at step changes
  • 22. Spatial Filtering : 22 Derivatives of digital function:Derivatives of digital function: ExampleExample
  • 23. Spatial Filtering : 23 Derivatives of digital function:Derivatives of digital function: ExampleExample
  • 24. Spatial Filtering : 24 Sharpening using LaplacianSharpening using Laplacian Second-order derivatives is better suited for most applications for sharpening How? By constructing a filter based on discrete formulation of second- order derivatives Simplest isotropic derivative operator: Laplacian 2 2 2 2 2 f f f x y ∂ ∂ ∇ = + ∂ ∂
  • 25. Spatial Filtering : 25 How to create Laplacian filterHow to create Laplacian filter 2 2 2 2 2 f f f x y ∂ ∂ ∇ = + ∂ ∂ 2 2 ( 1, ) ( 1, ) 2 ( , ) f f x y f x y f x y x ∂ = + + − − ∂ 2 2 ( , 1) ( , 1) 2 ( , ) f f x y f x y f x y y ∂ = + + − − ∂ [ ]2 ( 1, ) ( 1, ) ( , 1) ( , 1) 4 ( , )f f x y f x y f x y f x y f x y∇ = + + − + + + − −
  • 26. Spatial Filtering : 26 Laplacian FilterLaplacian Filter
  • 27. Spatial Filtering : 27 Sharpening using LaplacianSharpening using Laplacian Problem: While applying Laplacian highlights fine detail, it de-emphasizes smooth regions (e.g., background features) Results in featureless background with grayish fine details Solution: Add original image to recover background features 2 2 ( , ) ( , ), negative filter center ( , ) ( , ) ( , ), positive filter center f x y f x y g x y f x y f x y  −∇ =  +∇
  • 28. Spatial Filtering : 28 ExampleExample
  • 29. Spatial Filtering : 29 Sharpening using Unsharp MaskingSharpening using Unsharp Masking Subtract blurred version of image from the image itself to produce sharp image ( , ) ( , ) ( , )g x y f x y f x y= −
  • 30. Spatial Filtering : 30 ExampleExample
  • 31. Spatial Filtering : 31 Sharpening using High-boostSharpening using High-boost FilteringFiltering Generalization of unsharp masking As A increases, contribution of sharpening decreases ( , ) ( , ) ( , )g x y Af x y f x y= −
  • 32. Spatial Filtering : 32 Sharpening using High-boostSharpening using High-boost FilteringFiltering
  • 33. Spatial Filtering : 33 Example
  • 34. Spatial Filtering : 34 First Derivatives for EnhancementFirst Derivatives for Enhancement Implemented as magnitude of gradient in image processing f x f f y ∂   ∂  ∇ = ∂   ∂  1/222 f f f x y   ∂ ∂  ∇ = +  ÷ ÷ ∂ ∂    
  • 35. Spatial Filtering : 35 ImplementationImplementation Problem: Expensive to implement directly Solution: Approximate using absolute values Can be implemented using two 2x2 filters Even filters difficult to implement, so 3x3 filters are used for approximation 9 5 8 6f z z z z∇ ≈ − + − 7 8 9 1 2 3 3 6 9 1 4 7 ( 2 ) ( 2 ) ( 2 ) ( 2 ) f z z z z z z z z z z z z ∇ ≈ + + − + + + + + − + +
  • 36. Spatial Filtering : 36 Gradient MasksGradient Masks
  • 37. Spatial Filtering : 37 Example: Defect DetectionExample: Defect Detection