Skip to content

Repository files navigation

Image Features

Brisk Example

Keypoint matching example using BRISK

A high-precision Rust library for keypoint detection, description, and matching. It implements standard binary descriptors including ORB, BRISK, and FREAK, optimized for 100% precision in verified scenarios.

Important

This crate is heavily inspired by ImageFeatures.jl. The core logic was autonomously transcribed and adapted by AI to ensure mathematical parity with the original Julia implementation.

Features

  • FAST Corner Detection: High-performance keypoint extraction.
  • Binary Descriptors:
    • ORB: Oriented FAST and Rotated BRIEF. [has a few issues]
    • BRISK: Binary Robust Invariant Scalable Keypoints. [mostly works well]
    • FREAK: Fast Retina Keypoint. [could have a few issues]
  • Matching: Greedy one-to-one matching with ratio test and distance thresholds.

Usage

Add this to your Cargo.toml:

[dependencies]
image-features = { git = "https://github.com/progress-robotics/images-features-rs.git" }

Simple Example

use image_features::{load_image, to_grayscale, detect_features, compute_descriptors, DescriptorType};

fn main() -> anyhow::Result<()> {
    // 1. Load and prepare image
    let img = load_image("example.png")?;
    let gray = to_grayscale(&img)?;

    // 2. Detect keypoints (FAST)
    let kps = detect_features(&gray, 30, 12)?;

    // 3. Compute BRISK descriptors
    let descs = compute_descriptors(&gray, &kps, DescriptorType::Brisk)?;

    println!("Computed {} descriptors", descs.len());
    Ok(())
}

CLI Tool

The package includes a CLI tool for testing and visualization:

cargo run --release -- path/to/image.png --descriptor brisk --dist 0.1

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages