Details of the exponent in Gaussian Filtering (imgaussfilt functions)

7 ビュー (過去 30 日間)
saipb
saipb 2019 年 11 月 22 日
コメント済み: saipb 2019 年 11 月 25 日
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
Siriniharika Katukam 2019 年 11 月 25 日
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!!
  1 件のコメント
saipb
saipb 2019 年 11 月 25 日
Thank you, that was very helpful.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by