Results 1 to 2 of 2

Math Help - Quaternions, rigid body rotation (matlab)

  1. #1
    Newbie
    Joined
    Sep 2010
    Posts
    1

    Quaternions, rigid body rotation (matlab)

    I've been watching a set of videos on medical image processing, and I'm working through a section on using Quaternions for 3 d image registration. That is, given 2 sets of 3 points in R3, where one set has been rotated about an axis by an unknown amount, find the quaternion that best describes the rotation.

    The problem is described in one of the handouts
    http://www5.informatik.uni-erlangen....gistration.pdf

    on about page 40.

    I have written matlab code that successfully does this transform.

    I set up a system of equations as below:
    %(pqPrime1 * q) - (q * p1) = 0;
    %(pqPrime2 * q) - (q * p2) = 0;

    where pqPrime is the rotated point/quaternion
    p1 is the non-rotated point
    q is the unknown quaternion we want.

    This becomes a matrix of point coefficients and using singular value decomposition
    U S V = svd(M)

    I find the vector in the null space at V
    ns = V(:,4);

    This solution was spoken by the professor during the video, however, the problem wasn't fully worked out so I'm just trying to work it out myself..

    This works great and I get it - what I'm fuzzy on though is, shouldn't I be minimizing some error E rather than setting the equations = 0? If so, I don't see how I should set up the equations for that....

    Thanks in advance.

    Rick
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Oct 2012
    From
    Boston
    Posts
    1

    Re: Quaternions, rigid body rotation (matlab)

    I'll leave this here for future reference. MATLAB has built-in quaternion support. You may find the functions more useful than writing your own and this may give you the ability to solve the problem with writing minimal code.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Quaternions and Rotation?
    Posted in the Advanced Algebra Forum
    Replies: 6
    Last Post: March 21st 2011, 02:48 AM
  2. Replies: 6
    Last Post: November 28th 2010, 04:56 AM
  3. vecotr (rigid body) question
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: November 9th 2010, 03:03 AM
  4. 3D Equilibrium of a rigid body
    Posted in the Advanced Applied Math Forum
    Replies: 3
    Last Post: November 3rd 2008, 10:31 PM
  5. Quaternions xz rotation with preserved y
    Posted in the Advanced Applied Math Forum
    Replies: 2
    Last Post: January 3rd 2008, 01:27 PM

Search Tags


/mathhelpforum @mathhelpforum