-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Compute reprojection error in generalized absolute solver #1257
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
Conversation
Non-static data member initialization was apparently added in GCC 4.7 (https://gcc.gnu.org/projects/cxx-status.html#cxx11) and COLMAP requires at least 4.9 on Linux. |
Thanks Paul. Have not had time to look into this until now. One problem with this approach arises when the intrinsics of the different cameras in the rig are different. Then the single reprojection threshold in normalized coordinates will correspond to different pixel values in the different cameras. It might be worth noting that in a comment somewhere. |
Thanks @ahojnnes for the comment. This is indeed a problem and I don't see an easy way to get around this. I thus added a warning to the docstring. I usually compute the normalized threshold using the average of the focal lengths over all cameras in the rig. |
* Add reprojection error to GP3P * Update tests * Fix style * Add warning * Update generalized_absolute_pose.h * Update generalized_absolute_pose.cc Co-authored-by: Johannes Schönberger <jsch@demuc.de>
Currently the generalized absolute pose solver computes the squared cosine similarity:
colmap/src/estimators/generalized_absolute_pose.cc
Lines 319 to 321 in cf4a39c
This is not consistent with the single-camera solver, which uses the squared reprojection error, and makes it tricky to tune the RANSAC inlier threshold. This PR allows the GP3P solver to optionally instead compute the reprojection error.
Catch: in-class initialization of non-static data members requires C++>=11, but afaik COLMAP already assumed C++11.
@mihaidusmanu @ahojnnes @mgprt