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

Add EstimateGeneralizedAbsolutePose #2174

Merged
merged 23 commits into from
Sep 18, 2023
Merged

Conversation

sarlinpe
Copy link
Contributor

  • Created estimators/generalized_pose as estimators/pose is getting too crowded
  • The logic for the unique inlier support was written by @mihaidusmanu

@sarlinpe sarlinpe marked this pull request as ready for review September 15, 2023 13:34
@sarlinpe
Copy link
Contributor Author

PTAL.

std::vector<size_t> point3D_ids;
point3D_ids.reserve(points3D.size());
for (const auto& p3D : points3D) {
point3D_ids.push_back(std::lower_bound(unique_points3D.begin(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we use isApprox above to prune redundant points, but here we use the exact LowerVector3d, I suspect that you may end up with unique_points3D.end() as a return value, if the last point was pruned. In this case, you will end up with a point3D_id that is out of bounds?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is quite error-prone. I've replaced it with the argmin of the distance to all distinct points.

@sarlinpe
Copy link
Contributor Author

PTAL.

@sarlinpe
Copy link
Contributor Author

All tests now pass - PTAL.

@ahojnnes
Copy link
Contributor

Thanks, looks great.

@ahojnnes ahojnnes merged commit 0d9ab40 into colmap:main Sep 18, 2023
11 checks passed
@sarlinpe sarlinpe deleted the generalized-pose branch September 18, 2023 09:57
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.

None yet

2 participants