pub type LocalizationRansac = PnPRansac<PnpMinimalSolver>;Expand description
The RANSAC PnP estimator of the default LocalizationPipeline: its
minimal solver is chosen at run time by LocalizationConfig::pnp_solver.
Aliased Type§
pub struct LocalizationRansac {
pub pose_estimator: PnpMinimalSolver,
pub pose_refiner: Option<GaussNewtonPoseRefiner>,
pub iterations: usize,
pub reprojection_threshold: f64,
pub seed: u64,
pub early_stop_min_iterations: usize,
pub early_stop_inlier_ratio: Option<f64>,
pub confidence: Option<f64>,
pub inlier_refits: usize,
}Fields§
§pose_estimator: PnpMinimalSolver§pose_refiner: Option<GaussNewtonPoseRefiner>§iterations: usize§reprojection_threshold: f64§seed: u64§early_stop_min_iterations: usizeStop the RANSAC search after this many trials when
early_stop_inlier_ratio is also satisfied. Set the ratio to None
to force the full iteration budget.
early_stop_inlier_ratio: Option<f64>Optional consensus-ratio threshold for early termination. This keeps high-consensus PnP pairs from spending the full budget scoring near-identical hypotheses.
confidence: Option<f64>COLMAP-style dynamic iteration budget: when set, iterations becomes
a maximum cap and the search stops as soon as the best model’s
inlier ratio implies, with this confidence, that enough samples have
been drawn (needed = log(1-conf)/log(1-w^s), standard RANSAC
termination). None keeps the fixed budget.
inlier_refits: usizeAfter the final refinement, re-collect the inliers of the refined pose and refine again on them, up to this many times (until the set stops changing or a round does not improve the score). The RANSAC winner comes from a three-point sample, so its inliers can include outliers that happen to sit within the threshold of that noisy pose, and the least-squares refinement fits them too. 0 (the default) keeps the single refinement on the winner’s inliers.