8000 Fix cost functions for pose graph optimization by B1ueber2y · Pull Request #2601 · colmap/colmap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix cost functions for pose graph optimization #2601

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 4 commits into from
Jun 19, 2024

Conversation

B1ueber2y
Copy link
Contributor
@B1ueber2y B1ueber2y commented Jun 19, 2024

Just found a long-standing bug from #2378 in both cost functions in pose graph optimization:

After LLT it should be L_matrix.transpose() rather than L_matrix that is left multiplied on the residuals.

Moreover, SVD is faster and more stable compared to covariance.inverse().llt(). I have updated this as well.

@B1ueber2y B1ueber2y requested review from sarlinpe and ahojnnes June 19, 2024 10:04
@B1ueber2y
Copy link
Contributor Author

This only affects a covariance that is non-diagonal so might be overlooked for ages.

@B1ueber2y
Copy link
Contributor Author
B1ueber2y commented Jun 19, 2024

OK an update to this. While the approach from SVD is more robust to ill-conditioned covariance and gives correct residuals for least squares problems, the resulting submatrix is not necessarily lower-triangular, resulting in potentially different ordering of the residuals (which will not pass the unit test since we are testing each dimension of residuals there).

I have reverted the SVD to inverse + llt for now and will leave it to the users to make sure that the covariance is well-conditioned.

@ahojnnes ahojnnes enabled auto-merge (squash) June 19, 2024 13:36
@ahojnnes ahojnnes merged commit 581b38e into colmap:main Jun 19, 2024
15 checks passed
@B1ueber2y B1ueber2y deleted the fix/covariance_cost branch June 19, 2024 13:45
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