What is the unit of sigma in the function imgaussfilt?

12 views (last 30 days)
Is the unit of sigma of imgaussfilt pixels or is it the same unit as my input on which the filter is applied?

Answers (2)

Abhiroop Rastogi
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.

Image Analyst
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.

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!