SlideShare a Scribd company logo
1 of 10
Download to read offline
Kernels in Convolution
By
Revanth Kumar
November 22, 2020
November 22, 2020 1 / 10
Overview
Introduction
Types of kernels
Definition
Convolution filters
Gaussian Kernel
Calculating Gaussian Convolution Kernels
November 22, 2020 2 / 10
Introduction
Convolutions are mathematical operations between two functions
that create a third function. In image processing, it happens by
going through each pixel to perform a calculation with the pixel and
its neighbours.
In Convolutional neural network, the kernel is nothing but a filter
that is used to extract the features from the images.
A convolution lets you do many things, like calculate derivatives,
detect edges, apply blurs, etc. A very wide variety of things. And all
of this is done with a ”convolution kernel”.
The kernels will define the size of the convolution, the weights
applied to it, and an anchor point usually positioned at the center.
November 22, 2020 3 / 10
Types of kernels
Gaussian
K(u) =
1
√
2π
e− 1
2
u2
Logistic
K(u) =
1
eu + 2 + e−u
Sigmoid function
K(u) =
2
π
1
eu + e−u
November 22, 2020 4 / 10
Definition
A kernel is a non-negative real-valued integrable function K. For
most applications, it is desirable to define the function to satisfy two
additional requirements:
1. Normalization: ∞
−∞
K(u)du = 1
2. Symmetry: K(−u) = K(u) for all values of u .
November 22, 2020 5 / 10
Convolution filters
An image can be seen as a matrix I, where I(x, y) is the brightness
of the pixel located at coordinates (x, y).
A convolution product is computed between the matrix I and a
kernel matrix K which represents the type of filter.
K can be of size 3 × 3 or 5 × 5. The result of this product will be
the new brightness of the pixel (x, y).
I∗K =




I(1, 1) I(1, 2) ... I(1, n)
. . .
. . .
I(m, 1) I(m, 2) ... I(m, n)



∗


K(1, 1) K(1, 2) K(1.3)
K(2, 1) K(2, 2) K(2, 3)
K(3, 1) K(3, 2) K(3, 3)


Where
I ∗ Kx ,y =
1
i=−1
1
j=−1
I(x + i, y + j) ∗ K(i, j)
November 22, 2020 6 / 10
Gaussian Kernel
In image processing filters are mainly used to suppress either the
high frequencies in the image, i.e. smoothing the image, or the low
frequencies, i.e. enhancing or detecting edges in the image.
An image can be filtered either in the frequency or in the spatial
domain.
The corresponding process in the spatial domain is to convolve the
input image f(i,j) with the filter function h(i,j). This can be written
as:
g(i, j) = h(i, j) f (i, j)
The discrete convolution can be defined as a ‘shift and multiply’
operation, where we shift the kernel over the image and multiply its
value with the corresponding pixel values of the image. For a square
kernel with size M× M, we can calculate the output image with the
following formula:
November 22, 2020 7 / 10
Calculating Gaussian Convolution Kernels
The Gaussian filter uses the Gaussian function in the kernel of the
filter:
G(x, y) =
1
2πσ2
e− x2
+ y2
2σ2
This filter is a weighted filter which gives more importance to the
central pixels. The parameter σ controls the weight given to the
center.
where,
G(x,y) =The variables referenced as x and y relate to pixel
coordinates within an image.
e = represents the value of Euler’s number has been defined as a
mathematical constant equating to 2.718.
σ = represents a threshold or factor value, as specified by the user.
November 22, 2020 8 / 10
Continue...
When calculating the kernel elements, the coordinate values
expressed by x and y should reflect the distance in pixels from the
middle pixel.
In order to gain a better grasp on the Gaussian kernel formula we
can implement the formula in steps.
If we were to create a 3×3 kernel and specified a weighting value of
5.5 our calculations can start off as indicated by the following
illustration:



