HyperAIHyperAI

Command Palette

Search for a command to run...

LSD-SLAM: Large-Scale Direct Monocular SLAM

Jakob Engel Thomas Schöps Daniel Cremers

Abstract

We propose a direct (feature-less) monocular SLAM algorithm which, in contrast to current state-of-the-art regarding direct methods, allows to build large-scale, consistent maps of the environment. Along with highly accurate pose estimation based on direct image alignment, the 3D environment is reconstructed in real-time as pose-graph of keyframes with associated semi-dense depth maps. These are obtained by filtering over a large number of pixelwise small-baseline stereo comparisons. The explicitly scale-drift aware formulation allows the approach to operate on challenging sequences including large variations in scene scale. Major enablers are two key novelties: (1) a novel direct tracking method which operates on sim(3), thereby explicitly detecting scale-drift, and (2) an elegant probabilistic solution to include the efect of noisy depth values into tracking. The resulting direct monocular SLAM system runs in real-time on a CPU.

One-sentence Summary

LSD-SLAM, proposed by researchers at Technical University Munich, is a direct monocular SLAM system that operates on sim(3)sim(3)sim(3) to explicitly detect scale drift and employs a probabilistic formulation to incorporate noisy depth values into tracking, enabling large-scale, consistent mapping with real-time semi-dense depth reconstruction on a CPU.

Key Contributions

  • LSD-SLAM is introduced as a direct, featureless monocular SLAM algorithm that combines accurate pose estimation from direct image alignment with large-scale, consistent environment reconstruction. It maintains a pose graph of keyframes with probabilistic semi-dense depth maps obtained from many pixelwise small-baseline stereo comparisons.

  • A novel direct tracking method aligns keyframes using Sim(3) similarity transformations, explicitly modeling and detecting scale drift in monocular trajectories. This scale-aware formulation enables reliable tracking and mapping across sequences with large scene-scale variations.

  • The method incorporates a probabilistic treatment of depth-map uncertainty into direct tracking to account for noisy depth estimates. Experiments show that the resulting CPU-real-time system tracks and maps hand-held trajectories over more than 500 m, including large rotations and scale variations with average inverse depth from less than 20 cm to more than 10 m.

Introduction

Monocular SLAM and 3D reconstruction matter for UAV navigation, augmented reality, and virtual reality because a single camera can operate across many environment scales without depth or stereo range limits. The main challenge is scale ambiguity, since a monocular camera cannot directly measure absolute world scale and scale drift becomes a major source of error. Feature-based methods are limited because they only use feature observations, discarding useful edge and region structure, while prior direct monocular methods used full image intensities but only produced local odometry without a consistent global map. The authors leverage direct image alignment and semi-dense depth estimation to present LSD-SLAM, a direct monocular SLAM framework that builds a global pose graph of keyframes. Its key contribution is using similarity transforms to explicitly model scale drift, along with probabilistically incorporating depth uncertainty into tracking, enabling real time performance on a CPU and more robust large-scale mapping.

Method

The authors leverage a direct monocular SLAM pipeline that operates continuously on image streams and represents the environment as a pose graph of keyframes. Refer to the framework diagram:

The framework consists of three tightly coupled modules: tracking, depth map estimation, and map optimization. The tracking module estimates the relative pose of new images with respect to the current reference keyframe. The depth map estimation module either refines the current keyframe or creates a new one when the camera moves sufficiently far. The map optimization module incorporates replaced keyframes into a global pose graph, where relative transformations and uncertainties are refined to reduce accumulated drift.

Each keyframe contains an intensity image, an inverse depth map, and the variance of that inverse depth map. The depth values and variances are semi dense, meaning they are maintained only in image regions with sufficient intensity gradient. Edges in the map store similarity transformations between keyframes together with associated covariance matrices. The first keyframe can be initialized with random inverse depth values and large variance. With sufficient translational motion, the system converges toward a stable depth configuration without requiring a separate dense initialization procedure.

At the lowest level, image alignment is performed by minimizing a photometric error. Given a reference keyframe κi\kappa_iκi​ with image IiI_iIi​, inverse depth map DiD_iDi​, and depth variance ViV_iVi​, a new image IjI_jIj​ is aligned by estimating a relative transformation ξji∈se(3)\boldsymbol{\xi}_{ji}\in\mathfrak{se}(3)ξji​∈se(3). The residual for a pixel p\mathbf{p}p is

rp(p,ξji)=Ii(p)−Ij(ω(p,Di(p),ξji)).r_p(\mathbf{p},\boldsymbol{\xi}_{ji}) = I_i(\mathbf{p}) - I_j(\omega(\mathbf{p},D_i(\mathbf{p}),\boldsymbol{\xi}_{ji})).rp​(p,ξji​)=Ii​(p)−Ij​(ω(p,Di​(p),ξji​)).

