-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Incremental model refiner for DetectorFreeSfM #2685
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
base: main
Are you sure you want to change the base?
Conversation
@@ -538,11 +538,15 @@ void IncrementalMapperController::Reconstruct( | |||
} | |||
|
|||
void IncrementalMapperController::TriangulateReconstruction( | |||
const std::shared_ptr<Reconstruction>& reconstruction) { | |||
const std::shared_ptr<Reconstruction>& reconstruction, | |||
const std::unordered_set<image_t> fixed_image_ids) { |
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.
const ref?
src/colmap/exe/sfm.cc
Outdated
|
||
// Loads the list of images for which the camera pose will be fixed. | ||
auto reconstruction = reconstruction_manager->Get(0); | ||
std::unordered_set<image_t> image_ids_fixed_poses; |
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.
nit: call this fixed_image_ids
to be consistent with TriangulateReconstruction
src/colmap/sfm/incremental_mapper.cc
Outdated
@@ -108,6 +108,11 @@ IncrementalMapper::IncrementalMapper( | |||
num_total_reg_images_(0), | |||
num_shared_reg_images_(0) {} | |||
|
|||
void IncrementalMapper::SetFixedImageIds( | |||
std::unordered_set<image_t> image_ids) { |
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.
const ref?
src/colmap/sfm/incremental_mapper.cc
Outdated
@@ -108,6 +108,11 @@ IncrementalMapper::IncrementalMapper( | |||
num_total_reg_images_(0), | |||
num_shared_reg_images_(0) {} | |||
|
|||
void IncrementalMapper::SetFixedImageIds( |
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.
Call this SetExistingImageIds
and move the declaration+definition closer to ExistingImageIds
@@ -183,6 +183,66 @@ int RunColorExtractor(int argc, char** argv) { | |||
return EXIT_SUCCESS; | |||
} | |||
|
|||
int RunIncrementalModelRefiner(int argc, char** argv) { |
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.
A lot of this is very similar to RunPointTriangulator
. Would it make sense to instead augment RunPointTriangulator
with this new feature? can we minimally allow the user to control whether to 1) fix all images (the default of RunPointTriangulator
), 2) fix no image, 3) fix a subset of images?
# Conflicts: # src/colmap/controllers/incremental_mapper.cc
This feature helps refine cameras and models.
Do I need to add tests/python bindings?
Based on #2145 and https://github.com/hxy-123/colmap