1
2π(5.5)2 e− 12
+12
2(5.5)2
1
2π(5.5)2 e− 02
+12
2(5.5)2
1
2π(5.5)2 e− 12
+12
2(5.5)2
1
2π(5.5)2 e− 12
+02
2(5.5)2
1
2π(5.5)2 e− 02
+02
2(5.5)2
1
2π(5.5)2 e− 12
+02
2(5.5)2
1
2π(5.5)2 e− 12
+12
2(5.5)2
1
2π(5.5)2 e− 02
+12
2(5.5)2
1
2π(5.5)2 e− 12
+12
2(5.5)2



November 22, 2020 9 / 10
Continue...
The calculated values of each kernel element:


0.00509 0.00517 0.0521
0.00517 0.00526 0.00517
0.00509 0.00517 0.00509


An important requirement to take note of at this point being that
the sum total of all the elements contained as part of a
kernel/matrix must equate to one.
At this point the sum total of the kernel equates to .046322.
The kernel values should be updated by multiplying each element by
one divided by the current kernel sum.
k =


0.1098 0.1117 0.1098
0.1117 0.1135 0.1117
0.1098 0.1117 0.1098


Now, successfully calculated a 3×3 Gaussian Blur kernel matrix
which implements a weight value of 5.5.
November 22, 2020 10 / 10

More Related Content

What's hot

Thesis on Image compression by Manish Myst
Thesis on Image compression by Manish MystThesis on Image compression by Manish Myst
Thesis on Image compression by Manish MystManish Myst
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRUananth
 
Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainMostafa G. M. Mostafa
 
Performance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorialPerformance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorialBilkent University
 
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018Universitat Politècnica de Catalunya
 
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural NetworksPR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural NetworksJinwon Lee
 
Deep Learning - RNN and CNN
Deep Learning - RNN and CNNDeep Learning - RNN and CNN
Deep Learning - RNN and CNNPradnya Saval
 
Image Segmentation Using Deep Learning : A survey
Image Segmentation Using Deep Learning : A surveyImage Segmentation Using Deep Learning : A survey
Image Segmentation Using Deep Learning : A surveyNUPUR YADAV
 
Introduction to Neural networks (under graduate course) Lecture 7 of 9
Introduction to Neural networks (under graduate course) Lecture 7 of 9Introduction to Neural networks (under graduate course) Lecture 7 of 9
Introduction to Neural networks (under graduate course) Lecture 7 of 9Randa Elanwar
 
Bayes Classification
Bayes ClassificationBayes Classification
Bayes Classificationsathish sak
 
PR-214: FlowNet: Learning Optical Flow with Convolutional Networks
PR-214: FlowNet: Learning Optical Flow with Convolutional NetworksPR-214: FlowNet: Learning Optical Flow with Convolutional Networks
PR-214: FlowNet: Learning Optical Flow with Convolutional NetworksHyeongmin Lee
 
The world of loss function
The world of loss functionThe world of loss function
The world of loss function홍배 김
 
Towards Dropout Training for Convolutional Neural Networks
Towards Dropout Training for Convolutional Neural Networks Towards Dropout Training for Convolutional Neural Networks
Towards Dropout Training for Convolutional Neural Networks Mah Sa
 
CNN Machine learning DeepLearning
CNN Machine learning DeepLearningCNN Machine learning DeepLearning
CNN Machine learning DeepLearningAbhishek Sharma
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsKalyan Acharjya
 
You only look once (YOLO) : unified real time object detection
You only look once (YOLO) : unified real time object detectionYou only look once (YOLO) : unified real time object detection
You only look once (YOLO) : unified real time object detectionEntrepreneur / Startup
 

What's hot (20)

U-Net (1).pptx
U-Net (1).pptxU-Net (1).pptx
U-Net (1).pptx
 
Thesis on Image compression by Manish Myst
Thesis on Image compression by Manish MystThesis on Image compression by Manish Myst
Thesis on Image compression by Manish Myst
 
Recurrent neural network
Recurrent neural networkRecurrent neural network
Recurrent neural network
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRU
 
Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial Domain
 
Performance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorialPerformance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorial
 
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
 
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural NetworksPR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
PR-169: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
 
