-
-
Notifications
You must be signed in to change notification settings - Fork 830
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
[sfm] loRansac debug for PnP #1004
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes the resection with LORansac has never been tested extensively with the sfm pipeline, only fo the localization, so it could happen that the least square solution is not physically possible (points behind of the camera). So effectivily it is good to add the fail safe in that case.
I dunno why you changed the DLT to EPnP which is also more expensive than solving the least square.
@@ -114,7 +114,7 @@ bool SfMLocalizer::Localize(const Pair& imageSize, | |||
|
|||
// use the P3P solver for generating the model | |||
using SolverT = multiview::resection::P3PSolver; | |||
using SolverLsT = multiview::resection::Resection6PSolver; | |||
using SolverLsT = multiview::resection::EPnPSolver; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the least square solver is the DLT method, epnp is not linear
@@ -54,7 +54,7 @@ class EPnPSolver : public robustEstimation::ISolver<robustEstimation::Mat34Model | |||
*/ | |||
void solve(const Mat& x2d, const Mat& x3d, std::vector<robustEstimation::Mat34Model>& models, const std::vector<double>& weights) const override | |||
{ | |||
throw std::logic_error("EPnPSolver does not support problem solving with weights."); | |||
solve(x2d, x3d, models); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is not implemented so it's wrong to do that.
For what it matters also the DLT method is implemented without the weights. It would be a good idea to add it to solveProblem
Make some modifications such that loRansac work for pose from points.