[Insight-users] RecursiveGaussianImageFilter and normalization

Luis Ibanez luis . ibanez at kitware . com
Tue, 23 Dec 2003 10:22:25 -0500


Hi Nicolas,


This issue has been solved.
The associated bug ID=447 has been closed.
http://www . itk . org/Bug/bug . php?op=show&bugid=447&pos=16

The normalization factors for this filter were corrected.
The first and second derivatives now have normalization
factors consistent with the (zero order) Gaussian.

The Doxygen documentation of the RecursiveGaussianImageFilter
http://www . itk . org/Insight/Doxygen/html/classitk_1_1RecursiveGaussianImageFilter . html#_details
now has the equation of the Gaussian kernel used.

The effect of the NormalizationAcrossScales flag was also
fixed. When the flag is OFF you get the classical Gaussian
with normalization

        1 / ( sigma * sqrt( 2 * PI ) )

when the flag is ON you get the normalization factor:

        1 / (  sqrt( 2 * PI ) )


--

Please let us know if you find any further problems,

Thanks for reporting this bug.


Regards,


    Luis



----------------------
Nicolas Savoire wrote:

> Hello,
> 
>  I am using the RecursiveGaussianImageFilter to smooth an image and
> compute its derivatives, and I have some trouble with normalization. I
> expect this filter to give the result of the convolution with the
> gaussian function g(x) = 1/(sigma^2*2*pi) exp(x^2/(2*sigma^2)),
> nevertheless I get the right result only if I set
> NormalizationAcrossScale to true.
> On the other hand, if I want to compute the derivative of my image in
> the x direction, I have to set NormalizeAcrossScale to true for the
> smoothing filter and to false for the derivative filter in order to get
> the expected result. As for the second derivative in one direction, to
> get the correct result, one must set both NormalizeAcrossScale to false.
> This is somewhat not satisfying.
> I think the problem stems from the fact that the recursive filters used
> internally compute derivative without normalization:
>  -> g0(x) = exp(-x^2/(2*sigma^2)) for zero order
>  -> g1(x) = -x*g0(x) for first order
>  -> g2(x) = (x^2-sigma^2)*g0(x) for second order
> and then either 1/sqrt(sigma^2*2*pi) or 1/sqrt(sigma^4*2*pi) is used to
> normalize the filter. It is not satisfying, because g1(x) is different
> from g0'(x) and g2(x) is different from g1'(x), which explains why some
> NormalizeAcrossScale flags must be set and others not, to get the
> expected result.
> 
> I don't really get the usefulness of the NormalizeAcrossScale flag, is
> it related to the normalisation used in the scale-space theory for
> derivatives ?
> 
> Nicolas
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>