Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect rvec and tvec when using useExtrinsicGuess #1585

Merged
merged 1 commit into from Jul 8, 2023

Conversation

Jcparkyn
Copy link
Contributor

Fixes #1556.

I also updated the test to use inputs that reproduce the issue (for many inputs, SolvePnP will still converge when the initial rvec and tvec are wrong). With the updated test and no change to calib3d.h, the rvec and tvec outputs are clearly wrong. With the fix (or without useExtrinsicGuess) they are correct.

SolvePnPRansac has a similar issue, but I didn't fix it here because:

  • The API uses out parameters for rvec and tvec, so modifying them would be a breaking change.
  • Because these are out parameters, it's obvious that useExtrinsicGuess won't work, so it's much less likely to confuse users than the normal solvePnP version.

@shimat
Copy link
Owner

shimat commented Jul 8, 2023

Sorry for the late reply. Thank you!

@shimat shimat merged commit 2695ad7 into shimat:master Jul 8, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SolvePnP with useExtrinsicGuess is broken when using IEnumberable overload
2 participants