-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
The maximum RANSAC error for Sim3 alignment from reconstruction to pose prior is calculated from average position covariance:
colmap/src/colmap/estimators/bundle_adjustment.cc
Lines 1023 to 1029 in 290ec62
| if (num_covs > 0) { | |
| ransac_options.max_error = (3. * (avg_cov / num_covs).cwiseSqrt()).norm(); | |
| } | |
| Sim3d metric_from_orig; | |
| const bool success = AlignReconstructionToPosePriors( | |
| reconstruction_, pose_priors_, ransac_options, &metric_from_orig); |
But the member ransac_max_error in PosePriorBundleAdjusterOptions isn't taken into consideration.
colmap/src/colmap/estimators/bundle_adjustment.h
Lines 200 to 210 in 290ec62
| struct PosePriorBundleAdjustmentOptions { | |
| // Whether to use a robust loss on prior locations. | |
| bool use_robust_loss_on_prior_position = false; | |
| // Threshold on the residual for the robust loss | |
| // (chi2 for 3DOF at 95% = 7.815). | |
| double prior_position_loss_scale = 7.815; | |
| // Maximum RANSAC error for Sim3 alignment. | |
| double ransac_max_error = 0.; | |
| }; |
I think the interface options should have higher priority. It may be modified like this:
if (num_covs > 0) {
ransac_options.max_error = prior_options_.ransac_max_error > 0. ?
prior_options_.ransac_max_error : (3. * (avg_cov / num_covs).cwiseSqrt()).norm();
}