[Insight-users] Quaternions and Versors

Thomas Albrecht Thomas.Albrecht at unibas.ch
Wed Jun 11 11:03:30 EDT 2008


Hi everybody,

I have a couple of questions about the good old problem of optimizing 
with respect to a rigid transform represented by quaternions or versors. 
In ITK, there is a QuaternionRigidTransform and a 
VersorRigid3DTransform. Both implement a rigid transform in 3D. It is 
argued in the ITK Software Guide as well as in the "theory book" Insight 
into Images, that the space of unit quaternions or versors is not a 
vector space and therefore special optimization methods need to be 
designed in order to optimize the quaternion or versor parameters in a 
registration algorithm. Most importantly Insight into Images states that 
when optimizing with a gradient descent type optimizer, the update step 
needs to be performed by versor or quaternion composition and NOT by 
adding an update term to the current parameters.
For this reason, there are two specialized gradient descent optimizers: 
the QuaternionRigidTransformGradientDescentOptimizer and the 
VersorRigid3DTransformOptimizer. The versor optimizer re-implements the 
update step of the regular gradient descent optimizer in order to update 
the parameters by versor composition instead of addition.
However, the method of minimizing by steepest descent relies on the 
first term of the Taylor expansion, i.e. the linearization of the 
function with help of the first derivative. Using the regular derivative 
we all know and love implies the use of an additive update step. 
Therefore, in order to be able to perform a compositional update, the 
GetJacobian method of the VersorRigid3DTransform implements what is 
called the "versor derivative" in the ITK Software Guide. So here 
finally, are my first two questions:

   How is the versor derivative defined and calculated?
   Is there any publication outlining the exact calculations leading to 
the versor derivative implemented in the VersorRigid3DTransform?
   I checked out Hamilton's book on quaternions, but it didn't help me 
much. Is there any literature on the subject from this century, 
preferably focusing on the given problem of image registration?

I would like to use a smarter optimizer than the gradient descent 
already implemented in ITK. But in order to write a Newton or 
Quasi-Newton (Levenberg-Marquardt) optimization for the 
VersorRigid3DTransform (cf. 
http://www.itk.org/pipermail/insight-users/2006-September/019324.html ), 
one would need to know the Taylor expansion up to the second term of the 
cost function. This leads to the next question:

   How does the Taylor expansion look like when using the versor 
derivative?

The whole problem seems to be solved differently in the quaternion 
transform implemented in ITK. Contrary to the versor transform, the 
GetJacobian method of the QuaternionRigidTransform implements a regular 
derivative as we all know it. It is easily calculated by writing out the 
matrix-times-vector representation of the versor transform and taking 
the regular partial derivatives with respect to the four quaternion 
parameters w, x, y, and z. Accordingly, the 
QuaternionRigidTransformGradientDescentOptimizer uses a regular additive 
update in the gradient descent optimization. The only change is that it 
enforces the unit length of the updating quaternion by normalization in 
each step.

   Why is it possible to use an additive update here even though it is 
claimed in Insight into Images that this is not possible and a 
compositional update should be used?
   Why is the regular derivative used here and not the versor or 
quaternion derivative?
   If we used quaternions for representing a similarity transform 
instead of a rigid transform, could we just use an off-the-shelf 
optimizer with an additive update, based on the regular Taylor expansion?
  This leads to two more questions:

   If using an additive update works for quaternions, why doesn't it 
work for versors?
   Why is the space of versor parameters not a vector space? Doesn't 
every triple (x,y,z) represent a valid versor rotation?

I hope that somebody finds the time to answer at least some of these 
numerous and complicated questions.

Thanks

Tom
 


More information about the Insight-users mailing list