Finding most suitable Rotation and Translation from Homography decomposition

后端 未结 2 1519
隐瞒了意图╮
隐瞒了意图╮ 2021-01-07 01:58

I\'m trying to find the rotation and translation from Homography function. First I compute the corresponding feature points and using findHomography() I compute

相关标签:
2条回答
  • 2021-01-07 02:48

    I used the function 'filterHomographyDecompByVisibleRefpoints' by Vaesper. You can check the code here.

    You just need to input the Rotation matrix, normals obtained from decomposeHomographyMat and the point correspondences used to obtain the homograpy matrix. The above function will return 2 possible solutions. You can see more on this idea in the answer by Ebya here.

    After getting the 2 possible solutions, you will have to somehow make some checks depending on your case in order to find the right solution. Since I used identity matrix for camera matrix, the translation values obtained are in pixels and will need to be scaled using some external sensor. In my case, the distance between the camera and planar object is fixed in the z-axis, therefore, I just calculated what 1 pixel represents in world units.

    0 讨论(0)
  • 2021-01-07 02:49

    And is the resultant translation is a scaled value, which can be used directly, unlike the Essential Matrix decomposition case?

    Alas, no.

    The reference for the OpenCV implemenations, Malis & Vargas, says this on p.8:

    Notice that the translation is estimated up to a positive scalar factor

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