[Insight-users] Problem with 2D Registration (local minima)

Luis Ibanez luis.ibanez at kitware.com
Wed Oct 21 17:29:08 EDT 2009


Hi Manuel,

Thanks for the detailed description of your problem.

A couple of questions:


1) What is the pixel spacing of your image ?

    The typical proportion of :

> const double translationScale = 1.0 / 1000.0;

    is set up for images whose physical extent in
    the units used by the spacing is in the range
    of hundreds.

    For example, a typical CT scan will have 512x512
    pixels with a spacing close to 1mm / pixel.

    Your images are probably from Microscopy or
    from a Satellite, so  I'm wondering about the units
    that you use (microns or kilometers) and the
    exact numeric values of the spacing.


2)  Could you post to the list the output of the
     command observer that tracks the values of
     the metric and the transform at every iteration ?


Something that happens often when using the
RegularStepGradientDescentOptimizer is that,
if the registration process have a couple of
bounces of direction in the parametric space,
the step length may be reduced too fast, and
not give the optimizer the oportunity to walk
far enough to get to the solution.


You may want to try using the method:

    optimizer->SetRelaxationFactor( 0.9 );


This method defines the factor by which the
step length is reduced at every time that the
parametric space step changes direction.
This may prevent the premature shrinkage
of the step length (assuming that this is the
real problem).


Anothe typical issue: It may simply be that you
need a better initialization for your images.


Note that the Transform initializer in the example:

             ImageRegistration6.cxx

is using the methods MomentsOn().

This may or may not be the right method to use,
depending on the content of your images.

For example: If the two images have different
modalities, or if the main features of one image
may not overlap to the one in the other image.

If you could post a screenshot of both images
we could avoid all this speculation...   :-)

Or...
If you can share your images in a public web
site, that will be even better.



       Thanks


              Luis


----------------------------------------------------------------
On Wed, Oct 21, 2009 at 11:56 AM, Manuel David Tabas Calle
<manueldavid.tabas at hotmail.es> wrote:
> Hello ITK,
>
> I´m working with ITK to do registration of 2D images and I think I reach a
> local minima that makes a poor registration.
>
> I´m using 2D images 2000x2000 pixels in what the moving image needs a
> rotation and a translation. So I reproduced the ImageRegistration6.cxx to do
> that. But the result I got is not good enough so I think that the
> MeanSquares metric reaches a local minima. The value of the metric is about
> 4000 (aprox.), and I run a test using as input parameters the optimal ones
> (that is, the result I think i should obtain) and the metric returns a value
> of 2500 (aprox.).
>
> The framework I use is:
>
>    itkImageRegistrationMethod
>    itkMeanSquaresImageToImageMetric
>    itkLinearInterpolateImageFunction
>    itkRegularStepGradientDescentOptimizer
>    itkCenteredRigid2DTransform
>
> And the parameters of my registration are:
>
> const double translationScale = 1.0 / 1000.0;
> optimizerScales[0] = 1.0;
> optimizerScales[1] = translationScale;
> optimizerScales[2] = translationScale;
> optimizerScales[3] = translationScale;
> optimizerScales[4] = translationScale;
>
> optimizer->SetMaximumStepLength( 0.1 );
> optimizer->SetMinimumStepLength( 0.001 );
> optimizer->SetNumberOfIterations( 200 );
>
>
> The scales are well defined and I tried to vary the parameters of the
> optimizer but the results were similar, so I don´t know what to do next. Any
> idea??
>
> Thank you in advance, I hope you can have more ideas to try.
>
>
>
> Manuel.
>
>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list