Skip to content

Conversation

@Dawars
Copy link
Contributor

@Dawars Dawars commented Jul 31, 2024

This feature helps refine cameras and models.

  • Adds an optional parameter to TriangulateReconstruction for the fixed image ids
  • Adds a setter function and call it after BeginReconstruction.

Do I need to add tests/python bindings?

Based on #2145 and https://github.com/hxy-123/colmap

@sarlinpe sarlinpe requested a review from ahojnnes August 13, 2024 16:16
void IncrementalMapperController::TriangulateReconstruction(
const std::shared_ptr<Reconstruction>& reconstruction) {
const std::shared_ptr<Reconstruction>& reconstruction,
const std::unordered_set<image_t> fixed_image_ids) {
Copy link
Member

Choose a reason for hiding this comment

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

const ref?


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

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

num_shared_reg_images_(0) {}

void IncrementalMapper::SetFixedImageIds(
std::unordered_set<image_t> image_ids) {
Copy link
Member

Choose a reason for hiding this comment

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

const ref?

num_total_reg_images_(0),
num_shared_reg_images_(0) {}

void IncrementalMapper::SetFixedImageIds(
Copy link
Member

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

return EXIT_SUCCESS;
}

int RunIncrementalModelRefiner(int argc, char** argv) {
Copy link
Member

@sarlinpe sarlinpe Aug 13, 2024

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?

Dawars added 2 commits August 28, 2024 11:17
# Conflicts:
#	src/colmap/controllers/incremental_mapper.cc
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