[Insight-developers] RecursiveGaussianImageFilter

Miller, James V (Research) millerjv at crd.ge.com
Tue Dec 7 17:58:36 EST 2004


Gunnar, 

You might want to take a look at

 * T. Lindeberg. "On Scale Selection for Differential Operators.", Proc.
 * 8th Scandinavian Conference on Image Analysis. May 1993. pp. 857-866.

I think you can grab if off of Lindeberg's website.  I'd have to look at the

paper again but I think you end up multiplying by sigma to normalize across
scales. This paper is not about the recursive gaussian but derivative 
gaussian calculations across scales. But it may give some insight.

Jim




-----Original Message-----
From: Gunnar Farneback [mailto:gunnar at bwh.harvard.edu]
Sent: Tuesday, December 07, 2004 5:39 PM
To: luis.ibanez at kitware.com
Cc: insight-developers at itk.org
Subject: Re: [Insight-developers] RecursiveGaussianImageFilter


> Embarrassingly enough it looks like I managed to mess up the
> normalization across scales after all. Please find a new version at
> http://lmi.bwh.harvard.edu/~gunnar/itk_recursive_gaussian.html
> (only itkRecursiveGaussianImageFilter.txx has been changed).

I have now found out how to run a single test by hand. Apparently
itkRecursiveGaussianImageFiltersTest still fails the normalization
across scales, although now it's at least close.

Now the question is what normalization across scales actually means.

1. Judging from the testcase it means that the maximum impulse
   response should be constant for the smoothing filter.

2. A comment in SmoothingRecursiveGaussianImageFilter.cxx says:

   | There are two typical ways of normalizing Gaussians depending on their
   | application. For scale-space analysis it is desirable to use a
   | normalization that will preserve the maximum value of the input. This

   I'm not sure I can make sense of this but it seems difficult to do
   in general without having an image dependent normalization.

3. The documentation for the NormalizeAcrossScale flag in
   itkRecursiveGaussianImageFilter.h says:
   
   | Set/Get the flag for normalizing the gaussian over scale space.
   | When this flag is ON the filter will be normalized in such a way 
   | that larger sigmas will not result in the image fading away.

   This is not very exact but possibly consistent with the regression
   test.

   | \f[    
   |       \frac{ 1 }{ \sqrt{ 2 \pi } };
   | \f]
   |
   | When the flag is OFF the normalization will conserve contant the 
   | integral of the image intensity. 
   | \f[    
   |       \frac{ 1 }{ \sigma  \sqrt{ 2 \pi } };
   | \f]

   This normalization factor is only correct for the continuous
   Gaussian. My implementation computes the normalization factor so
   that the sum of the actual discrete infinite impulse response is
   exactly one. From the equations above I then assumed that
   multiplying the response by sigma when NormalizAcrossScale is ON
   would be good enough.

So, how should the normalization across scale be implemented? I can
certainly change so that 1. is fulfilled if that is what we want but
what is the appropriate scaling in that case for the derivative
filters? Where should I read or who should I ask to find out? Or is my
implementation okay but the test should be changed instead?

Two more technical questions about running tests:

1. I haven't found out how to run e.g. the
   itkLaplacianRecursiveGaussianImageFilterTest by hand without having
   to look in Testing/Code/BasicFilters/DartTestfile.txt for the
   input file. I assume there is some mechanism that automates
   running the tests.

2. Is there some easy way to run a custom collection of tests, more
   specifically the ones failing on
 
http://www.itk.org/Testing/Sites/zion.kitware/Linux-g++-3.3/20041206-1919-Ex
perimental/Test.html ?

/Gunnar
_______________________________________________
Insight-developers mailing list
Insight-developers at itk.org
http://www.itk.org/mailman/listinfo/insight-developers


More information about the Insight-developers mailing list