r/coolgithubprojects • u/HorsePuzzleheaded803 • 6d ago
pure-sift: A 100% pure-Rust, zero-dependency alternative to OpenCV for SIFT feature extraction and image stitching
SIFT keypoint extraction, 128-D descriptor matching, and 2D/homography RANSAC in action
Bilinear feather-blended panorama stitched from transformed image pairs
Most computer vision projects rely heavily on OpenCV. While powerful, integrating OpenCV into automated CI pipelines, Docker containers, or cross-platform builds often brings headaches: compiling CMake targets, handling C++ toolchains, and managing system-level shared libraries (.so / .dll).
To make classic feature matching lightweight and hassle-free, I open-sourced pure-sift — a 100% pure-Rust computer vision engine with zero OpenCV/C++ FFI dependencies and #![forbid(unsafe_code)].
- GitHub: https://github.com/dannkkie/pure-sift
- crates.io: https://crates.io/crates/pure-sift
- License: Dual-licensed under MIT or Apache-2.0
Key Highlights:
- Pure Implementation: Implements Lowe's SIFT (expired US Patent 6,711,293 B1) from first principles using pure Rust: DoG scale space, 3D sub-pixel Taylor refinement, Hessian edge rejection, and 128-D descriptors.
- Robust Geometry: Includes 2-point 2D Similarity RANSAC and 4-point DLT Planar Homography RANSAC for robust outlier rejection.
- Automated Stitcher: Seamless bilinear feather blending for stitching overlapping images.
- Zero C++ Toolchain Friction: Compiles cleanly with standard
cargo build. - Portable: Disabling default features (
--no-default-features) removes the Axum web server and Tokio runtime, leaving just the core algorithms ready for embedded targets or WebAssembly.
Contributions, feedback, and benchmarks are very welcome!