Skip to main content

StereoReplenishConfig

Struct StereoReplenishConfig 

Source
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: usize

Cap 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: StereoBootstrapConfig

Stereo match / triangulate / reprojection gates applied to the same-instant cam0/cam1 pair. Reused verbatim from the bootstrap path.

§anchor_keypoint_match_radius_px: f64

Radius (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: f64

Radius (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: f64

Minimum 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: f64

Minimum triangulated depth (m) in the current cam0 frame. Independent, tunable re-check of StereoBootstrapConfig::min_depth_meters.

§max_depth_meters: f64

Maximum triangulated depth (m) in the current cam0 frame. Independent, tunable re-check of StereoBootstrapConfig::max_depth_meters.

Trait Implementations§

Source§

impl Clone for StereoReplenishConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StereoReplenishConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StereoReplenishConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for StereoReplenishConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for StereoReplenishConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V