Deep Learning - RNN and CNN
Deep Learning - RNN and CNNDeep Learning - RNN and CNN
Deep Learning - RNN and CNN
 
Image Segmentation Using Deep Learning : A survey
Image Segmentation Using Deep Learning : A surveyImage Segmentation Using Deep Learning : A survey
Image Segmentation Using Deep Learning : A survey
 
Opencv
OpencvOpencv
Opencv
 
Introduction to Neural networks (under graduate course) Lecture 7 of 9
Introduction to Neural networks (under graduate course) Lecture 7 of 9Introduction to Neural networks (under graduate course) Lecture 7 of 9
Introduction to Neural networks (under graduate course) Lecture 7 of 9
 
Bayes Classification
Bayes ClassificationBayes Classification
Bayes Classification
 
PR-214: FlowNet: Learning Optical Flow with Convolutional Networks
PR-214: FlowNet: Learning Optical Flow with Convolutional NetworksPR-214: FlowNet: Learning Optical Flow with Convolutional Networks
PR-214: FlowNet: Learning Optical Flow with Convolutional Networks
 
04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks
 
The world of loss function
The world of loss functionThe world of loss function
The world of loss function
 
Towards Dropout Training for Convolutional Neural Networks
Towards Dropout Training for Convolutional Neural Networks Towards Dropout Training for Convolutional Neural Networks
Towards Dropout Training for Convolutional Neural Networks
 
CNN Machine learning DeepLearning
CNN Machine learning DeepLearningCNN Machine learning DeepLearning
CNN Machine learning DeepLearning
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):Basics
 
You only look once (YOLO) : unified real time object detection
You only look once (YOLO) : unified real time object detectionYou only look once (YOLO) : unified real time object detection
You only look once (YOLO) : unified real time object detection
 

Similar to Kernels in convolution

Math behind the kernels
Math behind the kernelsMath behind the kernels
Math behind the kernelsRevanth Kumar
 
Fuzzy c means_realestate_application
Fuzzy c means_realestate_applicationFuzzy c means_realestate_application
Fuzzy c means_realestate_applicationCemal Ardil
 
Optimal nonlocal means algorithm for denoising ultrasound image
Optimal nonlocal means algorithm for denoising ultrasound imageOptimal nonlocal means algorithm for denoising ultrasound image
Optimal nonlocal means algorithm for denoising ultrasound imageAlexander Decker
 
11.optimal nonlocal means algorithm for denoising ultrasound image
11.optimal nonlocal means algorithm for denoising ultrasound image11.optimal nonlocal means algorithm for denoising ultrasound image
11.optimal nonlocal means algorithm for denoising ultrasound imageAlexander Decker
 
03 image transformations_i
03 image transformations_i03 image transformations_i
03 image transformations_iankit_ppt
 
Qcce quality constrained co saliency estimation for common object detection
Qcce quality constrained co saliency estimation for common object detectionQcce quality constrained co saliency estimation for common object detection
Qcce quality constrained co saliency estimation for common object detectionKoteswar Rao Jerripothula
 
chAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligencechAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligenceshesnasuneer
 
computervision1.pptx its about computer vision
computervision1.pptx its about computer visioncomputervision1.pptx its about computer vision
computervision1.pptx its about computer visionshesnasuneer
 
Efficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixelsEfficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixelsIOSR Journals
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processingMohammed Kamel
 
K-means Clustering Algorithm with Matlab Source code
K-means Clustering Algorithm with Matlab Source codeK-means Clustering Algorithm with Matlab Source code
K-means Clustering Algorithm with Matlab Source codegokulprasath06
 
GREY LEVEL CO-OCCURRENCE MATRICES: GENERALISATION AND SOME NEW FEATURES
GREY LEVEL CO-OCCURRENCE MATRICES: GENERALISATION AND SOME NEW FEATURESGREY LEVEL CO-OCCURRENCE MATRICES: GENERALISATION AND SOME NEW FEATURES
GREY LEVEL CO-OCCURRENCE MATRICES: GENERALISATION AND SOME NEW FEATURESijcseit
 
