1

As far as I know solve pnp algorithm (almost all of the pose estimation algorithm - or at least all cv.solepnp flags) suppose to produce a different answer in every run because of the idea of estimation in the first place.

I'm trying to check the avarage/median error in multiple runs, but unfortunatly every time I get the same results.

I'm using solvePnp function with OpenCV in Python, and this is the command:

(success, rotation_vector, translation_vector) = 
   cv2.solvePnP(realPoints, twoDimPoints, cam_matrix, 
   dist_coeffs,flags=cv2.*, useExtrinsicGuess=False\True)

What a I doing wrong? or am I wrong about my approach?

Guy P
  • 1,395
  • 17
  • 33
  • 1
    For me, it is normal that you get the same result for the same inputs for `solvePnP`. As far as I know, only `SOLVEPNP_ITERATIVE` requires an initial estimate of the solution, all the others methods should solve the problem. In this case, if the initial pose is always the same, the output will be always the same. You should better refer directly to the corresponding [papers](https://docs.opencv.org/3.3.1/d9/d0c/group__calib3d.html#ga549c2075fac14829ff4a58bc931c033d) if you want to get more information about the different methods. – Catree Nov 03 '17 at 00:01
  • 1
    Also for me, a non linear estimation problem means that you are not guarantee to have the optimal solution / the optimal solution depends of an initial start. That does not mean that you should get different results if you start from the same initial solution. – Catree Nov 03 '17 at 00:06

0 Answers0