Ask Your Question
0

opencv stitch CameraParams::R

asked 2016-11-22 19:48:39 -0600

AlexChan gravatar image

updated 2016-11-22 22:17:21 -0600

Tetragramm gravatar image

Hello,

I want to get the rotation and translation of each xyz axis in each picture. I am not sure the meanings of each value in CameraParams::R. What I understood are as follows: The R contains the rotation and translation information.

    R = Rz*Ry*Rx = [r00  r01  r02;
                    r10   r11  r12;
                    r20  r21   r22]

The third column is replaced by t[t0 t1 t2];

              R =   [r00  r01  t0;
                    r10   r11  t1;
                    r20  r21   t2]

The final result is (Matlab)

cos(thy)*cos(thz),      cos(thx)*sin(thz) + cos(thz)*sin(thx)*sin(thy),        t0    ;
-cos(thy)*sin(thz),      cos(thx)*cos(thz) - sin(thx)*sin(thy)*sin(thz),          t1    ;
sin(thy),                   -cos(thy)*sin(thx),                                    t2     ;

But I cannot get the right rotation and translation. I want to know whether the CameraParams::R is the same as I have mentioned above?

Thanks in advance!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-11-22 22:26:57 -0600

Tetragramm gravatar image

I don't think that's what R is. I've never heard of replacing the last column. Often the translation is appended as a column, to make a 3x4 matrix, which is called the Projection Matrix.

CameraParams::R is almost certainly just the rotation matrix you have at the first. CameraParams::t is the translation information.

For future reference, the rotation matrix in OpenCV is often stored as a set of Rodrigues parameters, which is three values (1x3 Matrix) that describe the rotations. This is usually denoted with a lowercase r, whereas the full rotation matrix (3x3) is uppercase R. You can switch between them using the function Rodrigues.

edit flag offensive delete link more

Comments

Thanks ! And I will try to compute the rotation and translation with CameraParams::R and CameraParams::t.

AlexChan gravatar imageAlexChan ( 2016-11-23 04:42:10 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-11-22 19:48:39 -0600

Seen: 319 times

Last updated: Nov 22 '16