Fuzzy Entropy Based Optimal Thresholding Technique for Image Enhancement
Fuzzy Entropy Based Optimal Thresholding Technique for Image Enhancement  Fuzzy Entropy Based Optimal Thresholding Technique for Image Enhancement
Fuzzy Entropy Based Optimal Thresholding Technique for Image Enhancement ijsc
 
Cj31365368
Cj31365368Cj31365368
Cj31365368IJMER
 
Image Texture Analysis
Image Texture AnalysisImage Texture Analysis
Image Texture Analysislalitxp
 
Object Shape Representation by Kernel Density Feature Points Estimator
Object Shape Representation by Kernel Density Feature Points Estimator Object Shape Representation by Kernel Density Feature Points Estimator
Object Shape Representation by Kernel Density Feature Points Estimator cscpconf
 
Neighbour Local Variability for Multi-Focus Images Fusion
Neighbour Local Variability for Multi-Focus Images FusionNeighbour Local Variability for Multi-Focus Images Fusion
Neighbour Local Variability for Multi-Focus Images Fusionsipij
 
NEIGHBOUR LOCAL VARIABILITY FOR MULTIFOCUS IMAGES FUSION
NEIGHBOUR LOCAL VARIABILITY FOR MULTIFOCUS IMAGES FUSIONNEIGHBOUR LOCAL VARIABILITY FOR MULTIFOCUS IMAGES FUSION
NEIGHBOUR LOCAL VARIABILITY FOR MULTIFOCUS IMAGES FUSIONsipij
 

Similar to Kernels in convolution (20)

Math behind the kernels
Math behind the kernelsMath behind the kernels
Math behind the kernels
 
Fuzzy c means_realestate_application
Fuzzy c means_realestate_applicationFuzzy c means_realestate_application
Fuzzy c means_realestate_application
 
Optimal nonlocal means algorithm for denoising ultrasound image
Optimal nonlocal means algorithm for denoising ultrasound imageOptimal nonlocal means algorithm for denoising ultrasound image
Optimal nonlocal means algorithm for denoising ultrasound image
 
11.optimal nonlocal means algorithm for denoising ultrasound image
11.optimal nonlocal means algorithm for denoising ultrasound image11.optimal nonlocal means algorithm for denoising ultrasound image
11.optimal nonlocal means algorithm for denoising ultrasound image
 
03 image transformations_i
03 image transformations_i03 image transformations_i
03 image transformations_i
 
Qcce quality constrained co saliency estimation for common object detection
Qcce quality constrained co saliency estimation for common object detectionQcce quality constrained co saliency estimation for common object detection
Qcce quality constrained co saliency estimation for common object detection
 
chAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligencechAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligence
 
computervision1.pptx its about computer vision
computervision1.pptx its about computer visioncomputervision1.pptx its about computer vision
computervision1.pptx its about computer vision
 
GRUPO 2 : convolution separable
GRUPO 2 :  convolution separableGRUPO 2 :  convolution separable
GRUPO 2 : convolution separable
 
Efficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixelsEfficient Technique for Image Stenography Based on coordinates of pixels
Efficient Technique for Image Stenography Based on coordinates of pixels
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processing
 
K-means Clustering Algorithm with Matlab Source code
K-means Clustering Algorithm with Matlab Source codeK-means Clustering Algorithm with Matlab Source code
K-means Clustering Algorithm with Matlab Source code
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
GREY LEVEL CO-OCCURRENCE MATRICES: GENERALISATION AND SOME NEW FEATURES
GREY LEVEL CO-OCCURRENCE MATRICES: GENERALISATION AND SOME NEW FEATURESGREY LEVEL CO-OCCURRENCE MATRICES: GENERALISATION AND SOME NEW FEATURES
GREY LEVEL CO-OCCURRENCE MATRICES: GENERALISATION AND SOME NEW FEATURES
 
Fuzzy Entropy Based Optimal Thresholding Technique for Image Enhancement
Fuzzy Entropy Based Optimal Thresholding Technique for Image Enhancement  Fuzzy Entropy Based Optimal Thresholding Technique for Image Enhancement
Fuzzy Entropy Based Optimal Thresholding Technique for Image Enhancement
 
