I would like to perform an asymmetrical gaussian filtering on a 3D data matrix in MATLAB. With imgaussfilt3, I am able to do it symmetrically (same blurring in all three dimensions). However, I can only give one value for sigma, hence the filtering is the same in all dimensions.
In another thread, I found the possibility to seperate the filtering and apply it horizontally and vertically (in that case it was only 2D), using the fspecial function. Sadly, I'm not able to make it work (I keep getting different results than when using imgaussfilt in a small example matrix), and the documentation for fspecial says that the gaussian mode is no longer recommended and to use imgaussfilt instead.
To provide an example:
matrix = rand(30,30,30);
sigma = 2;
matrix_symblur = imgaussfilt3(matrix,sigma);
Which I now want to change in the way that sigma is 1, 2 and 3 for the three dimensions, respectively, so that the blurring effect is differently strong for the three dimensions.
I am using MATLAB R2017a. Can anyone help?
imfilter
. Good luck! – Dev-iL