0

Suppose that I have two cameras. I don't know exactly the poses of these two cameras. So their rotation matrice denoted as R1 and R2, respectively, are unknown. But I know the relative angles of these cameras along three axes. I mean if the angles along three axes of the two camera are (alpha1, betta1, gamma1) and (alpha2, betta2, gamma2), then the relative angles of these camera (deltaX, deltaY, deltaZ)=(alpha2-alpha1, betta2-betta1, gamma2-gamma1) are known.

My question is that can we form a "relative" rotation matrix R12 so that R2=R12*R1?

Because there're many methods to construct a rotation matrix. And the results of these methods are different (I'm still don't understand why can a camera have different rotation matrices). In this case, I construct the rotation matrix by multiply three rotation matrix along three axes. More specifically, R=RzRyRx.

As I test with the code in Matlab,

R(alpha2, 0, 0)*R(alpha1, 0, 0)=R(alpha1+alpha2, 0, 0).

But

R(alpha2, betta2, gamma2)*R(alpha1, betta1, gamma1) != R(alpha1+alpha2, betta1+betta2, gamma1+gamma2).

Thanks!

opmfan
  • 191
  • 1
  • 3
  • 14
  • The answer is yes you can form R12 but for that the delta angles must be defined in a specific way not with vague description. Add sketch. Because it matters a lot how you measure the angles ... and of coarse between what ... BTW I am more used to `R2 = R1*R12` matrix order – Spektre Oct 24 '16 at 15:45
  • 1
    You can't know the relative rotation if you don't know the original ones. Euler angles are a weird construct that doesn't let you do anything useful except calculating a proper rotation matrix or quaternion. For the same relative rotation, the relative Euler angles would depend on the rotations R1 and R2. – Nico Schertler Oct 25 '16 at 00:00
  • @Spektre. Thank you for your reply. But I don't understand your answer :D – opmfan Oct 25 '16 at 06:24
  • @NicoSchertler: It seems that I cannot form a relative rotation matrix if what I know is the relative angles between two poses. Thank you :D – opmfan Oct 25 '16 at 06:27
  • To construct R12 you must know between what the relative angles and in which plane are. As Nico mentioned Euler angles are not good for anything useful but if the angles are properly defined you can construct direction vectors for the relative coordinate system axises and from that construct transform matrix with which allow you to transform your R1 or R2 by multiplying their axis vectors ... for more info see [Understanding 4x4 homogenous transform matrices](http://stackoverflow.com/a/28084380/2521214) as I wrote before ADD AN EXAMPLE WITH SKETCH which shows where exactly the angles are! – Spektre Oct 25 '16 at 07:24
  • @Spektre. Thank you very much. I will read your answer in that link carefully to find the way to contrust the relative rotation matrix. I also have another question which I posted here http://stackoverflow.com/questions/40233492/different-between-rotating-the-camera-vs-rotating-the-scene. I'm really confused between rotation the camera vs rotating the scene. Could you help me to clarify that. Thank you. – opmfan Oct 25 '16 at 07:45
  • @JamesDo too late already have answered it just a minute ago – Spektre Oct 25 '16 at 07:51

0 Answers0