Cj31365368
Cj31365368Cj31365368
Cj31365368
 
Image Texture Analysis
Image Texture AnalysisImage Texture Analysis
Image Texture Analysis
 
Object Shape Representation by Kernel Density Feature Points Estimator
Object Shape Representation by Kernel Density Feature Points Estimator Object Shape Representation by Kernel Density Feature Points Estimator
Object Shape Representation by Kernel Density Feature Points Estimator
 
Neighbour Local Variability for Multi-Focus Images Fusion
Neighbour Local Variability for Multi-Focus Images FusionNeighbour Local Variability for Multi-Focus Images Fusion
Neighbour Local Variability for Multi-Focus Images Fusion
 
NEIGHBOUR LOCAL VARIABILITY FOR MULTIFOCUS IMAGES FUSION
NEIGHBOUR LOCAL VARIABILITY FOR MULTIFOCUS IMAGES FUSIONNEIGHBOUR LOCAL VARIABILITY FOR MULTIFOCUS IMAGES FUSION
NEIGHBOUR LOCAL VARIABILITY FOR MULTIFOCUS IMAGES FUSION
 

More from Revanth Kumar

APPLIED MACHINE LEARNING
APPLIED MACHINE LEARNINGAPPLIED MACHINE LEARNING
APPLIED MACHINE LEARNINGRevanth Kumar
 
Deep learning algorithms
Deep learning algorithmsDeep learning algorithms
Deep learning algorithmsRevanth Kumar
 
Back propagation using sigmoid & ReLU function
Back propagation using sigmoid & ReLU functionBack propagation using sigmoid & ReLU function
Back propagation using sigmoid & ReLU functionRevanth Kumar
 
Linear regression, costs & gradient descent
Linear regression, costs & gradient descentLinear regression, costs & gradient descent
Linear regression, costs & gradient descentRevanth Kumar
 
Deep neural networks & computational graphs
Deep neural networks & computational graphsDeep neural networks & computational graphs
Deep neural networks & computational graphsRevanth Kumar
 

More from Revanth Kumar (7)

APPLIED MACHINE LEARNING
APPLIED MACHINE LEARNINGAPPLIED MACHINE LEARNING
APPLIED MACHINE LEARNING
 
Deep learning algorithms
Deep learning algorithmsDeep learning algorithms
Deep learning algorithms
 
Back propagation using sigmoid & ReLU function
Back propagation using sigmoid & ReLU functionBack propagation using sigmoid & ReLU function
Back propagation using sigmoid & ReLU function
 
Linear regression, costs & gradient descent
Linear regression, costs & gradient descentLinear regression, costs & gradient descent
Linear regression, costs & gradient descent
 
Deep neural networks & computational graphs
Deep neural networks & computational graphsDeep neural networks & computational graphs
Deep neural networks & computational graphs
 
Self driving car
Self driving carSelf driving car
Self driving car
 
Tomography System
Tomography SystemTomography System
Tomography System
 

Recently uploaded

Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 

