[MINC-users] minctracc angles problem

Andrew Janke a.janke at gmail.com
Sun May 13 08:33:24 EDT 2007


> I run
> minctracc -lsq12 -mi input.mnc target.mnc output.xfm
>
> and get:
> COG of v1: -0.014192 136.356400 -4.679813
> COG of v2: 0.591960 -18.756006 3.126583
>     [trans] = 0.606151 -155.112411 7.806396
> WARNING: (rotmat_to_ang.c:187) step one: rz not in the range -pi/2..pi/2
> Could not extract angles from rotation matrix:
>    -0.711324    0.703226    0.030620
>     0.703189    0.714539    0.039374
>     0.036176    0.026770    1.002540
> You can try rerunning minctracc with '-est_translation'
> The program will continue with angles = 0.0, 0.0, 0.0
>
> I guess it means that no rotations are performed.

It means that you have a rotation matrix that cannot be decomposed
(sensibly) into Euler angles in the range you say below.  This matrix
is defined in the inital setup of a minctracc alignment.  Occasionally
this pre-processing step doesn't do so well thus the suggestion to
start with zero rotation.

Once this setup of the rotations is complete, minctracc goes onto
simplex optimisation of the Euler Angles.

> Why does minctracc not
> handle rotations outside the range -pi/2..pi/2 ?

Because it optimises (using simplex) with Euler angles.  These only
make sense in this range otherwise you will get into problems such as
"gimball lock", one of the big drawbacks of a Euler angle
decomposition.

> Is there a way to solve this. Running with -est_translation does not
> solve anything.

try -identity... ;)

Either that or there is some experimental code in there that uses
quaternions in stead of Euler Angles for the optimisation, this is not
limited to rotations of pi/2.  To use it I would suggest the following

   minctracc -quaternions -identity

I think wikipedia has a good Euler angles vs quaternion thingo, I know
mathworld does but it s rather "mathy". the simple way to think of it
is:

   Euler angles: 3 rotations with a rotating frame of reference

   Quaternions: an axis (3 parameters) And a rotation.
        -- NOTE! this is not the 4 numbers you see! but can be obtained from
            them easily.


Side note: quaternions are what is used in most games to rotate
things...  the ubiquitous drag and drop for rotation as is used in
viewnup.

a



-- 
Andrew Janke   (a.janke at gmail.com || http://a.janke.googlepages.com/)
Canberra->Australia    +61 (402) 700 883


More information about the MINC-users mailing list