Relationship between Sigma and grid size in imgaussfilt3
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I am using the imgaussfilt3 function to smooth out my velocity fields in three dimensions. I understand that there are two variables to manipulate, i.e., Sigma and Filterwidth. I am manipulating only Sigma and leaving Filterwidth untouched (By default, the filter width is 4*Sigma + 1). What I am unable to find the documentation is the precise relationship between Sigma and the number of grid cells. My guess is that 1 Sigma is equal to 1 grid cell, but this most certainly need not be the case. Can a person with access to the source code please tell me the precise relationship between Sigma or Filterwidth to the grid dimensions?
Thank you!
0 Commenti
Risposte (1)
Walter Roberson
il 15 Set 2019
If "number of grid cells" refers to the size of the filter, then according to the documentation,
% 'FilterSize' - Scalar or 3-element vector, of positive, odd
% integers that specifies the size of the Gaussian
% filter. If a scalar Q is specified, then a square
% Gaussian filter of size [Q Q Q] is used.
%
% Default value is 2*ceil(2*SIGMA)+1.
2 Commenti
Walter Roberson
il 15 Set 2019
No. The default is 2*ceil(2*SIGMA)+1 .
One possible interpretation of that is 2*Sigma relative to the center of the filter. But the choice could have been arbitrary. If you want to know why they choose 2*ceil(2*SIGMA)+1 then you will need to open a support case and ask for their reasoning.
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!