The optimization objective is a variance normalized robust photometric error:

Ep(ξji)=∑p∈ΩDi∥rp2(p,ξji)σrp2(p,ξji)∥δ.E_p(\boldsymbol{\xi}_{ji}) = \sum_{\mathbf{p}\in\Omega_{D_i}} \left\| \frac{r_p^2(\mathbf{p},\boldsymbol{\xi}_{ji})} {\sigma_{r_p}^2(\mathbf{p},\boldsymbol{\xi}_{ji})} \right\|_\delta.Ep​(ξji​)=p∈ΩDi​​∑​​σrp​2​(p,ξji​)rp2​(p,ξji​)​​δ​.

The Huber style robust norm is defined as

∥r2∥δ={r2/(2δ),∣r∣≤δ,∣r∣−δ/2,otherwise.\|r^2\|_\delta = \begin{cases} r^2/(2\delta), & |r|\leq\delta,\\ |r|-\delta/2, & \text{otherwise}. \end{cases}∥r2∥δ​={r2/(2δ),∣r∣−δ/2,​∣r∣≤δ,otherwise.​

The key design choice is that the residual variance is not assumed constant. The authors compute

σrp2(p,ξji)=2σI2+(∂rp(p,ξji)∂Di(p))2Vi(p),\sigma_{r_p}^2(\mathbf{p},\boldsymbol{\xi}_{ji}) = 2\sigma_I^2 + \left( \frac{\partial r_p(\mathbf{p},\boldsymbol{\xi}_{ji})} {\partial D_i(\mathbf{p})} \right)^2 V_i(\mathbf{p}),σrp​2​(p,ξji​)=2σI2​+(∂Di​(p)∂rp​(p,ξji​)​)2Vi​(p),

where σI2\sigma_I^2σI2​ models image intensity noise and Vi(p)V_i(\mathbf{p})Vi​(p) models uncertainty in the inverse depth map. As shown in the figure below:

The figure illustrates how the normalization changes with motion type. For pure rotation, depth uncertainty does not affect photometric residuals, so the normalization remains uniform. For forward motion, the effect is concentrated in specific image regions. For lateral motion, residuals are weighted differently depending on the local intensity gradient direction. This behavior is important because monocular depth uncertainty is highly spatially variable.

The alignment itself is solved by an iteratively reweighted Gauss Newton optimization on a Lie group. The residual vector is r=(r1,…,rn)T\mathbf{r}=(r_1,\ldots,r_n)^Tr=(r1​,…,rn​)T, and a left compositional update is used. In each iteration, the update is computed as

δξ(n)=−(JTWJ)−1JTWr(ξ(n)),\delta\boldsymbol{\xi}^{(n)} = - (\mathbf{J}^T\mathbf{W}\mathbf{J})^{-1} \mathbf{J}^T\mathbf{W}\mathbf{r}(\boldsymbol{\xi}^{(n)}),δξ(n)=−(JTWJ)−1JTWr(ξ(n)),

followed by

ξ(n+1)=δξ(n)∘ξ(n).\boldsymbol{\xi}^{(n+1)} = \delta\boldsymbol{\xi}^{(n)}\circ\boldsymbol{\xi}^{(n)}.ξ(n+1)=δξ(n)∘ξ(n).

The weight matrix W\mathbf{W}W downweights pixels with large residuals, making the estimator robust to occlusions, reflections, and other photometric violations. The inverse weighted Hessian estimate

Σξ≈(JTWJ)−1\boldsymbol{\Sigma}_{\boldsymbol{\xi}} \approx (\mathbf{J}^T\mathbf{W}\mathbf{J})^{-1}Σξ​≈(JTWJ)−1

is used to describe the uncertainty of the final pose. The authors use a left multiplication convention, meaning the final pose can be expressed as

ξ(n)=ϵ∘ξtrue,ϵ∼N(0,Σξ).\boldsymbol{\xi}^{(n)} = \boldsymbol{\epsilon} \circ \boldsymbol{\xi}_{\text{true}}, \qquad \boldsymbol{\epsilon}\sim\mathcal{N}(\mathbf{0},\boldsymbol{\Sigma}_{\boldsymbol{\xi}}).ξ(n)=ϵ∘ξtrue​,ϵ∼N(0,Σξ​).

Residuals are generally correlated in practice, so this covariance is treated as a lower bound rather than a fully exact model. Nevertheless, it provides useful information for robust matching, loop closure checking, and global pose graph optimization.

Uncertainty is propagated through nonlinear functions using a Jacobian based approximation. If an input variable X\mathbf{X}X has covariance ΣX\boldsymbol{\Sigma}_{\mathbf{X}}ΣX​, and the output is Y=f(X)\mathbf{Y}=f(\mathbf{X})Y=f(X), then the output covariance is approximated by

Σf≈JfΣXJfT.\boldsymbol{\Sigma}_f \approx \mathbf{J}_f \boldsymbol{\Sigma}_{\mathbf{X}} \mathbf{J}_f^T.Σf​≈Jf​ΣX​JfT​.

This mechanism allows the depth variance ViV_iVi​ to be incorporated into the photometric residual variance used during tracking.

The depth map estimation module decides whether to refine the current keyframe or promote the latest tracked frame into a new keyframe. The keyframe selection criterion uses a weighted distance measure

dist(ξji)=ξjiTWξji,\mathrm{dist}(\boldsymbol{\xi}_{ji}) = \boldsymbol{\xi}_{ji}^T \mathbf{W} \boldsymbol{\xi}_{ji},dist(ξji​)=ξjiT​Wξji​,

where W\mathbf{W}W balances relative translation and rotation. If the threshold is exceeded, the system creates a new keyframe by projecting depth from existing nearby keyframes into the new image. One iteration of spatial regularization and outlier removal is then applied. The new depth map is scaled so that its mean inverse depth equals one, and the corresponding scale is absorbed into the keyframe’s similarity transformation pose.

If the new frame does not become a keyframe, it is used to refine the current keyframe. The authors employ many efficient small baseline stereo comparisons in regions with high expected stereo accuracy. The resulting measurements are probabilistically merged into the existing inverse depth map, while regularization maintains spatial consistency.

For global consistency, the system performs direct image alignment on sim(3)\mathfrak{sim}(3)sim(3) rather than only se(3)\mathfrak{se}(3)se(3). Monocular tracking is scale ambiguous, and this ambiguity causes scale drift over long trajectories. To address this issue, the authors normalize each keyframe so that its mean inverse depth is one and estimate inter keyframe constraints as similarity transformations. The optimization objective combines photometric and depth residuals:

E(ξji)=∑p∈ΩDi∥rp2(p,ξji)σrp2(p,ξji)+rd2(p,ξji)σrd2(p,ξji)∥δ.E(\boldsymbol{\xi}_{ji}) = \sum_{\mathbf{p}\in\Omega_{D_i}} \left\| \frac{r_p^2(\mathbf{p},\boldsymbol{\xi}_{ji})} {\sigma_{r_p}^2(\mathbf{p},\boldsymbol{\xi}_{ji})} + \frac{r_d^2(\mathbf{p},\boldsymbol{\xi}_{ji})} {\sigma_{r_d}^2(\mathbf{p},\boldsymbol{\xi}_{ji})} \right\|_\delta.E(ξji​)=p∈ΩDi​​∑​​σrp​2​(p,ξji​)rp2​(p,ξji​)​+σrd​2​(p,ξji​)rd2​(p,ξji​)​​δ​.

The photometric residual has the same form as during tracking. The depth residual is

rd(p,ξji)=[p′]3−Dj([p′]1,2),r_d(\mathbf{p},\boldsymbol{\xi}_{ji}) = [\mathbf{p}']_3 - D_j([\mathbf{p}']_{1,2}),rd​(p,ξji​)=[p′]3​−Dj​([p′]1,2​),

where

p′=ωs(p,Di(p),ξji)\mathbf{p}' = \omega_s(\mathbf{p},D_i(\mathbf{p}),\boldsymbol{\xi}_{ji})p′=ωs​(p,Di​(p),ξji​)

is the transformed point under the similarity transform. The depth residual variance is propagated from both keyframes:

σrd2(p,ξji)=Vj([p′]1,2)(∂rd(p,ξji)∂Dj([p′]1,2))2+Vi(p)(∂rd(p,ξji)∂Di(p))2.\sigma_{r_d}^2(\mathbf{p},\boldsymbol{\xi}_{ji}) = V_j([\mathbf{p}']_{1,2}) \left( \frac{\partial r_d(\mathbf{p},\boldsymbol{\xi}_{ji})} {\partial D_j([\mathbf{p}']_{1,2})} \right)^2 + V_i(\mathbf{p}) \left( \frac{\partial r_d(\mathbf{p},\boldsymbol{\xi}_{ji})} {\partial D_i(\mathbf{p})} \right)^2.σrd​2​(p,ξji​)=Vj​([p′]1,2​)(∂Dj​([p′]1,2​)∂rd​(p,ξji​)​)2+Vi​(p)(∂Di​(p)∂rd​(p,ξji​)​)2.

