Announcement

Collapse
No announcement yet.

Relative transformation matrix

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Maryam Hajizadeh
    replied
    Re: Relative transformation matrix

    Hi all,

    Thank you very much for your nice helps. I did the transformation successfully right .

    Leave a comment:


  • Ton van den Bogert
    replied
    Re: Relative transformation matrix

    Josh and Sherm have already answered the question (Rtranspose was missing from the translation in the inverse transform).

    I just wanted to point out that, contrary to what Josh said, you can actually simply use the inverse of the 4x4 matrix. It will take longer to compute than the formulas posted by Josh and Sherm (Matlab says 99 microseconds), but the answer is correct.

    Here's a numerical example in Matlab:

    Code:
    >> X = [R p ; 0 0 0 1]
    X =
       -0.4586   -0.7635    0.4547    0.9572
       -0.7977    0.5792    0.1680    0.4854
       -0.3916   -0.2856   -0.8747    0.8003
             0         0         0    1.0000
    >> XinvSherm = [R' -R'*p; 0 0 0 1]
    XinvSherm =
       -0.4586   -0.7977   -0.3916    1.1396
       -0.7635    0.5792   -0.2856    0.6783
        0.4547    0.1680   -0.8747    0.1832
             0         0         0    1.0000
    >> inv(X)
    ans =
       -0.4586   -0.7977   -0.3916    1.1396
       -0.7635    0.5792   -0.2856    0.6783
        0.4547    0.1680   -0.8747    0.1832
             0         0         0    1.0000
    >>
    Ton

    Leave a comment:


  • Michael Sherman
    replied
    Re: Relative transformation matrix

    Hi, Maryam. Here is a picture from the comments for Simbody's Transform class:
    Code:
     *         [       |   ]
     *     X = [   R   | p ]    R is a 3x3 orthogonal rotation matrix
     *         [       |   ]
     *         [.......|...]    p is a 3x1 translation vector
     *         [ 0 0 0   1 ]
     *
     * These have a particularly simple inverse:
     *
     *    -1   [       |    ]
     *   X   = [  ~R   | p* ]   ~R is R transpose, p* = ~R(-p).
     *         [.......|....]
     *         [ 0 0 0   1  ]

    My guess is that you forgot to apply the rotation to the negated translation vector.

    Regards,
    Sherm

    Leave a comment:


  • Josh Baxter
    replied
    Re: Relative transformation matrix

    Taking the inverse of the 4x4 transformation matrix is not as easy as inverting everything. the 4x4 matrix is really just a convenient way of performing transformations; you could also do P_Global = R*P_local + L. To transform from P_Global to P_local you would follow the order of operations: P_local = R' * (P_Global - L). If you expand this out you get a 4x4 transformation matrix that looks like:


    [ 1 0 0 0
    -R'*L R']


    where


    R is a 3x3 homogenous rotation matrix
    L is a 3x1 translation vector


    Hope that helps. Josh

    Leave a comment:


  • Maryam Hajizadeh
    started a topic Relative transformation matrix

    Relative transformation matrix

    Hi all,

    I have 4*4 transformation matrix of tibia relative to femor for total knee replcement people during a 40frame gait cycle. I found these relative movement of tibia to femor with fluoroscope. I want to achieve the femor relative o tibia transformation matrix. for calculating this matrix I inversed the rotation matrix, and multiplied the 3 translation arrays by -1. However, when I apply the resulted femor relative to tibia transformation matrix to transform the femor on each frame, the femor component does not go the right way relative to tibia component. Could anyoine help me where I make mistake?
Working...
X