Skip to content

Add EstimateGeneralizedAbsolutePose#2174

Merged
ahojnnes merged 23 commits intocolmap:mainfrom
sarlinpe:generalized-pose
Sep 18, 2023
Merged

Add EstimateGeneralizedAbsolutePose#2174
ahojnnes merged 23 commits intocolmap:mainfrom
sarlinpe:generalized-pose

Conversation

@sarlinpe
Copy link
Copy Markdown
Member

  • 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
Comment thread src/colmap/estimators/generalized_pose.cc Outdated
Comment thread src/colmap/estimators/generalized_pose.cc Outdated
Comment thread src/colmap/estimators/generalized_pose.cc Outdated
Comment thread src/colmap/estimators/generalized_pose.cc
Comment thread src/colmap/estimators/generalized_pose.h
@sarlinpe
Copy link
Copy Markdown
Member Author

PTAL.

Comment thread src/colmap/estimators/generalized_pose.cc
Comment thread src/colmap/estimators/generalized_pose.cc
Comment thread src/colmap/estimators/generalized_pose.cc Outdated
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
Copy Markdown
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
Copy Markdown
Member 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.

Comment thread src/colmap/estimators/generalized_pose.cc Outdated
Comment thread src/colmap/estimators/generalized_pose_test.cc Outdated
Comment thread src/colmap/optim/support_measurement.h Outdated
Comment thread src/colmap/optim/support_measurement.h Outdated
Comment thread src/colmap/estimators/generalized_pose.cc Outdated
@sarlinpe
Copy link
Copy Markdown
Member Author

PTAL.

Comment thread src/colmap/estimators/generalized_pose_test.cc Outdated
@sarlinpe
Copy link
Copy Markdown
Member Author

All tests now pass - PTAL.

@ahojnnes
Copy link
Copy Markdown
Contributor

Thanks, looks great.

@ahojnnes ahojnnes merged commit 0d9ab40 into colmap:main Sep 18, 2023
@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.

2 participants