The combined robust residual reflects the fact that photometric outliers and depth outliers often occur together. The depth term is required because photometric alignment alone cannot determine scale on sim(3)\mathfrak{sim}(3)sim(3).

Candidate loop closure or large offset keyframe constraints are collected from nearby keyframes and from an appearance based mapping mechanism. Before inserting a constraint into the global graph, the authors perform a reciprocal tracking check. For a candidate pair, the system estimates both ξjki\boldsymbol{\xi}_{j_k i}ξjk​i​ and ξijk\boldsymbol{\xi}_{i j_k}ξijk​​. The two estimates are accepted only if their mismatch is statistically small:

e(ξjki,ξijk)=(ξjki∘ξijk)T(Σjki+AdjjkiΣijkAdjjkiT)−1(ξjki∘ξijk).e(\boldsymbol{\xi}_{j_k i},\boldsymbol{\xi}_{i j_k}) = (\boldsymbol{\xi}_{j_k i}\circ\boldsymbol{\xi}_{i j_k})^T \left( \boldsymbol{\Sigma}_{j_k i} + \mathrm{Adj}_{j_k i} \boldsymbol{\Sigma}_{i j_k} \mathrm{Adj}_{j_k i}^T \right)^{-1} (\boldsymbol{\xi}_{j_k i}\circ\boldsymbol{\xi}_{i j_k}).e(ξjk​i​,ξijk​​)=(ξjk​i​∘ξijk​​)T(Σjk​i​+Adjjk​i​Σijk​​Adjjk​iT​)−1(ξjk​i​∘ξijk​​).

