Details of the exponent in Gaussian Filtering (imgaussfilt functions)

조회 수: 5 (최근 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!!

추가 답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by