Some image processing methods inherently smooth the images with an ideal filter, that is, a rectangular pulse. Comparing those methods with others that use a more typical Gaussian kernel can thus be challenging, as even if the full-width at half-maximum (FWHM) of the Gaussian filter is made equal to the width of the rectangular pulse, the resulting smoothnesses are not similar.
What would be the FWHM of a Gaussian filter that produces smoothness as similar as possible as that of a rectangular pulse of width ? This must depend only on the choice of the standard deviation of the Gaussian filter, which is the only parameter we can choose, versus the width of the ideal filter, which is also the only parameter that can be controlled (when it even can). If you ever wondered about this important question, here you will find the answer.
Note: This is the first time I use AI for an article (Claude 4.6, specifically). It certainly saved some time. I believe I am in good company in that.
Definitions: Consider first the 1D case. Let two real-valued functions each normalized to have unit area be:
1) A rectangular pulse of width :
2. A Gaussian centered at the origin with standard deviation :
We want to find the value of as a function of that minimizes the integral of squared difference between the two functions:
Solution: We start by expanding the integrand into 3 separate terms:
For , we substitute so
For , since on an interval of length and zero elsewhere, we have:
which does not depend on .
For , given that only on the interval , we have:
Substituting so that , and defining , thus mapping the integration limits to :
Noting that , we obtain:
Hence:
We need now to differentiate with respect to and set it to zero. The derivative of the first term is:
For the second term, using the chain rule with and , we have:
Setting :
and solving for :
Recalling we defined and solving for :
From a previous article, we know that the FWHM of a Gaussian filter can be expressed as .
Result for 1D: Hence, we have:
Which means that the FWHM of the Gaussian filter is approximately 0.8164965809277 times the width of the rectangular filter.
Result for 2D: If we repeat the process for the 2D case, in which the rectangular function forms a cylinder with radius and height so that the volume is equal to one, and seek the of the isotropic 2D Gaussian filter that has the minimal sum of squared differences in relation to the cylinder, we find:
and thus, in the 2D case:
Result for 3D: If we do it again for the 3D case, changing now to a sphere of radius , and compute the of the corresponding isotropic 3D Gaussian, we find:
and thus, in the 3D case:
Which means that the FWHM of the Gaussian filter is approximately 1.264911064067352 times the width of the spherical filter.
Example: Suppose you did some image processing in a volumetric representation of the brain and that that involved averaging over a sphere with radius 30 mm. The width of the sphere is 60 mm. The FWHM of the closest Gaussian filter that yields similar degree of smoothing in the 3D case is approximately 75.8947 mm.