Details of the exponent in Gaussian Filtering (imgaussfilt functions)

5 次查看(过去 30 天)
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?

采纳的回答

Siriniharika Katukam
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!!

更多回答(0 个)

产品

Community Treasure Hunt

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

Start Hunting!

Translated by