I've been trying to estimate the euler angles (Rotz(yaw)*Roty(pitch)*Rotx(roll)) of a UAV from the homography between two frames. This means that the rotation I get from each frame to the previous one has to be multiplied by the previous one to get the total rotation with respect to the initial axes. So: R_accumulated=R01*R12*... Those R are obtained from decomposeHomography() in openCV. According to REP and OpenCV homography page, the camera reference is Z forward, X rigth and Y down but my UAV reference system is ENU. The question is how to get from that R_accumulated the dron orientation.
The R_accumulated from the homography tells you how to convert one plane into another. So if I want the camera orientation, the camera have to do the opposite movement to get the same result ( inv(R_accumulated)) ? Then that camera orientation matrix should be transformed to ENU coordinates? I have tried doing this with several rotations but I do not get good results.
The best one I've had is by getting the angles directly from R_accumulated and exchanging pitch and roll. That's a very good estimation but I still need to know some kind of rotation matrix from the camera frame to the UAV one.
I don't know if you have understood me.