0

I have a coordinate system in which the orientation of a camera is represented as R=Rz(k) * Ry(p) * Rx(o) where R is a 3x3 matrix of the composition of 3x3 rotation matrices around each of X,Y,Z-axis. Moreover, I have a convention in which Z-axis is in the viewing direction of the camera. The X-axis is left-right and the Y-axis is bottom-up.

This R matrix is used in a multi-view stereo reconstruction algorithm. I have a data test set which comes with pre-calibrated camera information. I want to use the R matrices that come with this data set. However, I have no idea what kind of rotation order they assume or even their handed-ness.

How would I be able to figure this out? Any ideas?

Mustafa
  • 367
  • 1
  • 4
  • 13

1 Answers1

1

R=Rz(k) * Ry(p) * Rx(o)

This is a very instable way of doing it. Euler angles are prone to go into gimbal lock, so I strongly advise against their use.

How would I be able to figure this out?

Well, this problem is difficult to express in a closed solution. Your best bet is treating this as a optimization problem in 3 space, where you try find the values for k, p and o to match up with the given rotation matrix R. There are 3 possible permutations on the evaulation order, so you do that optimization for all 3 of them and take the best matching result.

datenwolf
  • 159,371
  • 13
  • 185
  • 298
  • What is an alternative to Euler angles? I would imagine this is the most intuitive representation of the orientation of a camera. If I told somebody to take a camera, point it at the scene, tilt with 5 degrees, pan with 10 degrees and roll 90 degrees... isn't this the *best* representation? – Mustafa Apr 25 '12 at 15:56
  • @Mustafa: The best representation is to give the person a direction of look and a direction of what's up. Just the angle is ambigous, as you could still freely rotate about the view axis. Rotations are either represented by a rotation matrix, or a quaternion. Don't dabble in Euler angles when doing computer graphics; they don't work like you think they do. – datenwolf Apr 25 '12 at 21:11