[Insight-users] recursiveGaussianImageFilter problem

Gunnar Farnebäck gunnar at imt.liu.se
Tue Jul 18 12:21:22 EDT 2006


Martin wrote:
> I have experienced a strange behaviour with the 
> recursiveGaussianImageFilter. I'm performing a gaussian smoothing on a 
> float input image using the following code:
>
> [...]
>
> When looking at the minimum and maximum value of the images before and 
> after filtering, I get the following result:
> 
> // before filtering
> minimum of image: 0
> maximum of image: 600
> 
> ... gaussSmoothVolume ...
> 
> // after filtering
> minimum of smoothed image: -1.26718
> maximum of smoothed image: 560.338
> 
> 
> All data sets are floats. I don't think it is intended that the 
> intensity range of the input image should be left during filtering, 
> since gaussian filters are weighted averages. Does anyone know where the 
> -1.26718 might come from? Someone already stumbled upon this problem?

The recursive Gaussian filter is an imperfect approximation of the
ideal Gaussian, with an infinite impulse response which has been
designed to be close to the ideal Gaussian but not with a
non-negativity constraint. In fact, if you try your experiment with a
volume containing a single non-zero voxel (preferrably close to the
center) you should obtain a Gaussian-like result but I believe you
will see a small negative dip at a distance of about 4-8 standard
deviations from your impulse.

Simple workarounds if this is a problem in your application is to
either threshold your result afterwards or change to the discrete
Gaussian filter.

/Gunnar


More information about the Insight-users mailing list