pub struct LoopAppearanceCandidateConfig {Show 14 fields
pub min_keyframe_id_gap: u64,
pub max_candidates_per_frame: usize,
pub min_similarity: f32,
pub min_candidate_landmark_count: usize,
pub covisibility_max_keyframes: usize,
pub covisibility_min_shared_landmarks: usize,
pub min_covisible_keyframe_verifications: usize,
pub max_covisibility_translation_disagreement_meters: f64,
pub max_covisibility_rotation_disagreement_radians: f64,
pub region_confirmation_required_keyframes: usize,
pub region_confirmation_max_misses: usize,
pub projection_search_radius_px: Option<f64>,
pub min_projection_correspondence_count: usize,
pub pnp_verifier: PnPLoopClosureVerifierConfig,
}Expand description
Opt-in appearance-based long-range loop-candidate source for
OnlineSlamLoopClosureRefinementConfig. The shared-landmark detector
(detect_loop_closure_candidates) can only ever propose candidates that
still reference the SAME map landmark ids the current frame’s inliers
carry; once the tracker drifts around a loop and revisits a place, the
mapper has typically re-triangulated fresh landmark ids for the very same
walls, so shared-id candidates are inherently short-range (near-in-time
keyframes only). This stream instead ranks past keyframes by cosine
similarity of their cached mean local descriptor against the current
frame’s, restricted to candidates at least min_keyframe_id_gap
keyframe-ids older — i.e. genuinely long-range, appearance-only place
recognition, mirroring
OnlineSlamRelocalizationAppearanceConfig’s retrieval machinery
(relocalization_mean_descriptor / cosine ranking) but tuned for
long-range loop detection rather than short-range recovery-after-loss.
Each ranked candidate keyframe is verified by building 2D-3D
correspondences via descriptor matching (current frame descriptors
against the candidate keyframe’s own observed landmarks’ descriptors —
there is no shared-id assembly to fall back to, by construction) and
running them through PnPLoopClosureVerifier configured by
pnp_verifier. Accepted candidates flow through the exact same
downstream fold as shared-landmark candidates (PCM / covariance gate /
PGO / GNC / write-back).
Fields§
§min_keyframe_id_gap: u64Minimum keyframe-id gap between the newly-registered keyframe and a candidate older keyframe. This is what makes the stream long-range: set it comfortably above the span the shared-landmark detector and local mapping window already cover.
max_candidates_per_frame: usizeMaximum number of appearance-ranked candidate keyframes verified per frame. Bounds the per-frame PnP-verification cost.
min_similarity: f32Minimum cosine similarity between the current frame’s mean local descriptor and a candidate keyframe’s cached mean local descriptor.
min_candidate_landmark_count: usizeMinimum number of descriptor-bearing landmarks a candidate keyframe
must observe before appearance verification runs against it. A
keyframe with fewer descriptors than pnp_verifier.min_inliers can
never pass the PnP gate anyway, so this is a cheap early reject.
covisibility_max_keyframes: usizeNumber of strongest covisible neighbors gathered on each side of a candidate, matching ORB-SLAM3’s ten-keyframe local-region search.
Shared landmark floor used to define a covisibility edge.
min_covisible_keyframe_verifications: usizeNumber of current-region keyframes that must independently PnP-verify against the matched candidate region. Includes the current keyframe.
max_covisibility_translation_disagreement_meters: f64Maximum translation disagreement between a neighbor’s independent PnP loop pose and the primary loop pose propagated through local odometry.
max_covisibility_rotation_disagreement_radians: f64Rotation counterpart of max_covisibility_translation_disagreement_meters.
region_confirmation_required_keyframes: usizeNumber of separate current keyframes that must verify the same covisible candidate region before it may enter the graph.
region_confirmation_max_misses: usizeConsecutive keyframes allowed to miss a pending region before reset.
projection_search_radius_px: Option<f64>Optional ORB-SLAM3-style post-PnP projection search radius. When set, the primary appearance PnP pose projects the candidate region into the current image, rematches only inside each landmark’s pixel window, and requires a second PnP verification before covisibility confirmation.
min_projection_correspondence_count: usizeMinimum one-to-one projection-guided correspondences required before the refined PnP solve. ORB-SLAM3 uses a 50-match pre-optimization gate; this remains configurable because visloc-rs uses SuperPoint rather than ORB descriptors and must measure its own correspondence distribution.
pnp_verifier: PnPLoopClosureVerifierConfigPnP RANSAC verifier thresholds. min_inliers defaults higher than
the shared-landmark PnP path’s default because a false long-range
loop closure is catastrophic (it can fold the whole trajectory into
a wrong basin), so this stream demands stronger evidence before
admitting a candidate.
Trait Implementations§
Source§impl Clone for LoopAppearanceCandidateConfig
impl Clone for LoopAppearanceCandidateConfig
Source§fn clone(&self) -> LoopAppearanceCandidateConfig
fn clone(&self) -> LoopAppearanceCandidateConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for LoopAppearanceCandidateConfig
impl Default for LoopAppearanceCandidateConfig
Source§fn default() -> LoopAppearanceCandidateConfig
fn default() -> LoopAppearanceCandidateConfig
impl StructuralPartialEq for LoopAppearanceCandidateConfig
Auto Trait Implementations§
impl Forget for LoopAppearanceCandidateConfig
impl Freeze for LoopAppearanceCandidateConfig
impl Move for LoopAppearanceCandidateConfig
impl RefUnwindSafe for LoopAppearanceCandidateConfig
impl Send for LoopAppearanceCandidateConfig
impl Sync for LoopAppearanceCandidateConfig
impl Unpin for LoopAppearanceCandidateConfig
impl UnsafeUnpin for LoopAppearanceCandidateConfig
impl UnwindSafe for LoopAppearanceCandidateConfig
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.