Details of the exponent in Gaussian Filtering (imgaussfilt functions)

5 vues (au cours des 30 derniers jours)
saipb
saipb le 22 Nov 2019
Commenté : saipb le 25 Nov 2019
Hello,
I am trying to understand the specifics of the exponent in the Gaussian function in imgaussfilt and imgaussfilt3. For example, I'd like to understand if the exponent was simply exp(x.^2/sigma_x^2) or was it exp(x.^2/ 2 *sigma_x^2) or if there is a multiplier in front of the exponent.
I tried to do 'edit imgaussfilt' and looked at the spatial filtering function in the .m file and that only pointed me to: images.internal.createGaussianKernel(sigma, hsize). Obviously, this is an inbuilt function that only someone with access to the code can tell me.
These details are critical to my understanding of how I can input the sigma in grid cells into the Matlab function when I want to filter out a feature that is x meters. In other words, there is no way of directly linking the physical sigma in meters to the numerical sigma in grid points in the imgaussfilt functions with my current knowledge.
Can one of you please share the details of the exponent?

Réponse acceptée

Siriniharika Katukam
Siriniharika Katukam le 25 Nov 2019
Hi
In both imgaussfilt and imgaussfilt3, the gaussian kernel is created using
h = exp(-x.^2/2*sigma.^2)
where h is gaussian kernel with standard deviation sigma.
Hope this helps!!

Plus de réponses (0)

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by