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

Update model_aligner functionality #1177

Merged
merged 12 commits into from Mar 30, 2021
Merged

Conversation

anmatako
Copy link
Contributor

model_aligner has been extended with the following additional functionality:

  1. Can use either an image list (existing method) or the location priors from the database (new functionality) for alignment. Using the new database_path option will use the database instead of an image list
  2. Can optionally skip the scale estimation during alignment. This is controlled by the new estimate_scale flag.
  3. Can optionally export the alignment transform in a text file as a 4x4 row-major matrix. This is enabled by providing a valid path for the output transform file through the new transform_path option.
  4. Can perform 5 types of alignment: "plane", "ecef", "enu", "enu-unscaled", and "custom".

The different alignment types work as:

  1. custom: This is the same as the existing method where the image locations are used as-is for alignment
  2. plane: This does not use any reference images. It simply aligns the model to the principal plane of the 3D points (estimated with SVD), such that the x-y plane aligns with the principal plane
  3. ecef: This mode assumes that the image locations (from file or database) are provided as GPS Lat/Lon/Alt coordinates (WGS84) and then converts them to the ECEF coordinate systems and aligns the model. This results in a model with global orientation expressed in physical units (meters).
  4. enu: This mode also assumes that the image locations are provided as GPS coordinates. It aligns the model with the true ENU ground plane at the model's 3D points centroid, such that x points East, y points North, and z points Up. The model scale is in physical units (meters).
  5. enu-unscaled: Does the same alignment as the "enu" mode with the only difference that the model's original scale is preserved. This is useful for model display or to avoid numerical instabilities for large extent models.

src/exe/model.cc Outdated Show resolved Hide resolved
src/exe/model.cc Outdated Show resolved Hide resolved
src/exe/model.cc Outdated Show resolved Hide resolved
src/exe/model.cc Outdated Show resolved Hide resolved
src/exe/model.cc Outdated Show resolved Hide resolved
src/exe/model.cc Outdated Show resolved Hide resolved
src/exe/model.cc Outdated Show resolved Hide resolved
src/exe/model.cc Outdated Show resolved Hide resolved
src/exe/model.cc Outdated Show resolved Hide resolved
src/exe/model.cc Outdated Show resolved Hide resolved
@ahojnnes
Copy link
Contributor

Thanks Antonios for the fixes, LGTM.

@ahojnnes ahojnnes enabled auto-merge (squash) March 30, 2021 08:25
@ahojnnes ahojnnes merged commit 82f2a45 into colmap:dev Mar 30, 2021
@anmatako anmatako deleted the public/model-aligner branch March 30, 2021 14:55
lucasthahn pushed a commit to TNE-ai/colmap that referenced this pull request Aug 17, 2022
* New functionality in model_aligner

* Remove unused constructor

* Address PR comments

* Remove duplicate comments

* Fix unit test to work on all platforms

* Update similarity_transform.cc

Co-authored-by: Antonios Matakos <anmatako@dss.microsoft.us>
Co-authored-by: Antonios Matakos <anmatako@microsoft.com>
Co-authored-by: Johannes Schönberger <jsch@demuc.de>
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