OpenCV Camera Motion Estimation

Viewed 5427

I am trying to implement an algorithm for estimating the camera motion following the instructions provided here:

http://www.morethantechnical.com/2012/02/07/structure-from-motion-and-3d-reconstruction-on-the-easy-in-opencv-2-3-w-code/

I solely aim to retrieve the camera motion and not to reconstruct the scene.

So captured one image with, my camera then moved it slightly to the right (no rotation) and tried to check the consistency of my results.

I make the assumption that the first camera matrix is canonical, so I calculate and decompose the essential matrix to extract the camera matrix of the second view. I calibrated my camera with the method proposed in the OpenCV online documentation and got a reprojection error of about 3 pixels (which I feel is slightly high).

I get the following results:

R:
[-0.9849526307494116, 0.01908251779036621, -0.1717677871272531;
 0.05845683495175302, -0.8985189871723962, -0.4350246293465628;
 -0.1626379833471766, -0.4385196542978104, 0.8838831366008135]

t:
[-0.08455893449383088; -0.224114799153024; 0.9708873999583411]

R seems to be valid (determinant equal to 1, vectors forming an orthonormal basis) however I think that it is inconsistent since, as I already mentioned my camera, was not rotated between the two views. I assume that R should be close to the 3x3 unity matrix and the t vector should only describe a translation along the x-axis.

Since I am a beginner on this particular computer vision subject, I would like to ask if this is something that could be attributed to errors in my code or I am wrong in assuming that the original camera frame (corresponding to the canonical camera matrix) has its x,y axes aligned with the x,y axes of the image and its z axis facing towards the scene.

Thank you very much for your help !

0 Answers
Related