I have been reading several really good answers about how to obtain camera pose (rotation, translation, etc), such as this one and this one, but I am not sure how this applies to my problem.
- My problem: I have two images of a planar scene (terrain image from above), and I want find the motion that the camera has experienced between the two images $(dx, dy)$.
What I have done: I have image1 and image2 of a terrain with their features matched, and obtained its homography via OpenCV's C++ function:
cv::Mat H = cv::findHomography(image1points, image2points, CV_RANSAC);
Which looks like it is indeed an affine transformation: $$\pmatrix{a&b&c\\d&e&f\\0&0&1}$$
What I need help with:
- In this matrix, I don't know what is the reference frame of the $dx$, $dy$ parameters. $(dx, dy) = (c, f)$
- How can I extract the rotation angle and scaling factor between the 2D axes of the two images. (Right now I am using this suggestion, but results don't seem reliable).
- Once I have all the four parameters: $dx$, $dy$, rotation angle, scaling. How can I actually compute the motion of the camera (between the images) using the first image's axes as my reference frame.