Wrong in using solvePnPRansac in opencv 3.3.0.

asked 2017-08-22 05:20:43 -0500

When I use solvePnPRansac function to do pose estimation for KITTI datasets: solvePnPRansac(pts_obj,pts_img,cameraMatrix,Mat(),rvec,tvec,false,100); The rvec and tvec is wrong after a while. But I use solvePnPRansac function in opencv 3.2.0, it works well.

edit retag flag offensive close merge delete


Can you add the data when it failed to be able to reproduce the issue?

Eduardo gravatar imageEduardo ( 2017-08-22 13:51:00 -0500 )edit

I download from here: http://www.cvlibs.net/datasets/kitti/.... I use the sequences 00. Meanwhile,I use SIFT and FLANN.

icedaigua gravatar imageicedaigua ( 2017-08-22 20:24:52 -0500 )edit

The easiest thing to debug would be to upload somewhere the values of pts_obj, pts_img and cameraMatrix when it fails in 3.3 and works in 3.2.

Also, can you show the values rvec and tvec in 3.3 and 3.2?

The only difference in solvePnPRansac between 3.3 and 3.2 should be that in 3.3 the final camera pose is estimated using all the inliers + some minor changes as described here.

Eduardo gravatar imageEduardo ( 2017-08-23 09:50:59 -0500 )edit

I am meeting the same problem, version3.3 produces the wrong results, how to solve it?

dzywater gravatar imagedzywater ( 2017-10-21 12:28:05 -0500 )edit

@dzywater, please do not post an answer here, if you have a question or comment, thank you.

berak gravatar imageberak ( 2017-10-21 17:05:11 -0500 )edit