A fast, memory-safe Visual Odometry implementation in Rust with GPU-accelerated image processing and no OpenCV.
[This is still an ongoing project, with current immediate goals mentioned below]
- Feature detection and tracking using FAST corners with ORB descriptors
- GPU-accelerated image pyramid generation
- Hybrid pose estimation (PnP + Essential Matrix)
- Local mapping with keyframe management
- Real-time trajectory visualization
- Quadtree-based feature distribution for robust tracking
- Rust 1.70+
- OpenCL-capable GPU (optional, falls back to CPU)
- ffmpeg (for video preprocessing)
git clone https://github.com/yourusername/rust-vslam
cd rust-vslam
cargo build --release# Create image sequence directory
mkdir -p test/outside
# Convert video to image sequence (30 fps)
ffmpeg -i your_video.mp4 -vf fps=30 test/outside/%04d.jpgObtain your camera parameters using either:
- OpenCV camera calibration
- Online Camera Calibrator
Update main.rs with your camera parameters:
let camera = Arc::new(CameraIntrinsics::new(
fx, // focal length x
fy, // focal length y
cx, // principal point x
cy, // principal point y
width, // image width
height // image height
));cargo run --releaseOutput files will be generated in output/:
trajectory_plot.png: Top-down view of camera motionmatches_*.png: Feature matching visualizations
- Loop closure detection and correction
- Local bundle adjustment
- TUM dataset compatibility
- Improved scale consistency
- Bidirectional feature matching
MIT
Contributions are welcome! Please feel free to submit a Pull Request.

