[ITK-users] VersorRigid3DTransformOptimizer question

Matias Montroull matimontg at gmail.com
Mon Dec 29 14:48:32 EST 2014


Thanks Chris! very useful articles.

On Mon, Dec 29, 2014 at 2:12 PM, Christopher Mullins <
christopher.mullins at kitware.com> wrote:

> From Examples/RegistrationITKv4/MultiResImageRegistration2.cxx [1]:
>
> *The set of parameters in the AffineTransform have different dynamic
> ranges. Typically the parameters associated with the matrix have values
> around [-1:1], although they are not restricted to this interval.
> Parameters associated with translations, on the other hand, tend to have
> much higher values, typically in the order of 10.0 to 100.0. This
> difference in dynamic range negatively affects the performance of gradient
> descent optimizers. ITK provides a mechanism to compensate for such
> differences in values among the parameters when they are passed to the
> optimizer. The mechanism consists of providing an array of scale factors to
> the optimizer. These factors re-normalize the gradient components before
> they are used to compute the step of the optimizer at the current
> iteration. In our particular case, a common choice for the scale parameters
> is to set to 1.0 all those associated with the matrix coefficients, that
> is, the first N x N factors. Then, we set the remaining scale factors to a
> small value. The following code sets up the scale coefficients.*
>
> From the ImageRegistration7 example [5]:
>
> *Keeping in mind that the scale of units in scaling, rotation
> and translation are quite different, we take advantage of the
> scaling functionality provided by the optimizers. We know that the first
> element of the parameters array corresponds to the scale factor, the
> second corresponds to the angle, third and fourth are the center of
> rotation and fifth and sixth are the remaining translation. We use
> henceforth small factors in the scales associated with translations and the
> rotation center.*
>
> From the ScalesType doxygen [2]:
>
> *Scale type. This array defines scale to be applied to parameters before
> being evaluated in the cost function. This allows to map to a more
> convenient space. In particular this is used to normalize parameter spaces
> in which some parameters have a different dynamic range.*
>
> [5] is the most specific I can find.  Looking at how it's used in [1]
> might also be useful, as the example you mentioned doesn't provide much
> explanation (perhaps I or someone else should address that soon).
>
> From [3] (warning, outdated (2002!)):
>
> *e.g. for an 3D AffineTransform, you get 12 parameters: the first 9 are
> the coefficients of the matrix (representing rotation, scale and shearing)
> the last 3 are the components of a translation vector. You want then to
> provide an array of 12 values with the first 9 being =1.0 and the last
> three being on the range of 1.0 / the image size (in millimeters).*
>
> Here is another useful thread which is only half a decade old [4].
>
> Perhaps an explanation for this is deserving of better accommodations,
> maybe on the wiki.
>
> In the meantime, hope this helps!
>
> [1]
> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx#L291-322
>
> [2]
> http://www.itk.org/Doxygen/html/classitk_1_1Optimizer.html#a4c2e8eb9d9390e0e2988e78ea094492a
>
> [3]
> http://public.kitware.com/pipermail/insight-users/2002-October/001400.html
>
> [4]
> http://itk-insight-users.2283740.n2.nabble.com/Confused-abour-Optimizer-Scales-td4010857.html
>
> [5]
> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/ImageRegistration7.cxx
>
>
> On Mon, Dec 29, 2014 at 11:09 AM, Matias Montroull <matimontg at gmail.com>
> wrote:
>
>> Hi,
>>
>> What are the components or what each element represents (0 to 5) in
>> the VersorRigid3DTransformOptimizer?
>>
>>  typedef OptimizerType::ScalesType       OptimizerScalesType;
>>   OptimizerScalesType optimizerScales( transform->GetNumberOfParameters()
>> );
>>   const double translationScale = 1.0 / 1000.0;
>>
>>   optimizerScales[0] = 1.0;
>>   optimizerScales[1] = 1.0;
>>   optimizerScales[2] = 1.0;
>>   optimizerScales[3] = translationScale;
>>   optimizerScales[4] = translationScale;
>>   optimizerScales[5] = translationScale;
>>
>> Thanks!
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> 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://public.kitware.com/mailman/listinfo/insight-users
>>
>>
>
>
> --
> Christopher Mullins
> R&D Engineer
> Kitware Inc.,
> 919.869.8871
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20141229/7472a962/attachment.html>


More information about the Insight-users mailing list