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

[sfm] loRansac debug for PnP #1004

Merged
merged 9 commits into from
Sep 13, 2021
Merged

[sfm] loRansac debug for PnP #1004

merged 9 commits into from
Sep 13, 2021

Conversation

ghost
Copy link

@ghost ghost commented Mar 4, 2021

Make some modifications such that loRansac work for pose from points.

@fabiencastan fabiencastan requested a review from simogasp March 4, 2021 19:38
Copy link
Member

@simogasp simogasp left a 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;
Copy link
Member

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);
Copy link
Member

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

@fabiencastan fabiencastan added this to the 2.5.0 milestone Apr 13, 2021
@fabiencastan fabiencastan merged commit 0f6115b into develop Sep 13, 2021
@fabiencastan fabiencastan deleted the dev/loRansacPnP branch September 13, 2021 09:01
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.

3 participants