pub struct StereoReplenishConfig {
pub max_candidates_per_frame: usize,
pub bootstrap_config: StereoBootstrapConfig,
pub anchor_keypoint_match_radius_px: f64,
pub anchor_keypoint_max_descriptor_distance: Option<f32>,
pub duplicate_suppression_radius_px: f64,
pub min_parallax_deg: f64,
pub min_depth_meters: f64,
pub max_depth_meters: f64,
}Expand description
Tunable knobs for build_stereo_replenish_candidates.
Defaults are deliberately permissive: replenishment only helps if it
actually admits new landmarks, so the gates are sized to reject
clearly-degenerate / duplicate geometry without strangling recall. Values
mirror StereoBootstrapConfig::default’s own gates (2.0 px reprojection,
0.1–50.0 m depth) where the two overlap.
Fields§
§max_candidates_per_frame: usizeCap on accepted candidates returned per call. Survivors are processed
in left_keypoint_index order (the deterministic order
bootstrap_stereo_landmarks returns), so truncation is stable.
bootstrap_config: StereoBootstrapConfigStereo match / triangulate / reprojection gates applied to the same-instant cam0/cam1 pair. Reused verbatim from the bootstrap path.
anchor_keypoint_match_radius_px: f64Radius (px) around the reprojected anchor pixel within which a real detected anchor-keyframe keypoint must exist for the candidate to be accepted. The anchor observation uses both THAT keypoint’s index and its measured pixel coordinate; the stereo reprojection remains only a search prediction. A few pixels of slack absorbs the accumulated anchor-pose / current-pose error; too tight would strangle recall.
anchor_keypoint_max_descriptor_distance: Option<f32>Optional descriptor-distance gate between the candidate’s cam0
descriptor and the matched anchor keypoint’s descriptor (L2, via
BruteForceMatcher::l2_distance). None (default) disables it —
the geometric radius match is usually enough, and requiring
descriptor agreement across the (often large) anchor→current baseline
noticeably cuts recall.
duplicate_suppression_radius_px: f64Radius (px) for geometric duplicate suppression. Each of the anchor keyframe’s own existing landmark observations is reprojected into the current frame using the current tracked pose; any stereo survivor whose raw cam0 pixel lands within this radius of such a reprojection is dropped as a probable duplicate of an already-mapped point. This catches both PnP-outlier-but-really-matched keypoints and keypoints the descriptor matcher missed entirely (the more likely driver of duplicate landmarks). Kept small so genuinely new nearby structure still survives.
min_parallax_deg: f64Minimum parallax angle (degrees) between the ray from the anchor
camera centre to the triangulated world point and the ray from the
current camera centre to the same point. The downstream two-view
crate::LinearTriangulator re-triangulates the candidate from
exactly these two views, so a near-zero angle (stationary / tiny
baseline) yields a degenerate, depth-unstable solve. Small permissive
default; only rejects the clearly-degenerate tail.
min_depth_meters: f64Minimum triangulated depth (m) in the current cam0 frame. Independent,
tunable re-check of StereoBootstrapConfig::min_depth_meters.
max_depth_meters: f64Maximum triangulated depth (m) in the current cam0 frame. Independent,
tunable re-check of StereoBootstrapConfig::max_depth_meters.
Trait Implementations§
Source§impl Clone for StereoReplenishConfig
impl Clone for StereoReplenishConfig
Source§impl Debug for StereoReplenishConfig
impl Debug for StereoReplenishConfig
Source§impl Default for StereoReplenishConfig
impl Default for StereoReplenishConfig
Source§impl PartialEq for StereoReplenishConfig
impl PartialEq for StereoReplenishConfig
impl StructuralPartialEq for StereoReplenishConfig
Auto Trait Implementations§
impl Forget for StereoReplenishConfig
impl Freeze for StereoReplenishConfig
impl Move for StereoReplenishConfig
impl RefUnwindSafe for StereoReplenishConfig
impl Send for StereoReplenishConfig
impl Sync for StereoReplenishConfig
impl Unpin for StereoReplenishConfig
impl UnsafeUnpin for StereoReplenishConfig
impl UnwindSafe for StereoReplenishConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.