Skip to content

PosePriorBundleAdjusterOptions::ransac_max_error hasn't been used in PosePriorBundleAdjuster #2992

@StonerLing

Description

@StonerLing

The maximum RANSAC error for Sim3 alignment from reconstruction to pose prior is calculated from average position covariance:

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.

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(); 
 } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions