Is the recoverPose() function in OpenCV is left-handed?

后端 未结 3 1357
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-02 23:24

I run simple test for OpenCV camera pose estimation. Having a photo and the same photo scaled up (zoomed in) I use them to detect features, calculate essential matrix and re

相关标签:
3条回答
  • 2021-01-02 23:42

    According to the OpenCV document, the algorithm in the function recoverPose is based on the paper "Nistér, D. An efficient solution to the five-point relative pose problem, CVPR 2003." From equations in Section 2 in this paper, we know it uses the basic triangle relationship (see figure here):

    x2 = R*x1 + t

    Therefore, translation t is the vector from cam2 to cam1 in cam2 frame. This explains why you get the answer t close to [0; 0; -1].

    0 讨论(0)
  • 2021-01-02 23:43

    Seems the recoverPose() function returns the first camera transform relatively to the second one (which was not intuitive for me, and is not clearly stated in the documentation). With this assumption test works correctly.

    0 讨论(0)
  • 2021-01-02 23:44

    In this diagram

    origin is located at top-right corner. Hence it satisfies right hand coordinate system. Positive Z-axis of image and camera coordinate systems are in SAME direction.

    However, in openCV, image coordinate system is located at top-left corner. So, it satisfies left hand coordinate system. Positive Z-axis of image and camera coordinate systems are in OPPOSITE direction.

    0 讨论(0)
提交回复
热议问题