Skip to main content

Crate visloc_rs

Crate visloc_rs 

Source
Expand description

Visual localization foundation library built around reusable SfM / visual maps.

visloc-rs starts with map-based localization: connect query image features to 3D landmarks, estimate a camera pose with PnP + RANSAC, and return an inspectable LocalizationResult. SLAM, mapping, and sensor fusion are kept out of the initial core, but the type and trait boundaries leave room for those pipelines to be added later.

§Minimal Example

use nalgebra::{Point3, UnitQuaternion, Vector3};
use visloc_rs::prelude::*;

let camera = Camera::pinhole(1, 640, 480, 500.0, 500.0, 320.0, 240.0);
let pose = Pose::from_world_to_camera(UnitQuaternion::identity(), Vector3::zeros());
let point = Point3::new(0.0, 0.0, 5.0);

let mut map = VisualMap::new();
let mut landmark = Landmark::new(1, point);
landmark.descriptor = Some(vec![1.0, 0.0]);
map.landmarks.insert(1, landmark);

let query = QueryImage {
    camera: camera.clone(),
    keypoints: vec![camera.project(&pose.transform_world_point(&point)).unwrap()],
    descriptors: vec![vec![1.0, 0.0]],
};

let result = localize(query, map);
assert_eq!(result.correspondence_count, 1);

Most applications should start with LocalizationPipeline or ColmapMapProvider and then replace feature extraction, matching, candidate selection, or pose estimation through the exposed traits.

Re-exports§

pub use visloc_core as core;
pub use visloc_fusion as fusion;
pub use visloc_io as io;
pub use visloc_localization as localization;
pub use visloc_mapping as mapping;
pub use visloc_navigation as navigation;
pub use visloc_objects as objects;
pub use visloc_slam as slam;
pub use visloc_tracking as tracking;
pub use visloc_vision as vision;

Modules§

geometry
global_descriptor_onnx
In-Rust learned global-descriptor (visual place recognition) ONNX runtime.
global_descriptor_store
Restart-safe, bounded-memory storage for global image descriptors.
incremental_sfm
Incremental structure-from-motion from an unordered image set.
prelude
Common imports for applications using the default visual-localization stack.
superpoint_onnx
Phase-27 — in-Rust SuperPoint ONNX runtime.
types
verified_pair_snapshot
Lossless verified-pair snapshot codec shared by the SfM diagnostics.

Structs§

AdaptiveImuPoseMotionModel
Adaptive motion model that wraps an ImuPredictiveMotionModel and a ConstantPoseMotionModel and dispatches predict_pose through whichever inner model the per-frame failure / success counters select. Both inner models are kept fed at all times by Self::observe so the switch is instantaneous when it fires (the IMU’s pending-sample buffer and last-successful-pose anchor stay current even while constant-pose is dispatching predictions).
AdaptiveImuPoseMotionModelConfig
AdaptiveVelocityGateConfig
Adaptive refined-velocity writeback gate for OnlineSlamLocalBaConfig.
AllLandmarksSelector
AllMapSelector
AppearanceLoopCandidateBuildResult
Build and PnP-verify appearance-based long-range loop-closure candidates for frame against the per-keyframe mean descriptors cached in descriptor_cache (see OnlineSlamLoopClosureRefinementState::appearance_descriptor_cache).
AppearanceLoopCandidateDiagnostic
Per-candidate evidence retained after primary PnP succeeds, so threshold changes can be based on measured covisibility support rather than only an aggregate accept/reject count.
AppearanceLoopScannerSettings
Tunables for OnlineSlamPipeline::scan_appearance_loops. Mirrors PairwiseLoopClosureScannerConfig but with names that emphasise the pipeline-level use (“how aggressively should the periodic scan run?”). Defaults are chosen so a typical local-mapping window doesn’t get confused for a loop, and so visually disjoint keyframes are rejected before the verifier ever fires.
AppliedMapUpdate
AtlasSubmap
BaConfig
Configuration for BundleAdjustment::optimize.
BaIterationStats
BaObservation
One 2D image-point measurement linking a keyframe to a landmark.
BaResult
BaRigObservation
One observation from an arbitrary sensor rigidly attached to a shared rig frame. poses[keyframe_id] stores T_rig<-world; the fixed extrinsic is T_sensor<-rig. This is the non-central counterpart of BaObservation and allows every sensor pixel to constrain one body pose without requiring a same-landmark observation in a designated left camera.
BaStereoObservation
One rectified-stereo measurement linking a keyframe to a landmark. The keyframe’s pose is the LEFT camera’s T_world_to_camera. The right camera is assumed rectified: shared intrinsics, optical axes parallel, and image rows aligned, so the right pixel only needs its horizontal coordinate (v_r = v_l). The shared baseline lives on BundleAdjustment.
BiasReleaseSchedule
A second, higher excitation gate gating when MotionBasedViInitializer is allowed to release the gyro/accel bias slots to the LM solver.
BruteForceMatcher
BundleAdjustment
Bundle-adjustment problem: poses, landmarks, observations, plus a single shared pinhole camera (multi-camera support is left as a future extension).
BundleAdjustmentRefiner
LocalRefiner implementation that runs windowed bundle adjustment on a staged map update. Existing keyframes and landmarks in the window (already in VisualMap) are added as fixed gauge; the newly-staged keyframe poses and landmark positions are the BA variables. Observations from both the existing window and the staged update feed the residual.
Camera
ChordalRotationInit
Diagnostics from PoseGraph::initialize_rotations_chordal.
ColmapExportSummary
Summary of a write_colmap_text_model_for_3dgs call.
ColmapMapProvider
ConstantPoseMotionModel
ConstantVelocityMotionModel
CornerDeepAdapter
Adapter that exposes any CornerFeatureExtractor through the deep interface, using the (already L2-clippable) patch descriptor and a constant score. Useful for A/B testing the deep contract while keeping the classical extractor untouched.
CornerFeatureConfig
CornerFeatureExtractor
Correspondence2D3D
CorrespondenceBuilder
CorrespondenceSet
CovisibilityKeyframeScore
A keyframe ranked by how many selected landmarks it shares.
CovisibilityLocalBaConfig
Configuration for refine_visual_map_with_covisibility_ba.
CovisibilityLocalBaResult
Result of one covisibility local-BA solve.
CovisibilityLocalBaSelection
Selection diagnostics for one covisibility local-BA problem.
CovisibilityLocalMapConfig
CrossCheckMatcher
CrossSubmapAlignmentConfig
Appearance retrieval and independent metric-scale checks applied before a cross-submap PnP bridge is admitted to the Atlas.
CrossSubmapAlignmentResult
CrossSubmapBoundaryFactorResult
Auditable result of a DROID-style boundary factor: descriptors are matched directly between the last tracked frame of the old submap and the stereo seed of the new submap, then verified in metric 3D before Atlas admission.
CrossSubmapCandidateDiagnostic
CrossSubmapLandmarkMatch
CrossSubmapScaleEstimate
CrossSubmapWindowAlignmentResult
Aggregate result for a broader recovery pass over multiple retained source keyframes. Individual alignment diagnostics remain available so callers can audit which boundary/current view supplied the verified bridge.
DeepFeatureSet
Output of a deep-style feature extractor: keypoints, scores, and unit-norm descriptors. Convertible to FeatureSet via DeepFeatureSet::into_feature_set for use with classical matchers.
DescriptorMatch
DltPnP
EssentialMatrixLoopClosureVerifier
Geometric verifier that runs the classical essential-matrix RANSAC from visloc-vision::two_view on the supplied correspondences and reports inlier statistics, mean Sampson error, and a combined score.
EssentialMatrixVisualOdometryConfig
Configures the essential-matrix VO frontend. The Sampson threshold and RANSAC iteration count tune the inlier search; default_translation_scale is the scale applied when no per-pair scale is supplied.
EssentialMatrixVisualOdometryFrontend
Two-view VO frontend backed by the classical essential-matrix RANSAC pipeline in visloc-vision. Compared to TwoViewMatchVisualOdometryFrontend — which estimates a translation-only flow — this frontend recovers a full SE3 relative pose (rotation + scaled translation) and reports inliers against the Sampson distance.
ExternalDeepFeature
ExternalDeepFeatureSet
ExternalDeepMatch
ExternalDeepMatchSet
FeatureSet
FixedLandmarkSelector
FixedLandmarkSubmapSelector
FnFeatureExtractor
Frame
FrameLocalizationResult
FramePriorSource
FramePriorSyncEvaluationConfig
FramePriorSyncEvaluationResult
FramePriorSyncSummary
FrameTimestampIndex
GaussNewtonPoseRefiner
GeneralizedCameraRig
Validated sensor geometry used by generalized absolute pose.
GeneralizedCorrespondence2D3D
One world-point to rig-sensor pixel correspondence.
GeneralizedDltPoseEstimator
Linear non-central absolute-pose initializer.
GeneralizedGaussNewtonPoseRefiner
Shared-rig nonlinear pose refiner.
GeneralizedPnPRansac
Deterministic pixel-space RANSAC for one generalized rig frame.
GeneralizedRansacReport
Generalized-camera RANSAC result.
GlobalReconstructionTuning
Tunables for reconstruct_global_sfm beyond the shared incremental- mapper config (which supplies triangulation gates and the BA recipe).
GlobalSfmEdge
One verified pairwise constraint between two views of the view graph.
GlobalSfmPoses
Result of the global pose solve.
GnssMeasurement
GravityPrior
Rotation-alignment gravity prior on every non-fixed pose.
GravityVelocityAlignment
Outcome of estimate_gravity_and_velocities: the world-frame gravity vector recovered from IMU preintegration factors against FIXED visual poses, plus the per-keyframe velocities that come along for free from the same linear solve.
GrayscaleImage
GyroBiasAlignment
Outcome of estimate_gyro_bias: the shared gyro bias recovered from ROTATION-ONLY alignment against a window’s fixed visual poses, run BEFORE gravity/velocity alignment — see docs/motion_based_vi_alignment.md’s “Gyro-bias recovery” section for the motivating real-data diagnosis and the full derivation.
HogLikeFeatureConfig
Configuration for HogLikeFeatureExtractor.
HogLikeFeatureExtractor
Deep-style feature extractor with classical SIFT/HOG-flavored descriptors. Output descriptors are unit-norm 128-D vectors so they pair directly with cosine-similarity matchers (e.g. super::super::matching::mutual_softmax::MutualSoftmaxMatcher).
HybridLoopClosureVerifier
Loop-closure verifier that consults both the essential-matrix and PnP backends and reports a consensus decision: the candidate is accepted iff both verifiers accept it AND their recovered relative poses agree to within the configured rotation / translation-direction tolerances. This catches ambiguity where a 2D-2D essential fit looks plausible but disagrees with the 3D map structure (or vice versa).
HybridLoopClosureVerifierConfig
Configuration for HybridLoopClosureVerifier: maximum allowed disagreement between the essential-matrix and PnP recovered poses before the hybrid verifier rejects the candidate as inconsistent.
ImageLocalizer
ImageSequenceSummary
ImageTracker
ImuMeasurement
ImuPredictiveMotionModel
Inertial pose predictor: a “loosely coupled” replacement for ConstantPoseMotionModel / ConstantVelocityMotionModel that integrates body-frame IMU samples forward from the previous successful pose to produce the next pose prior. Mirrors the inputs of crate::Tracker’s motion-model slot so it can be dropped in via Tracker::new_with_motion_model.
ImuPredictiveMotionModelConfig
Static parameters for ImuPredictiveMotionModel.
ImuPreintegratedDelta
Output of pre-integrating a window of IMU samples between two keyframes. Quantities are in keyframe-i’s body frame and gravity-free; the BA-side residual combines them with the world-frame gravity vector and the global (R, v, p) of both keyframes.
ImuPreintegrationFactor
BA-side pre-integration factor connecting two keyframes with the gravity-compensated (ΔR, Δv, Δp) produced by ImuPreintegrator. The optional bias-correction path (Self::residual_with_bias_correction) lets a BA-side solver shift the integrator’s linearisation point without re-running the pre- integration, using the first-order Jacobians stored on ImuPreintegratedDelta.
ImuPreintegrator
Accumulator that ingests body-frame IMU samples one at a time and maintains a running ImuPreintegratedDelta. Construct with ImuPreintegrator::new (no bias) or ImuPreintegrator::new_with_bias when the IMU-side bias estimate is known; in either case, the accumulator subtracts the supplied bias from every gyro / accel sample before integrating, and accumulates the first-order bias-Jacobians of the running delta (Forster eq. 35-39).
InMemoryMapProvider
IncrementalSfmConfig
Tunable knobs for incremental_sfm.
IncrementalSfmResult
Output of incremental_sfm.
IntersectCandidateSelector
KabschRansacConfig
Configuration for estimate_relative_pose_kabsch_ransac.
KabschRansacReport
Output of estimate_relative_pose_kabsch_ransac.
Keyframe
KeyframeDecision
KeyframePolicyConfig
KittiImageSequence
KittiOdometryBenchmarkConfig
KittiOdometryBenchmarkSummary
KittiOdometrySegmentError
KittiOxtsRecord
OXTS sample with its synchronised timestamp.
KittiOxtsSample
One synchronised OXTS sample (parsed from a single oxts/data/<frame_id>.txt).
KittiProjection
KittiTrajectoryParseError
Landmark
LandmarkCandidate
LandmarkCandidateMappingFailure
LandmarkCandidateObservation
LandmarkCandidateValidationConfig
LandmarkCandidateValidationReport
LandmarkDescriptorStore
LinearTriangulator
LoadedImageFrame
LocalMapWindow
LocalMapWindowConfig
LocalMappingPipeline
LocalMappingResult
LocalRefinementResult
LocalizationConfig
LocalizationPipeline
LocalizationPrior
LocalizationResult
LocalizationSuccess
LoopAppearanceCandidateConfig
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.
LoopCandidatePair
An appearance-proposed loop candidate (older revisited frame ← newer query frame), before geometric verification.
LoopCandidateVerificationDiagnostic
Geometry-verification diagnostics for one appearance-proposed loop candidate. This is intended for benchmark artifacts and failure analysis: it records candidates that were never attempted because of max_verifications as well as candidates rejected by PnP.
LoopClosureCandidate
LoopClosureConfig
LoopClosureConstraint
Pose-graph-style constraint between two keyframes derived from a verified loop-closure candidate. This is intentionally a lightweight data type — no solver lives in this crate yet — so downstream optimization layers can adopt it without committing to a specific backend.
LoopClosureVerification
Output of running a LoopClosureVerifier on a candidate.
LoopClosureVerifierConfig
Configuration thresholds for EssentialMatrixLoopClosureVerifier.
MapAtlas
MapProviderStats
MapUpdateValidationReport
MaterializedAtlas
MeasurementBuffer
MotionBasedViInitializationResult
VIBA1 / VIBA2 outcome.
MotionBasedViInitializer
State machine that fires a single VIBA1 inertial-only solve once the keyframe count + cumulative-translation thresholds are met. See the module docstring and the design note docs/motion_based_vi_alignment.md for the full contract.
MotionBasedViInitializerConfig
Configuration for MotionBasedViInitializer.
MotionViRawResidualActivationConfig
MultiScaleDeepConfig
Configuration for MultiScaleDeepExtractor.
MultiScaleDeepExtractor
Wraps a single-scale DeepFeatureExtractor with image pyramid detection so it can recover features across multiple scales. Each keypoint produced by an octave is rescaled into the original image’s pixel coordinates, so downstream consumers (essential RANSAC, PnP, scanner) can treat the merged output exactly like a single-scale extraction. The descriptor itself is unchanged from the inner extractor’s output: at coarser octaves the descriptor patch covers a larger world-space region, which is exactly the scale invariance classical multi-scale frontends rely on.
MutualSoftmaxConfig
Configuration for MutualSoftmaxMatcher.
MutualSoftmaxMatcher
LightGlue-style matcher operating on unit-norm descriptors. See module docs.
NoopLocalRefiner
NoopVisualOdometryFrontend
Observation
OnlineBaImuStateRow
Per-(trigger, keyframe) summary of the streaming IMU refinement state — one entry per row produced by write_online_ba_imu_state_csv. Exposed so callers that want to post-process the same data programmatically don’t have to re-parse the CSV.
OnlineBaTriggerStats
Per-trigger BA outcome, exposed so callers can inspect the LM trace, the number of tracks/observations refined, and how many poses the trigger touched.
OnlineSlamAdmittedLoopConstraint
One loop-closure constraint admitted into the running pose graph this frame, with enough detail for external diagnostics (e.g. a per-frame CSV log distinguishing shared-landmark from appearance-sourced closures). Reported on OnlineSlamLoopClosureRefinementStats::admitted_constraints; does NOT include constraints admitted via the pcm_batch_rescreen promotion path (those remain counted only in OnlineSlamLoopClosureRefinementStats::loop_closures_pcm_promoted).
OnlineSlamConfig
OnlineSlamCovisibilityLocalBaConfig
Per-session configuration for visual-only covisibility local BA inside OnlineSlamPipeline.
OnlineSlamCovisibilityLocalBaStats
Per-frame outcome of the visual-only covisibility local BA stage. Exposed on OnlineSlamResult::covisibility_local_ba; Some only when the stage was configured, a new keyframe was applied, and the trigger interval fired.
OnlineSlamLocalBaConfig
Configuration for the sliding-window local VI-BA stage.
OnlineSlamLoopClosureRefinementConfig
Per-session configuration for the online loop-closure + pose-graph refinement stage owned by OnlineSlamPipeline. When attached via OnlineSlamConfig::pose_graph_refinement, the pipeline maintains a running PoseGraph mirror of map.keyframes, runs the configured LoopRefinementVerifier on every candidate emitted by detect_loop_closure_candidates, and folds verified LoopClosureConstraints into the graph. When trigger_every_new_constraints new verified edges have accumulated since the last solve, PoseGraph::optimize_se3_iterative runs and the optimised keyframe poses are written back into the map.
OnlineSlamLoopClosureRefinementState
Running state for the online loop-closure + pose-graph refinement stage. Lives on OnlineSlamPipeline when OnlineSlamConfig::pose_graph_refinement is Some.
OnlineSlamLoopClosureRefinementStats
Per-frame outcome of the online loop-closure + pose-graph refinement stage. Exposed on OnlineSlamResult::pose_graph_refinement and used by the demos to audit verifier acceptance + PGO trigger cadence.
OnlineSlamMotionViInitConfig
Pipeline-level configuration for the motion-based VI init stage.
OnlineSlamPipeline
OnlineSlamRejectedLoopConstraint
A verified loop measurement rejected before graph insertion. Keeping the measurement is essential for deciding offline whether a robust gate caught a false closure or over-rejected a ground-truth-consistent one.
OnlineSlamRelocalizationAppearanceCandidate
One appearance-retrieval keyframe candidate considered by the relocalization recovery path.
OnlineSlamRelocalizationAppearanceConfig
OnlineSlamRelocalizationConfig
Per-session configuration for the relocalization-on-tracker-death stage owned by OnlineSlamPipeline. When attached via OnlineSlamConfig::relocalization, the pipeline owns a LocalizationPipeline and runs it against the full visual map on every frame whose primary track_frame call returned localization.success == false. The recovered solution is accepted when it clears every gate below; on acceptance, the tracker’s history is overwritten via Tracker::accept_relocalization_result and the frame proceeds through the rest of process_frame as if primary tracking had succeeded.
OnlineSlamRelocalizationCovisibilityConfig
OnlineSlamRelocalizationState
Running state for the relocalization-on-tracker-death stage. Lives on OnlineSlamPipeline when OnlineSlamConfig::relocalization is Some. Owns a dedicated LocalizationPipeline with default thresholds so the relocalization attempt is independent of the tracker’s own (typically much stricter, motion-prior-dependent) localization pipeline.
OnlineSlamRelocalizationStats
Per-frame outcome of the relocalization-on-tracker-death stage. Exposed on OnlineSlamResult::relocalization; Some only on frames where the stage actually attempted a recovery (i.e. the primary tracker returned success == false AND the stage was enabled).
OnlineSlamResult
OnlineSlamViInitConfig
Optional auto-bootstrap stage that runs a crate::VisualInertialInitializer over the pipeline’s incoming IMU stream and atomically promotes the recovered (R_w←b, b_g, b_a) into the running pre-integrator on the first keyframe.
OnlineStereoVoBa
Sliding-window stereo VO + BA composition.
OnlineStereoVoBaConfig
Configuration for OnlineStereoVoBa.
OrderedPairCandidate
One unique, normalized image pair and all policies that proposed it.
OrderedPairGeneratorConfig
Pair-generation policy shared by sequential SfM frontends.
OrderedPairHints
Optional dynamic inputs produced by tracking, retrieval, or track mining.
P3PGrunert
Grunert’s P3P solver: P3P fixed to P3PSolver::Grunert.
PairwiseKeyframeView
One keyframe’s appearance in a pairwise loop-closure scan: the frame id is what the produced LoopClosureCandidate uses for query_frame_id / matched_keyframe_id. The keypoint and descriptor slices are typically borrowed from a FeatureSet (see PairwiseKeyframeView::from_features).
PairwiseLoopClosureScannerConfig
Configuration for scan_pairwise_loop_closures.
PairwiseMatches
Geometrically verified matches between two images of the set. The match indices are keypoint indices into features[image_i] / features[image_j], and are assumed to have already survived an essential-matrix RANSAC (i.e. they are inliers, not raw descriptor nearest neighbours).
PairwisePoseFactor
A relative-pose constraint between two BA keyframes, e.g. an IMU pre-integration delta, a wheel-odometry tick, or an external pose-graph edge being lifted into BA.
PerImageCameras
Validated, index-aligned per-image pinhole calibrations.
PerPoseGravityObservation
Per-keyframe observation of the gravity direction in camera coordinates. Each entry constrains R_wc ツキ g_world 竕・g_camera_observed at the named keyframe; the residual and Jacobian shape are identical to GravityPrior’s global pose-independent variant, except the observation is sourced per-keyframe rather than shared across all poses.
PerPoseGravityPrior
Per-keyframe gravity-alignment prior. Each PerPoseGravityObservation adds a rotation-domain residual at its keyframe; the prior as a whole shares a single world-frame gravity vector and stiffness.
PnPLoopClosureVerifier
PnP-based loop-closure verifier. Reuses the project’s PnPRansac to re-localize the current frame against landmarks observed by the candidate keyframe; if the recovered absolute pose has enough inliers and a small reprojection error, the candidate is accepted and the relative pose (older keyframe → current frame) is filled into LoopClosureVerification::relative_pose.
PnPLoopClosureVerifierConfig
Configuration thresholds for PnPLoopClosureVerifier.
PnPRansac
Pose
PoseCovariance
PoseEstimationFailureDiagnostics
PoseEstimatorDiagnostics
PoseGraph
Sparse pose graph keyed by keyframe id. Stores per-node poses plus a flat list of sequential and loop-closure edges, and provides a single translation-only Gauss-Newton step that keeps node rotations fixed.
PoseGraphEdge
Edge in a sparse PoseGraph. Encodes a measured previous_to_current SE3 between two keyframes plus a positive weight used by translation-only least squares.
PoseGraphOptimizationStep
Single Gauss-Newton step diagnostics.
PoseGraphSe3Config
Configuration for PoseGraph::optimize_se3_iterative.
PoseGraphSe3IterationStats
Per-iteration diagnostics for PoseGraph::optimize_se3_iterative.
PoseGraphSe3Result
Result of a full SE(3) Gauss-Newton run.
PosePriorMeasurement
PosePriorVisualOverrideConfig
PoseTrajectory
PositionCovariance
PositionPrior
A bundle of per-keyframe absolute position constraints.
PositionPriorObservation
One absolute position measurement for a single keyframe. The expected world-frame camera centre is compared against the BA’s current estimate of 竏坦盞€ ツキ t. Designed for translation-domain priors fed from GNSS, an external altimeter, or 窶・in evaluation scenarios 窶・ground-truth poses; the prior constrains TRANSLATION only, complementing GravityPrior which constrains ROTATION only.
PriorConfig
PriorSubmapSelector
ProjectionCorrespondenceBuilder
ORB-SLAM3-style projection-guided correspondence building: instead of matching every candidate landmark descriptor against every query descriptor (CorrespondenceBuilder’s all-vs-all search), each candidate landmark is projected into the query image with a pose prior and matched only against the query keypoints that fall within search_radius_px of the projection. This trades the appearance-only search for a much smaller, geometrically-gated candidate window per landmark, which both disambiguates repeated/near-duplicate descriptors (only one is ever in the window) and is materially cheaper when the map is large.
ProjectionGuidedTrackingConfig
ProvidedFeatureExtractor
QueryImage
RadialTangential
OpenCV-style radial-tangential distortion coefficients (k₁, k₂, p₁, p₂). The k₃ / higher-order radial term is intentionally not modelled — EuRoC and most automotive sensors publish only the 4-coefficient form, and adding k₃ later is an additive change to this struct, not a redesign.
RadiusLandmarkSelector
RadiusSubmapSelector
RansacReport
ReconstructedLandmark
A single reconstructed 3D point with its full multi-view track.
RelativePoseError
One relative-pose-error sample over a single Δ-spaced pair.
RelativePoseErrorConfig
Configuration for the TUM-style relative pose error (RPE).
RelativePoseErrorStatistics
Distribution statistics for one RPE channel (translation or rotation).
RelativePoseErrorSummary
Aggregated TUM-style relative pose error over all Δ-spaced pairs.
RigBaStats
RigCorrespondenceBuild
CSR plus the measurements collected while building it.
RigCorrespondenceCsr
Read-only compact CSR for rig-local observation correspondences.
RigCorrespondenceCsrBuilder
Deterministic builder for one rig-local observation graph.
RigCorrespondencePreviewStats
Preview measurements for a canonical rig-local correspondence graph.
RigFrame
Images captured at one timestamp and governed by one world -> rig pose.
RigFrameImage
One image and its calibrated sensor slot within a synchronized rig frame.
RigSensor
One calibrated sensor rigidly attached to a generalized camera rig.
RigSfmConfig
Conservative controls for generalized-rig incremental reconstruction.
RigSfmResult
Output poses retain both the physical frame state and derived image states.
RigSfmWorkStats
Counters used to prove that frontier growth stays proportional to sparse observation support rather than rescanning the frame/track Cartesian product.
SE3
SO3
SelectableMapProvider
SfmTrack
One reconstructed 3D point and the image observations that support it.
Sim3
A similarity transform in 3D: Sim(3) = (s, R, t), acting on a point as S · p = s · R · p + t.
Sim3Edge
Edge in a Sim3PoseGraph: a measured relative similarity measurement such that, at the solution, pose_to ≈ measurement ∘ pose_from.
Sim3PoseGraph
Sparse Sim(3) pose graph keyed by keyframe id.
Sim3PoseGraphConfig
Configuration for Sim3PoseGraph::optimize.
Sim3PoseGraphIterationStats
Per-iteration diagnostics for Sim3PoseGraph::optimize.
Sim3PoseGraphResult
Result of a full Sim3PoseGraph::optimize run.
SimpleKeyframePolicy
SparseFactorGraph
SparseFactorGraphConfig
SparseFactorGraphUpdateStats
SparseFactorKey
SparseFactorMeasurement
Optimizer-facing measurement carried by every edge. Geometric factors start with zero correction and isotropic information; learned update operators may replace these values in-place later.
SparseKeyframeFactor
StagedMapUpdate
StereoAdaptiveDepthGateConfig
Configuration for StereoDepthGate::Adaptive.
StereoBootstrapConfig
Tunable knobs for bootstrap_stereo_landmarks.
StereoBootstrapLandmark
A surviving triangulated stereo match.
StereoDepthGateDiagnostics
Per-frame diagnostics emitted by the stereo-depth gate.
StereoDepthGateState
Stateful memory for adaptive stereo-depth gating.
StereoFeature
One triangulated stereo feature, anchored to its descriptor index in the left FeatureSet.
StereoFeatureConfig
Configuration for triangulate_stereo_features. Defaults are tuned for rectified KITTI imagery.
StereoPairCorrespondence
One pair of metric 3D points (frame a and frame b) believed to be the same physical scene point. Used by estimate_relative_pose_kabsch_ransac.
StereoReplenishConfig
Tunable knobs for build_stereo_replenish_candidates.
StereoTrack
One multi-frame stereo track: a single landmark’s world-frame position (anchored from the seed frame’s stereo triangulation, lifted into world using the seed frame’s pose) plus its observations across one or more frames. Produced by extend_stereo_tracks_via_projection.
StereoTrackObservation
One observation contributed by a multi-frame StereoTrack.
StereoVoBaConfig
Configuration for refine_stereo_vo_with_ba.
StereoVoBaImuInput
IMU input wired into a stereo-VO BA refinement. The caller supplies n_frames − 1 sample windows: windows[i] covers the integration interval from keyframe i to keyframe i + 1. The refiner pre- integrates each window with ImuPreintegrator::new_with_bias at the initial bias linearisation point, registers a velocity / bias state per keyframe, and pushes an ImuPreintegrationFactor for every non-empty window. When bias_random_walk_weight is Some(w), every consecutive bias pair is also tied with a BiasRandomWalkFactor of weight w.
StereoVoBaImuRefinement
Refined IMU state from a BA solve that included StereoVoBaImuInput. The vectors are indexed by keyframe id (so entry i corresponds to initial_poses[i]). Keyframes that did not participate in any IMU factor have their velocity left at the build-time initial value and their bias at the input bias_*_init.
StereoVoBaImuSample
Single body-frame IMU sample for a stereo-VO BA inter-keyframe window. dt is the time elapsed since the previous sample (or since the window start for the first sample). gyro and accel are body-frame; gravity is not pre-subtracted from accel — the BA-side IMU factor handles gravity compensation through StereoVoBaImuInput::gravity_world.
StereoVoBaRefinement
Result of refine_stereo_vo_with_ba.
StereoVoFrontend
Stateful rectified-stereo VO frontend. Each process_pair call extracts features in both eyes, triangulates them, matches the previous frame’s left features against the new frame’s, and recovers the relative pose via 2D-3D PnP RANSAC with a 3D-3D Kabsch fallback. The first call seeds the world frame at identity; subsequent calls compose the recovered relative pose into the running world-frame trajectory.
StereoVoFrontendConfig
Configuration for StereoVoFrontend. Defaults are tuned for KITTI- scale rectified stereo with the project’s CornerFeatureExtractor patch descriptors at radius 9; tighter kabsch.inlier_threshold_m / looser stereo.max_depth_m may be appropriate for sequences with faster motion or longer-range structure.
StereoVoPairDiagnostics
StereoVoReconstruction
Output of reconstruct_stereo_vo_with_ba: a BA-grade sparse reconstruction (refined poses + merged multi-view landmark tracks) ready for COLMAP export.
SubmapIdRemap
SubmapMergeEvidence
SubmapMergeQuality
SubmapMergeVerificationConfig
TimeDelta
Timed
Timestamp
TrackBuildStats
Diagnostics from feature-track construction before triangulation.
TrackExtensionConfig
Configuration for extend_stereo_tracks_via_projection. Defaults are tuned for KITTI-scale per-frame motion (~1 m/frame at stride 1, ~7 m/frame at stride 8) and the project’s CornerFeatureExtractor descriptor scale.
Tracker
TrackingConfig
TrackingEvaluationConfig
TrackingEvaluationResult
TrackingResult
TrackingStats
TrajectoryErrorSummary
TrajectoryEvaluationConfig
TrajectoryEvaluationResult
TrajectorySample
TrajectorySimilarityTransform
TrajectorySummary
TrajectoryTranslationError
TriangulatedLandmark
TriangulationConfig
TumTrajectoryParseError
TwoViewFeatureMatch
TwoViewMatchSet
TwoViewMatchVisualOdometryConfig
TwoViewMatchVisualOdometryFrontend
Lightweight two-view VO frontend that turns externally supplied correspondences into a translation-only relative-pose estimate.
UnknownFocalLocalization
Result of LocalizationPipeline::localize_with_unknown_focal.
VerifiedSubmapMerge
Viba2Config
Configuration for run_viba2_inertial_with_scale — the outer-loop scale-recovery wrapper around run_inertial_only_vi_ba.
Viba2Stats
Outcome of run_viba2_inertial_with_scale.
VisualInertialInitializationResult
Outcome of a successful stationary-window initialisation. All fields are in SI units; angles are encoded as a unit quaternion.
VisualInertialInitializer
Stateful accumulator that ingests IMU samples one at a time and reports the recovered bootstrap as soon as the buffer satisfies every stationary-window predicate.
VisualInertialInitializerConfig
Configuration knobs for VisualInertialInitializer. The defaults match the EuRoC stationary holding period (gravity z-up, ~0.5 s of quiet samples, conservative noise thresholds).
VisualMap
VisualMapValidationReport
VisualOdometryEstimate
VisualOdometryPosePrior
VisualOdometryPriorProvider
VoLoopClosureConfig
Configuration for close_loops_on_vo_trajectory.
VoLoopClosureResult
Output of close_loops_on_vo_trajectory.

Enums§

AdaptiveMotionMode
Diagnostic snapshot of which inner motion model the adaptive wrapper is currently dispatching predictions through.
BaError
CalibrationError
CameraModel
Camera projection models understood by the shared geometry front-end.
ColmapError
CommonImageError
CornerFeatureError
CorrespondenceBuildError
CovisibilityLocalBaError
CrossSubmapCandidateFailureReason
DeepFeatureSetError
ExternalDeepError
FeatureSetError
FramePriorSyncEvaluationFailure
GlobalReconstructionError
Errors surfaced by reconstruct_global_sfm.
GrayscaleImageError
HogLikeFeatureError
ImageSequenceError
ImageSequenceValidationIssue
ImuVelocityRefreshPolicy
Configuration for the adaptive IMU↔ConstantPose motion model (AdaptiveImuPoseMotionModel).
IncrementalSfmError
Why incremental_sfm could not build a reconstruction.
KeyframeDecisionReason
KittiDatasetError
KittiOxtsError
LandmarkCandidateMappingFailureReason
LandmarkCandidateValidationIssue
LandmarkInit
Landmark initialisation strategy for refine_stereo_vo_with_ba. See StereoVoBaConfig::landmark_init.
LinearSolver
Linear solver backend used by pose-graph optimizers when the normal equations (H + λI) δ = -g (or the translation-only analogue) are solved.
LocalRefinementReason
LocalizationFailureReason
LoopClosureCandidateSource
Which stream a folded LoopClosureConstraint (reported on OnlineSlamLoopClosureRefinementStats::admitted_constraints) came from.
LoopClosureVerificationFailureReason
Reason a LoopClosureVerification rejected a candidate.
LoopRefinementSolver
Which pose-graph solver backs OnlineSlamLoopClosureRefinementConfig’s periodic PGO trigger.
LoopRefinementVerifier
Which geometric verifier OnlineSlamLoopClosureRefinementConfig runs on loop-closure candidates every frame.
MapAtlasError
MapUpdateValidationIssue
MotionBasedViInitializationStatus
Read-only snapshot of MotionBasedViInitializer’s internal state.
MotionBasedViRejectionReason
Why a MotionBasedViInitializer::try_initialize call returned without a fresh result.
MotionViInitializationEvent
State-transition event exposed on crate::OnlineSlamResult::vi_motion_init. Some only on the frame where the motion-based stage actually changed state.
MotionViInitializationStatus
Read-only snapshot of the motion-based VI init stage. Returned by crate::OnlineSlamPipeline::motion_vi_initialization_status.
NextImagePolicy
Ranking policy for the next image offered to incremental PnP registration.
OnlineSlamConfigError
Configuration-level error raised on crate::OnlineSlamPipeline::new (and exposed by crate::OnlineSlamConfig::validate) for invalid combinations the type system cannot rule out.
OnlineSlamLoopConstraintRejectionReason
Front-end gate that rejected an otherwise geometrically verified loop constraint before it entered the pose graph.
OrderedPairSource
Why an ordered view-graph pair was proposed.
PerImageCameraError
Errors returned while constructing or applying a per-image calibration set.
PerImageCameraGlobalError
Error from the per-image-camera global convenience wrapper.
PerImageCameraIncrementalError
Error from the per-image-camera incremental convenience wrapper.
PnpMinimalSolver
Minimal PnP solver chosen at run time; see the module docs.
PoseEstimationFailureReason
PoseGraphEdgeKind
Kind of an edge inside a PoseGraph.
PoseGraphError
Errors returned by PoseGraph::optimize_translations_once.
PoseGraphParseError
RigBaBackend
Bundle-adjustment backend used by the native calibrated-rig mapper.
RigCorrespondenceBuildError
Errors found before a rig-local CSR can be materialized.
RigSfmError
RigTrackBuilder
Deterministic feature-track construction policy for rig reconstruction.
RobustKernel
Robust kernel applied to each pose-graph edge’s residual norm-squared. Down-weights edges whose squared residual exceeds the kernel threshold so outlier loop closures cannot dominate the least-squares solve.
SensorLogError
SparseFactorInactiveReason
SparseFactorKind
SparseFactorState
StationaryRejectionReason
Diagnostic reason a stationary-window check failed.
StereoDepthGate
Runtime policy for the lower stereo-depth gate.
StereoRelativePoseMode
StereoVoBaError
StereoVoError
Errors returned by StereoVoFrontend::process_pair. The feature extractor’s error is type-erased into a Box<dyn Error> so the same StereoVoError type accepts any FeatureExtractor implementation (classical CornerFeatureExtractor, learned HogLikeFeatureExtractor, or a future ONNX-backed deep head).
TrackSource
Which algorithm builds step 1’s feature tracks from pairwise — the M2 port in docs/colmap_port_plan.md (“Persistent CorrespondenceGraph”). Self::UnionFind is the original ad hoc union-find ([build_tracks]), kept as the default (see the M2 results section in that doc for the ETH3D A/B that motivated staying opt-in rather than flipping the default). Self::CorrespondenceGraph instead builds the same tracks by routing through visloc_vision::two_view::correspondence_graph::CorrespondenceGraph ([build_tracks_via_graph]) — COLMAP’s persistent view-graph object, which also exposes NumObservationsForImage/NumCorrespondencesForImage/ ExtractTransitiveCorrespondences-style queries the union-find has no way to answer, for future milestones (M4’s transitive pairing, in particular). Both paths are proven to produce byte-identical tracks on this crate’s existing fixtures (see the graph_tracks_match_union_find_tracks_* tests).
TrackingEvaluationFailure
TrackingEvent
TrackingFailureReason
TrackingState
TrajectoryAlignment
TrajectoryEvaluationFailure
TrajectoryFileError
TriangulationFailureReason
TwoViewMatchError
ViInitFallback
Behaviour when the pipeline’s auto-bootstrap stage runs out of buffer space or wall-clock IMU duration without successfully recovering a stationary window.
ViInitializationEvent
State-transition event exposed on crate::OnlineSlamResult::vi_init. Some only on the frame where the auto-bootstrap stage actually transitioned state; None otherwise. The terminal events (Succeeded / GaveUp) are emitted at most once per sequence.
ViInitializationStatus
Read-only snapshot of the pipeline’s VI initialisation stage. Returned by crate::OnlineSlamPipeline::vi_initialization_status.
VisualMapValidationIssue
VoLoopClosureError
Error returned by close_loops_on_vo_trajectory.

Constants§

HOG_BINS
Number of orientation bins per HOG cell.
HOG_CELLS_PER_SIDE
Number of cells per side (final descriptor is CELLS_PER_SIDE^2 * HOG_BINS).
HOG_CELL_SIZE
Pixels per cell side. Patch side is HOG_CELLS_PER_SIDE * HOG_CELL_SIZE.
HOG_DESCRIPTOR_DIM
Total descriptor dimension.
KITTI_OXTS_FIELD_COUNT
Number of whitespace-separated fields expected in a KITTI OXTS data row.

Traits§

CandidateSelector
DeepFeatureExtractor
Deep-style frontend trait: produces keypoints with per-feature scores and unit-norm descriptors. Mirrors the output contract of SuperPoint/DISK so an ONNX-backed implementation can drop in later without touching consumers.
DescriptorProvider
FeatureExtractor
FrameLocalizer
KeyframePolicy
LocalRefiner
LocalizationPriorProvider
LoopClosureVerifier
Trait for a loop-closure candidate verifier. Concrete implementations receive 2D-2D correspondences in pixel coordinates between the older keyframe (previous_xy) and the current/query frame (current_xy) plus the shared camera intrinsics.
MapProvider
Matcher
MotionModel
PoseEstimator
PoseRefiner
RobustPoseEstimator
SubmapSelector
TimedMeasurement
Triangulator
VisualOdometryFrontend

Functions§

appearance_loop_candidate_descriptor_store
Build a visloc_core::types::LandmarkDescriptorStore scoped to a single keyframe’s own observed landmarks (no covisible-neighbor expansion). Used by build_appearance_loop_candidates to restrict descriptor-based correspondence building to exactly the candidate keyframe’s landmarks, since appearance candidates by construction share no landmark ids with the current frame. Returns None when the keyframe has no observations at all.
bearing_alignment_error_deg
Angular error in degrees between two unit bearings (antipodal-aware).
bootstrap_stereo_landmarks
Match descriptors between the two feature sets, triangulate each surviving pair, and return the matches that pass the configured depth / reprojection-error gates. Results are returned in left_keypoint_index order.
bootstrap_stereo_landmarks_from_correspondences
Triangulate known left→right correspondences (e.g. Basalt stereo optical flow) without descriptor matching. correspondences are (left_keypoint_index, right_pixel) pairs into left_keypoints.
build_appearance_loop_candidates
build_appearance_loop_candidates_with_diagnostics
build_pyramid
Build a 2× downsampled image pyramid by averaging 2×2 pixel blocks. Each successive level is half the width and half the height of the previous one. The averaging is a coarse low-pass filter that suffices for keypoint detection at coarser scales — Gaussian smoothing would be more faithful but adds a separable convolution this crate doesn’t currently need elsewhere. The first element of the returned Vec is the input image at scale 1.0, the second is at 0.5, etc. Levels stop when further downsampling would drop one of the dimensions to zero.
build_rig_correspondence
Build a compact rig-local CSR and return its preview statistics.
build_rig_correspondence_csr
Build a compact rig-local CSR from feature counts and verified pairs.
build_rig_correspondence_csr_from_features
Convenience wrapper using the existing feature-set representation.
build_stereo_metric_points
Triangulate same-instant stereo features into metric cam0-frame points, keyed by cam0 keypoint index. Unlike replenishment candidate construction, this requires neither a tracked pose nor an anchor keyframe and can run before online tracking/loop closure.
build_stereo_replenish_candidates
Build stereo-replenishment LandmarkCandidates for the current frame.
build_stereo_temporal_correspondences
Build 2D-3D correspondences for PnP between two consecutive frames, using frame-a’s stereo triangulations and frame-b’s left features.
close_loops_on_vo_trajectory
Close loops on an open stereo-VO trajectory and return the globally consistent poses.
close_loops_on_vo_trajectory_with_globals
Like close_loops_on_vo_trajectory but with the per-frame global descriptors supplied by the caller instead of computed internally as a k-means VLAD over the local SuperPoint descriptors.
close_loops_on_vo_trajectory_with_globals_and_loop_matches
Like close_loops_on_vo_trajectory_with_globals, but use caller-supplied descriptor matches for selected loop candidates. The key is (older, newer) and the match convention is query_index = newer left feature, train_index = older left feature. Candidates without an entry fall back to the built-in brute-force descriptor matcher.
close_loops_on_vo_trajectory_with_loop_matches
Like close_loops_on_vo_trajectory, but use caller-supplied descriptor matches for selected loop candidates. The key is (older, newer) and the match convention is query_index = newer left feature, train_index = older left feature. Candidates without an entry fall back to the built-in brute-force descriptor matcher.
common_image_sequence_summary
correspondences_2d3d_for_loop_candidate
Build 2D-3D correspondences for a loop-closure candidate by intersecting the current frame’s tracking inliers with the older keyframe’s observed landmarks. Each shared landmark contributes one entry pairing the current frame’s pixel observation with the landmark’s world position.
correspondences_for_loop_candidate
Build pixel-space two-view correspondences for a loop-closure candidate from the current frame’s tracking inliers and an older keyframe’s observations. Each shared landmark id contributes one correspondence (keyframe_xy, current_xy).
decode_common_image
detect_loop_candidates
Propose loop candidates by gap-constrained appearance retrieval: for each query frame, its strongest earlier matches beyond min_frame_gap whose cosine similarity clears min_similarity.
estimate_free_poses_from_prior_rays
Approximate free-camera poses by scaling a prior↔free essential edge to the metric baseline implied by multi-ray centre triangulation in the incremental prior frame.
estimate_gravity_and_velocities
Recover the world-frame gravity vector and per-keyframe velocities from a window of IMU preintegration factors evaluated against FIXED visual body poses (map’s poses are assumed already converted to world-to-body, exactly as MotionBasedViInitializer::try_initialize_with_bias_seed’s candidate_map conversion produces).
estimate_gyro_bias
Recover the shared gyro bias from a window of IMU preintegration factors’ ROTATION component evaluated against FIXED visual body poses (map’s poses are assumed already converted to world-to-body, exactly as MotionBasedViInitializer::try_initialize_with_bias_seed’s candidate_map conversion produces — same precondition as estimate_gravity_and_velocities).
estimate_relative_pose_kabsch_ransac
3D-3D Kabsch (Procrustes) registration with RANSAC.
extend_stereo_tracks_via_projection
Build multi-frame stereo tracks by projecting each frame’s stereo triangulations forward through subsequent VO poses and searching for descriptor-matching stereo features near the predicted pixel.
filter_pose_priors_by_edge_disagreement
Drop incremental priors whose centres systematically disagree with two-view edge bearings on prior–prior pairs (GT-free). For each prior, flip_fraction is the weight-weighted share of incident prior–prior edges whose essential direction_ij is antipodal to the prior displacement. Priors with incident >= min_incident and flip_fraction >= min_flip_fraction are candidates; at most max_drops worst (highest flip fraction) are cleared.
filter_pose_priors_by_free_centre_residual
Drop incremental priors whose centres disagree with a free (rotation- pinned, centre-free) global position solve after leave-one-out Sim(3) alignment onto the other priors. Bent hubs that are locally consistent with wrong edges still stick out against the free gauge. Returns filtered priors and how many were kept.
filter_pose_priors_by_track_quality
Drop incremental priors whose local track support is too thin or whose mean reprojection exceeds max_mean_reprojection_px. Returns filtered priors and how many were kept.
generate_ordered_pairs
Generate a sorted, duplicate-free ordered view graph.
gt_bearing_in_prior_frame
Unit bearing from from camera toward to camera, in from’s frame (GT).
incremental_rig_sfm
Reconstruct synchronized rig frames with one generalized body pose per timestamp. The first pose fixes the world gauge; the calibrated inter- sensor baseline fixes metric scale.
incremental_sfm
Run incremental SfM over an unordered image set.
incremental_sfm_with_initial_poses
Run incremental SfM from an externally supplied, partial pose model.
incremental_sfm_with_per_image_cameras
Run the existing incremental mapper using one validated camera per image.
incremental_sfm_with_sequence_fallback_overrides
Run incremental SfM with a sequence-fallback admission exception for a caller-provided set of pair entries. The pair indices must refer to the supplied pairwise slice. Only entries selected by the caller’s conservative high-support F→E promotion are eligible for the relaxed triangulation fraction; every other sequence edge keeps the ordinary gate.
incremental_sfm_with_track_membership
Run the plain incremental mapper with an externally supplied set of observation partitions instead of constructing tracks from pairwise correspondences.
kitti_projection_to_pinhole_camera
localize
localize_frame
localize_frame_with_descriptor_store
localize_frames
localize_frames_with_descriptor_store
localize_with_descriptor_store
loop_closure_constraints_from_candidates
Convenience helper that builds a constraint per verified candidate. Keeps the same ordering as the input slice and silently drops candidates that were not verified or lack a recovered relative pose.
map_provider_stats
metric_temporal_quadrilateral_tracks
Return deterministic, observation-disjoint stereo-temporal quadrilaterals for diagnostics and independent correspondence screening. The returned tracks contain exactly four (image, keypoint) observations.
metric_temporal_quadrilateral_tracks_in_frame_gap
Return the same deterministic, observation-disjoint exact quadrilaterals for an explicit temporal-baseline range. Invalid or reversed ranges yield no tracks. This is intended for bounded long-range correspondence audits.
online_ba_imu_state_rows
Flatten a streaming trigger history into the per-(trigger, keyframe) IMU-state rows that write_online_ba_imu_state_csv writes out. Triggers whose OnlineBaTriggerStats::result is Err or whose StereoVoBaRefinement::imu_refinement is None (i.e. the trigger ran visual-only) contribute no rows. Exposed for tests and callers that need the in-memory representation.
online_slam_results_to_html_report
pair_correspondences
pair_essential_mean_sampson_error
Mean Sampson distance (normalized coords) over essential inliers.
pairwise_pose_factors_from_loop_closures
Convert a slice of verified LoopClosureConstraints into BA-ready PairwisePoseFactors, all sharing the same scalar weight. Convenience wrapper for the common case where every loop edge is treated as equally-informative. For per-edge weighting (e.g. scaling by inlier_count), call LoopClosureConstraint::to_pairwise_pose_factor directly.
parse_external_deep_features_txt
parse_external_deep_matches_txt
parse_gnss_measurements_txt
parse_kitti_calibration_txt
parse_kitti_oxts_sample
Parse a single OXTS data line into a KittiOxtsSample.
parse_kitti_oxts_timestamp_line
Parse one KITTI timestamps.txt row into wall-clock nanoseconds.
parse_kitti_oxts_timestamps_txt
Parse the textual KITTI timestamps.txt (one row per frame, formatted as YYYY-MM-DD HH:MM:SS.fffffffff) into a list of wall-clock nanoseconds since the Unix epoch.
parse_stereo_vo_imu_samples_txt
Parse a plain-text per-window IMU sample file.
parse_timestamp_nanoseconds_txt
parse_two_view_matches_txt
preview_rig_correspondence_stats
Collect bounded correspondence preview statistics without exposing the temporary builder state to callers.
preview_rig_correspondence_stats_from_features
Convenience preview wrapper using the existing feature-set representation.
preview_track_build_stats
Build only the feature-track topology and return its diagnostics, without seed selection, triangulation, registration, or bundle adjustment. This is intended for cheap preflight rejection of a candidate view graph before an expensive independent mapper arm is launched.
prior_free_essential_gt_bearing_error_deg
Essential primary-bearing error vs GT for a prior↔free pair (degrees).
read_common_image
read_common_image_sequence
read_common_image_sequence_dir
read_common_image_sequence_dir_with_timestamp_file
read_common_image_sequence_dir_with_timestamps
read_common_image_sequence_with_timestamps
read_external_deep_features_txt
read_external_deep_matches_txt
read_gnss_measurements_txt
read_kitti_calibration_txt
read_kitti_image_sequence_dir
read_kitti_image_sequence_dir_with_timestamp_file
read_kitti_oxts_dir
Read every synchronised OXTS record under <oxts_root>/data/ together with the matching <oxts_root>/timestamps.txt entries.
read_kitti_pinhole_camera
read_timestamp_nanoseconds_txt
read_two_view_matches_txt
reconstruct_global_sfm
End-to-end GLOMAP-style reconstruction: estimate per-pair relative poses from verified matches, average them globally, triangulate the feature tracks against the averaged cameras, and finish with one bundle adjustment over everything registered.
reconstruct_global_sfm_with_per_image_cameras
Run the existing global mapper using one validated camera per image. The returned poses/tracks are in the reference-camera ray convention; callers can use PerImageCameras::from_reference_pixel for native-pixel output.
reconstruct_global_sfm_with_priors
Like reconstruct_global_sfm, but pins cameras that already have absolute poses (typically from a prior incremental solve) and places the remaining images in that gauge.
reconstruct_stereo_vo_with_ba
Build a COLMAP-grade sparse reconstruction from a stereo VO trajectory.
refine_rig_sfm_with_fixed_frame_rotations
Refine an existing rig reconstruction while holding the supplied frame rotations fixed.
refine_stereo_vo_with_ba
Refine a stereo VO trajectory with multi-frame stereo bundle adjustment.
refine_visual_map_with_covisibility_ba
Run covisibility-selected local BA and write refined poses/landmarks back to map.
refine_visual_map_with_covisibility_ba_and_neighbor_allowlist
Run covisibility BA with variable neighbors admitted by the active sparse factor graph. Boundary anchors outside the allowlist still constrain the solve and therefore preserve the local/global gauge relationship.
relative_pose_from_essential
relative_world_to_camera
Compute the relative SE3 previous_to_current such that to_pose.world_to_camera == relative * from_pose.world_to_camera. This is the same convention used by PoseGraphEdge::measurement.
rematch_essential_admission_ok
Gate for free↔prior rematch E-gains: optional chirality margin floor and optional triangulation anchor from two other prior↔free essentials.
reproject
scan_pairwise_loop_closures
Walk every keyframe pair (i, j) with i < j and a sufficient frame-id gap, brute-force match descriptors, and run the verifier on the resulting 2D-2D correspondences. Returns one LoopClosureCandidate per accepted pair, with verification populated and geometrically_verified = true. Rejected pairs are dropped (vs the verify_loop_closure_candidates_* helpers which mutate caller-supplied candidates in place); this routine is meant for the “I have a list of keyframes and want loop detection, not just verification” case.
select_covisibility_local_ba_window
Select the covisibility local-BA window without running the optimizer.
select_covisibility_local_ba_window_with_neighbor_allowlist
Select a local-BA window while restricting variable neighbor keyframes to an upstream active-factor set. Fixed boundary anchors remain unrestricted.
slice_imu_samples_for_keyframes
Slice a globally-timestamped IMU stream into per-keyframe pre-integration windows that match the StereoVoBaImuInput::windows layout.
stereo_pair_correspondences
Build StereoPairCorrespondences by joining the per-frame triangulations on temporal descriptor matches: each match links a left keypoint at frame a to a left keypoint at frame b; if both have a stereo triangulation the pair contributes one 3D-3D correspondence.
tracking_results_to_csv
tracking_results_to_html_report
triangulate_stereo_feature_matches
Triangulate explicit rectified-stereo matches into metric 3D points.
triangulate_stereo_features
Match the left and right FeatureSets using the rectified-stereo epipolar constraint and triangulate every accepted correspondence into a metric 3D point. Returns one StereoFeature per match that passes the StereoFeatureConfig gates.
triangulate_stereo_pixel
Triangulate a 3D point in the left camera’s frame from a rectified stereo pixel pair. camera carries the (shared) pinhole intrinsics and baseline is the positive distance between the camera centers.
triangulate_two_view_left_frame
DLT triangulation for one (left, right) observation pair, returning the 3D point expressed in the left camera frame.
umeyama_similarity_transform
Closed-form similarity registration (Umeyama 1991).
validate_common_image_sequence_dimensions
validate_common_image_sequence_timestamps
verify_loop_closure_candidates
Run verifier on every supplied candidate, mutating each LoopClosureCandidate in place: verification is set to the verifier output and geometrically_verified is replaced with LoopClosureVerification::verified. Candidates whose matched keyframe is no longer in map are left untouched.
verify_loop_closure_candidates_hybrid
Run a HybridLoopClosureVerifier on every supplied candidate. For each candidate this builds both 2D-2D and 2D-3D correspondences, runs the two backends in turn, combines them into a consensus LoopClosureVerification, and writes the result back into verification / geometrically_verified in place. Candidates whose matched keyframe is no longer in map or whose stored keyframe pose is missing are left untouched.
verify_loop_closure_candidates_pnp
Run a PnP-based PnPLoopClosureVerifier on every supplied candidate. For each candidate this builds 2D-3D correspondences via correspondences_2d3d_for_loop_candidate, runs PnP RANSAC on them, and updates verification and geometrically_verified in place. Candidates whose matched keyframe is no longer in map, or whose stored keyframe pose is missing, are left untouched.
write_colmap_binary_model_for_3dgs
Binary counterpart of write_colmap_text_model_for_3dgs. Writes cameras.bin, images.bin, and points3D.bin under out_dir in the same little-endian layout COLMAP’s reference reader expects (see parse_cameras_bin, parse_images_bin, parse_points3d_bin for the exact byte layouts). Useful for downstream trainers that only ingest the binary form (Inria 3DGS / nerfstudio both accept it transparently). All other semantics — single shared camera, sparse per-frame stereo landmarks lifted through pose.camera_to_world(), frame_idx as the COLMAP image id, image_name(frame_idx) for the NAME field — match the text writer exactly.
write_colmap_reconstruction_for_3dgs
Write a COLMAP text model from a merged-track sparse reconstruction.
write_colmap_reconstruction_for_3dgs_with_cameras
Write a merged-track COLMAP text model with one calibrated camera per output image. This is the multi-camera counterpart to write_colmap_reconstruction_for_3dgs; all camera ids and intrinsics are retained, and each images.txt header points at the camera corresponding to that frame. The legacy single-camera writer is intentionally untouched.
write_colmap_text_model_for_3dgs
Write a COLMAP text model suitable for bootstrapping a 3D Gaussian Splatting (3DGS) / NeRF training pipeline.
write_online_ba_imu_state_csv
Write the per-(trigger, keyframe) IMU refinement state from a streaming BA run to a CSV file. One row per keyframe inside each trigger’s window; triggers without an imu_refinement (visual-only, or refiner Err) contribute nothing. Returns the number of data rows written (header line excluded).
write_online_slam_results_html_report
write_png_gray
write_tracking_results_csv
write_tracking_results_html_report

Type Aliases§

CameraId
FrameId
LandmarkCandidateId
LandmarkId
LocalizationRansac
The RANSAC PnP estimator of the default LocalizationPipeline: its minimal solver is chosen at run time by LocalizationConfig::pnp_solver.
PoseCovarianceMatrix
RigObservationId
Flattened id of an image/keypoint observation in a rig-local graph.
Sim3Information
A 7×7 Sim(3) information matrix Ω (inverse measurement covariance).
Sim3Tangent
Tangent vector ξ = [ρ; ω; σ] of Sim(3): translation part ρ (0..3), rotation part ω (3..6), and log-scale σ (6).
SubmapId
TimedFrame
TimedPose