r/computervision • u/TCW_Jocki • Jun 23 '19
[Question] is-camera-pose-estimation-with-solvepnp-epnp-sensitive-to-outliers-and-can-this
https://stackoverflow.com/questions/56725085/is-camera-pose-estimation-with-solvepnp-epnp-sensitive-to-outliers-and-can-this
0
Upvotes
4
u/tdgros Jun 23 '19
RANSAC is robust to outliers, the different methods proposed by solvePnP are not. OpenCV offers a solvePnPRansac which runs solvePnP within RANSAC so you get the best of both worlds.
Another way, when you have a reasonable prior, you can rate the matches according to the prior, remove the very bad matches, run solvePnP, and re-start. If you were to re-implement your own PnP, you could re-weight samples according to their reprojection error (for instance with the Huber loss)