How to determine the sigma value for 2D gaussian filter

87 次查看(过去 30 天)
I have a matrix of 88*88*40 with real voxel size 2.5*2.5*2.5mm. I am currently using 2D gaussian filter to smooth all 40 layers. I am wondering how can I determine the sigma value. The matrix is a brain vessel mask so only include 0 and 1, I want to apply the gaussian filter to smooth the edge of current mask and elimate the noise.

回答(1 个)

Sufiyan
Sufiyan 2023-3-30
Hi,
Determine the FWHM (full width at half-maximum) of the desired smoothing effect. This will depend on the scale of features you want to preserve and the level of noise you want to eliminate. For example, if you want to preserve vessels that are at least 5 voxels wide and eliminate noise smaller than 2 voxels, you may choose a FWHM of around 4-6 voxels.
Find the sigma value using the following formula: sigma = FWHM / (2 * sqrt(2 * ln(2))).
Scale the sigma value based on the voxel size of your data. Since your voxel size is 2.5 x 2.5 x 2.5 mm, you will need to multiply the sigma value by the voxel size in each dimension.
Apply the 2D Gaussian filter with the calculated sigma value to each of the 40 layers of your 88 x 88 x 40 matrix.

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by