A simulated visual localization pipeline for GPS-denied navigation: feature-matching against a known map for an absolute (but slow) fix, optical-flow odometry for a fast (but drifting) relative estimate, fused by an Unscented Kalman Filter into a single stable position track.
This is the same UKF math as the simulation above, ported to JavaScript and re-run on every change. The camera/odometry data comes from a few precomputed noise presets (re-running ORB matching and optical flow live in-browser isn't feasible without porting OpenCV to JS) — switching presets swaps that underlying data, while every slider below recomputes the actual filter in real time.
200-frame loop, ±2° camera yaw, σ=1.5px position noise, absolute fix attempted every 10 frames.
| Metric | Raw odometry | UKF fused | Reduction |
|---|---|---|---|
| Final drift | 12.73px | 3.74px | 70.6% |
| Mean error | 7.99px | 3.92px | 50.9% |
| Max error | 13.14px | 7.36px | 44.0% |
Fusion's benefit is scenario-dependent, not universal — it helps most when raw odometry drift is substantial relative to the localizer's own measurement noise (~4px). When VIO is already that accurate on its own, there's little room left for fusion to improve on it. Full validation, including a known open limitation around sharp direction-reversal points, is documented in the repository README.