3dv_tutorial icon indicating copy to clipboard operation
3dv_tutorial copied to clipboard

Implementation of triangulation.py

Open zhanghua7099 opened this issue 2 years ago • 0 comments

Hi! Thank you for giving this good tutorial!

Here I found a problem. When I tried the triangulation of the Python version and C++ version, I found that the output was not the same. The Python version will give a negative depth triangulation result.

After I add the camera intrinsic matrix to the function "cv.recoverPose", the triangulation works well.

The code for this line https://github.com/mint-lab/3dv_tutorial/blob/f295338ae4a8c28bf7da0d3f2dea1506be652ef1/examples/triangulation.py#L14C43-L14C43

_, R, t, _ = cv.recoverPose(E, pts0, pts1)

should be:

_, R, t, _ = cv.recoverPose(E, pts0, pts1, K)

Hope this will be helpful.

zhanghua7099 avatar Dec 04 '23 12:12 zhanghua7099