Kernels in convolution

  • 1. Kernels in Convolution By Revanth Kumar November 22, 2020 November 22, 2020 1 / 10
  • 2. Overview Introduction Types of kernels Definition Convolution filters Gaussian Kernel Calculating Gaussian Convolution Kernels November 22, 2020 2 / 10
  • 3. Introduction Convolutions are mathematical operations between two functions that create a third function. In image processing, it happens by going through each pixel to perform a calculation with the pixel and its neighbours. In Convolutional neural network, the kernel is nothing but a filter that is used to extract the features from the images. A convolution lets you do many things, like calculate derivatives, detect edges, apply blurs, etc. A very wide variety of things. And all of this is done with a ”convolution kernel”. The kernels will define the size of the convolution, the weights applied to it, and an anchor point usually positioned at the center. November 22, 2020 3 / 10
  • 4. Types of kernels Gaussian K(u) = 1 √ 2π e− 1 2 u2 Logistic K(u) = 1 eu + 2 + e−u Sigmoid function K(u) = 2 π 1 eu + e−u November 22, 2020 4 / 10
  • 5. Definition A kernel is a non-negative real-valued integrable function K. For most applications, it is desirable to define the function to satisfy two additional requirements: 1. Normalization: ∞ −∞ K(u)du = 1 2. Symmetry: K(−u) = K(u) for all values of u . November 22, 2020 5 / 10
  • 6. Convolution filters An image can be seen as a matrix I, where I(x, y) is the brightness of the pixel located at coordinates (x, y). A convolution product is computed between the matrix I and a kernel matrix K which represents the type of filter. K can be of size 3 × 3 or 5 × 5. The result of this product will be the new brightness of the pixel (x, y). I∗K =     I(1, 1) I(1, 2) ... I(1, n) . . . . . . I(m, 1) I(m, 2) ... I(m, n)    ∗   K(1, 1) K(1, 2) K(1.3) K(2, 1) K(2, 2) K(2, 3) K(3, 1) K(3, 2) K(3, 3)   Where I ∗ Kx ,y = 1 i=−1 1 j=−1 I(x + i, y + j) ∗ K(i, j) November 22, 2020 6 / 10
  • 7. Gaussian Kernel In image processing filters are mainly used to suppress either the high frequencies in the image, i.e. smoothing the image, or the low frequencies, i.e. enhancing or detecting edges in the image. An image can be filtered either in the frequency or in the spatial domain. The corresponding process in the spatial domain is to convolve the input image f(i,j) with the filter function h(i,j). This can be written as: g(i, j) = h(i, j) f (i, j) The discrete convolution can be defined as a ‘shift and multiply’ operation, where we shift the kernel over the image and multiply its value with the corresponding pixel values of the image. For a square kernel with size M× M, we can calculate the output image with the following formula: November 22, 2020 7 / 10
  • 8. Calculating Gaussian Convolution Kernels The Gaussian filter uses the Gaussian function in the kernel of the filter: G(x, y) = 1 2πσ2 e− x2 + y2 2σ2 This filter is a weighted filter which gives more importance to the central pixels. The parameter σ controls the weight given to the center. where, G(x,y) =The variables referenced as x and y relate to pixel coordinates within an image. e = represents the value of Euler’s number has been defined as a mathematical constant equating to 2.718. σ = represents a threshold or factor value, as specified by the user. November 22, 2020 8 / 10
  • 9. Continue... When calculating the kernel elements, the coordinate values expressed by x and y should reflect the distance in pixels from the middle pixel. In order to gain a better grasp on the Gaussian kernel formula we can implement the formula in steps. If we were to create a 3×3 kernel and specified a weighting value of 5.5 our calculations can start off as indicated by the following illustration:    1 2π(5.5)2 e− 12 +12 2(5.5)2 1 2π(5.5)2 e− 02 +12 2(5.5)2 1 2π(5.5)2 e− 12 +12 2(5.5)2 1 2π(5.5)2 e− 12 +02 2(5.5)2 1 2π(5.5)2 e− 02 +02 2(5.5)2 1 2π(5.5)2 e− 12 +02 2(5.5)2 1 2π(5.5)2 e− 12 +12 2(5.5)2 1 2π(5.5)2 e− 02 +12 2(5.5)2 1 2π(5.5)2 e− 12 +12 2(5.5)2    November 22, 2020 9 / 10
  • 10. Continue... The calculated values of each kernel element:   0.00509 0.00517 0.0521 0.00517 0.00526 0.00517 0.00509 0.00517 0.00509   An important requirement to take note of at this point being that the sum total of all the elements contained as part of a kernel/matrix must equate to one. At this point the sum total of the kernel equates to .046322. The kernel values should be updated by multiplying each element by one divided by the current kernel sum. k =   0.1098 0.1117 0.1098 0.1117 0.1135 0.1117 0.1098 0.1117 0.1098   Now, successfully calculated a 3×3 Gaussian Blur kernel matrix which implements a weight value of 5.5. November 22, 2020 10 / 10