The adjoint transformation maps the second covariance into the tangent space consistent with the first estimate. This reciprocal check helps suppress false loop closures.

Direct image alignment on sim(3)\mathfrak{sim}(3)sim(3) is nonconvex and requires initialization. The system uses second order minimization techniques and a coarse to fine pyramid that starts at very low resolution, increasing the convergence radius for loop closure alignment. These choices help the method recover from larger initial errors than dense direct alignment normally allows.

The map optimization module continuously refines the pose graph in the background. The optimized variables are the absolute poses ξW1,…,ξWn\boldsymbol{\xi}_{W1},\ldots,\boldsymbol{\xi}_{Wn}ξW1​,…,ξWn​ of keyframes with respect to the world frame. The objective is a Mahalanobis sum over relative similarity constraints:

E(ξW1,…,ξWn)=∑(ξji,Σji)∈E(ξji∘ξWi−1∘ξWj)TΣji−1(ξji∘ξWi−1∘ξWj).E(\boldsymbol{\xi}_{W1},\ldots,\boldsymbol{\xi}_{Wn}) = \sum_{(\boldsymbol{\xi}_{ji},\boldsymbol{\Sigma}_{ji})\in\mathcal{E}} (\boldsymbol{\xi}_{ji} \circ \boldsymbol{\xi}_{Wi}^{-1} \circ \boldsymbol{\xi}_{Wj})^T \boldsymbol{\Sigma}_{ji}^{-1} (\boldsymbol{\xi}_{ji} \circ \boldsymbol{\xi}_{Wi}^{-1} \circ \boldsymbol{\xi}_{Wj}).E(ξW1​,…,ξWn​)=(ξji​,Σji​)∈E∑​(ξji​∘ξWi−1​∘ξWj​)TΣji−1​(ξji​∘ξWi−1​∘ξWj​).

This formulation follows the left multiplication convention used for local tracking. The resulting pose graph correction enforces global consistency by combining odometry constraints, loop closure constraints, and their estimated uncertainties.

Experiment

LSD-SLAM was evaluated both qualitatively on long, challenging outdoor trajectories and quantitatively on a public RGB-D benchmark adapted to monocular operation. The qualitative tests showed that the method can handle extensive rotations, large scale changes, complex depth variations, and major loop closures. The quantitative evaluation demonstrated competitive tracking accuracy on a difficult benchmark, while additional experiments showed that the proposed tracking steps substantially increase the convergence radius for sim(3) camera motion without noticeably reducing precision.

Across the TUM RGB-D and simulated sequences, LSD-SLAM generally produces lower absolute trajectory error than the monocular baselines, including a case where one baseline fails to track. It is also competitive with methods that use sensor depth, although a direct RGB-D approach has lower error on some TUM and slow-motion simulated sequences. LSD-SLAM outperforms semi-dense monocular odometry and keypoint-based monocular SLAM on the reported sequences, with the latter failing on one TUM sequence. LSD-SLAM remains close to depth-based RGB-D SLAM despite using depth only for initialization, with depth methods leading on some sequences and LSD-SLAM leading on a simulated sequence.

The experiments evaluate LSD-SLAM on TUM RGB-D and simulated sequences against monocular and depth-based baselines, primarily assessing absolute trajectory accuracy and tracking robustness. LSD-SLAM generally outperforms monocular methods, including semi-dense odometry and keypoint-based SLAM, which are less reliable on some sequences. It also remains competitive with depth-based RGB-D SLAM despite using depth only for initialization, showing that the proposed approach achieves strong overall performance across diverse sequence conditions.