Camera rotation matrix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sendan
    3Dflower
    • May 2018
    • 4

    Camera rotation matrix

    Hey guys,
    im trying at the moment to export the camera externals and internals for further processing via matlab.
    There are two options about to choose:

    1. Export internal and external paramteres as txt
    2. Export intrinsics and extriniscs as xmp

    For a specific camera i get the folowing values for the rotationmatrix
    1)
    ### First Axis of Rotation X, Second Axis of Rotation Y, Third Axis of Rotation Z
    "180430_140521_1.png" 0.194836 -112.099455 586.355392 23.052650 -0.210098 90.666832

    So the Rotationmatrix R should be calculated by
    R=RotZ(gamma)*RotY(beta)*RotX(alpha)

    with

    alpha=23.052650
    beta=-0.210098
    gamma=90.666832

    when i calculate the above equation with matlab i get:
    -0.0116 -0.9201 0.3916
    R = 0.9999 -0.0121 0.0012
    0.0037 0.3916 0.9201

    2)
    -0.011638076 0.92009981 0.39151104
    R = 0.99992555 0.0092730188 0.0079310836
    0.0036668993 0.3915742 -0.92013923

    Both rotationmatrices are similar but not equal...
    Can you answer me where my error is?

    Kind regards

    Michael
    Last edited by Sendan; 2018-09-13, 03:51 PM.
  • Andrea Alessi
    3Dflow Staff
    • Oct 2013
    • 1335

    #2
    Hi Michael,

    not sure if i understood, but it looks good to me. Are you sure you set matlab to print more than 4 decimals ?

    Comment

    • Sendan
      3Dflower
      • May 2018
      • 4

      #3
      Thx for the fast reply
      Its not only about the values:
      Element(row=1,column=2) from 1) is negative
      Element(row=1,column=2) from 2) is positive

      Comment

      • Andrea Alessi
        3Dflow Staff
        • Oct 2013
        • 1335

        #4
        the transformation looks good, but most likely the axis convention you are using is different than the one in zephyr, so simply invert them accordingly to your reference system

        Comment

        Working...