Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix copying behaviors of Reconstruction regarding camera pointers#2841

Merged
ahojnnes merged 17 commits intocolmap:mainfrom
B1ueber2y:features/fix_camera_pointer_copy_constructor
Oct 24, 2024
Merged

Fix copying behaviors of Reconstruction regarding camera pointers#2841
ahojnnes merged 17 commits intocolmap:mainfrom
B1ueber2y:features/fix_camera_pointer_copy_constructor

Conversation

@B1ueber2y
Copy link
Contributor

Previous copying behavior is very dangerous after the introduction of camera pointer.

@ahojnnes
Copy link
Contributor

The same is true for copy assignment?

@B1ueber2y
Copy link
Contributor Author

The same is true for copy assignment?

Yes. This is added now.

@B1ueber2y B1ueber2y changed the title Fix copy constructor of reconstruction for the camera pointer in images Fix copying behaviors of Reconstruction regarding camera pointers Oct 16, 2024

Reconstruction::Reconstruction() : max_point3D_id_(0) {}

Reconstruction::Reconstruction(const Reconstruction& recon)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to add a test for these two new methods and assert equality between the two objects (or their serialized states)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry maybe I am missing something. The Reconstruction class in colmap does not naturally support serialization? Do we write a new method for this?

Copy link
Contributor

Choose a reason for hiding this comment

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

You can read and write the reconstruction using reconstruction_io?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. This has been added. Wrote a new function for comparing binary files. I hope I did not miss any existing utilities in the codebase. PTAL

Copy link
Contributor

Choose a reason for hiding this comment

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

I created a new PR that should hopefully simplify the tests in this PR: #2842

@ahojnnes ahojnnes enabled auto-merge (squash) October 24, 2024 15:48
@ahojnnes ahojnnes merged commit 9221b2a into colmap:main Oct 24, 2024
@B1ueber2y B1ueber2y deleted the features/fix_camera_pointer_copy_constructor branch October 24, 2024 19:13
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