ds_msp.vo¶
Monocular visual odometry — composes the bearing-vector two-view stack (ds_msp.mvg) into a
trajectory estimator, plus Sim(3) alignment and ATE/RPE evaluation metrics.
ds_msp.vo ¶
Monocular visual odometry (Tier 2).
Composes the Tier-1 bearing-vector stack (ds_msp.mvg) into a trajectory estimator,
plus the standard evaluation metrics (Sim(3) alignment, ATE, RPE) to report it.
VOResult
dataclass
¶
Output of :func:estimate_trajectory.
Source code in ds_msp/vo/odometry.py
align_sim3 ¶
align_sim3(src: ndarray, dst: ndarray, *, with_scale: bool = True) -> Tuple[float, np.ndarray, np.ndarray]
Closed-form similarity that best maps src onto dst (Umeyama 1991).
Finds s, R, t minimising Σ ‖dst_i − (s·R·src_i + t)‖² for point sets
src, dst of shape (N, 3).
Returns (s, R, t) with s scalar scale, R (3, 3) rotation, t (3,).
With with_scale=False the scale is fixed to 1 (rigid SE(3) alignment).
Source code in ds_msp/vo/metrics.py
apply_sim3 ¶
Apply a similarity s·R·pts + t to an (N, 3) point set.
ate_rmse ¶
Absolute Trajectory Error (RMSE of camera centres), Sim(3)-aligned by default.
est, gt are (N, 3) camera-centre trajectories in correspondence.
Source code in ds_msp/vo/metrics.py
estimate_trajectory ¶
estimate_trajectory(model, frames: Sequence[Frame], *, min_common: int = 8, threshold: float = 0.005, seed: int = 0) -> VOResult
Estimate a monocular camera trajectory from per-frame correspondences.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
CameraModel
|
Any central DS-MSP model (its |
required |
frames
|
sequence of mapping
|
One |
required |
min_common
|
int
|
Minimum shared correspondences required between consecutive frames (≥ 8 for the eight-point estimator). |
8
|
threshold
|
float
|
Forwarded to the robust two-view estimator (angular RANSAC threshold / RNG seed). |
0.005
|
seed
|
float
|
Forwarded to the robust two-view estimator (angular RANSAC threshold / RNG seed). |
0.005
|
Returns:
| Type | Description |
|---|---|
VOResult
|
|
Source code in ds_msp/vo/odometry.py
rpe_rmse ¶
Relative Pose Error over a fixed step delta.
est_poses, gt_poses are (N, 4, 4) camera-to-world poses in correspondence.
For each i the relative motion inv(P_i)·P_{i+delta} is compared between
estimate and ground truth; the error E_i = inv(ΔGT)·ΔEST.
Returns (trans_rmse, rot_rmse_deg) — translational RMSE (same units as the
poses) and rotational RMSE in degrees.