Visual Odometry
Visual odometry tracks how a camera moves by watching how the scene shifts between frames. Here a stereo camera measures the 3D position of features in each frame, matches them to the previous frame, and solves for the motion that best explains the change.
Frame-to-frame motion
With matched 3D feature positions \(\mathbf{p}_i\) in the previous frame and \(\mathbf{q}_i\) in the current one, the camera motion is the rigid transform that best maps one set to the other:
Each step's motion is chained onto the last, like wheel odometry, so errors add up. Monocular visual odometry, with one camera, can only recover motion up to an unknown scale.
What to notice
With many good features, the estimate stays close to the truth for a long time. Fewer features or more noise make it wander faster. Wrong matches, from repeated textures or moving objects, cause sudden jumps unless RANSAC rejects them. Visual odometry drifts slowly but never stops drifting, which is why it is paired with loop closure in visual SLAM, or with an IMU.