What is the unit of sigma in the function imgaussfilt?
14 views (last 30 days)
Show older comments
Is the unit of sigma of imgaussfilt pixels or is it the same unit as my input on which the filter is applied?
0 Comments
Answers (2)
Abhiroop Rastogi
on 21 Jan 2022
Hey Jona,
The sigma (standard deviation for the Gaussian Distribution) is supposed to be a positive number or a two element vector of positive numbers, and is not dependent on the input. You can refer to the documentation page of "imgaussfilt" function for any other details of the function.
0 Comments
Image Analyst
on 21 Jan 2022
The units for sigma should be specified in pixels, which is basically elements of your input matrix. Not sure what you mean by "same unit as my input". If each element represents some real world distance, like the distance between pixel 1 and pixel 2 is 35 microns or 10 kilometers, imgaussfilt() won't know about that calibration scaling factor. It just works on pixels. If you have some sigma you want in real world units, like 47 kilometers, you need to divide by your calibration scaling factor to turn that distance into the number of pixels.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!