[Insight-developers] RecursiveGaussianImageFilter

Gunnar Farneback gunnar at bwh.harvard.edu
Mon Dec 6 14:00:21 EST 2004


I have made some changes to the recursive Gaussian filter, described
at http://lmi.bwh.harvard.edu/~gunnar/itk_recursive_gaussian.html.

This changes the filter responses in two important respects:

1. The derivative filters become exactly (down to machine precision)
   invariant to addition of constants, solving bug #584.
2. The scaling of the filter responses is modified so that the
   derivative of n is exactly 1 and the second derivative of n^2 is
   exactly 2. (See also the figure on the referenced web page.)

The computational structure and complexity are unchanged, as is the
interface to the class.

I have changed the behavior of the filters in one place. Currently the
filter results are negated if the image spacing is negative. This
seems reasonable for the first derivative filter but it doesn't make
any sense to me for the smoothing filter and the second derivative
filter. Am I correct in assuming that this is a bug and not intended
behavior?

A second observation is that the recursive Gaussian filter is
hardcoded with the edge extension boundary condition. In some
situations it is necessary to have the zero padding boundary
condition, in order for the filter results to be useful. Would it be
an acceptable solution to add a method to choose between these
boundary conditions? Implementing support for zero padding is not
difficult but other boundary conditions may be quite tricky.

/Gunnar


More information about the Insight-developers mailing list