8000 Ensure DecomposeHomographyMatrix() always returns rotations by dger1 · Pull Request #1040 · colmap/colmap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ensure DecomposeHomographyMatrix() always returns rotations #1040

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

Merged
merged 1 commit into from
Nov 5, 2020

Conversation

dger1
Copy link
Contributor
@dger1 dger1 commented Nov 4, 2020

DecomposeHomographyMatrix() sometimes returns reflection matrices instead of rotations.

This results in invalid quaternions in two view geometry estimation:

qvec = RotationMatrixToQuaternion(R);

Adding a fix here which just involves making sure the homography matrix has positive determinant before applying the formulas from the paper.

Also added a unit test, and confirmed it fails about half the time without this change.

@ahojnnes
Copy link
Contributor
ahojnnes commented Nov 5, 2020

Great, thank you!

@ahojnnes ahojnnes merged commit 31b9d9d into colmap:dev Nov 5, 2020
@dger1 dger1 deleted the homography_rotation_fix branch November 5, 2020 16:16
lucasthahn pushed a commit to tne-ai/colmap that referenced this pull request Aug 17, 2022
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
0