15 releases (4 breaking)

0.5.3 Jan 7, 2025
0.5.2 Dec 28, 2024
0.4.3 Dec 20, 2024
0.4.1 Nov 21, 2024
0.1.0 Nov 5, 2024

#279 in Math

Download history 88/week @ 2024-10-30 184/week @ 2024-11-06 409/week @ 2024-11-13 227/week @ 2024-11-20 18/week @ 2024-11-27 85/week @ 2024-12-04 64/week @ 2024-12-11 388/week @ 2024-12-18 260/week @ 2024-12-25 70/week @ 2025-01-01 173/week @ 2025-01-08

926 downloads per month
Used in 2 crates

MIT/Apache

67KB
1.5K SLoC

aprilgrid-rs

crate

Pure Rust version of aprilgrid

example detection

Install from cargo

cargo add aprilgrid

Usage

See examples/demo.rs

// load image
let img = ImageReader::open(path.unwrap())?.decode()?;

// create detector
let detector = aprilgrid::detector::TagDetector::new(&aprilgrid::TagFamily::T36H11, None);

// detect tags
let tags = detector.detect(&img);

// support kornia image
// cargo add aprilgrid -F kornia
let image: kornia::image::Image<u8, 3> =
    kornia::io::functional::read_image_any("...").unwrap();
let tags = detector.detect_kornia(&image);

Example

cargo run --example demo -r

Run tests

cargo test -r

TODO

  • Robustness.
  • Unit tests.

Generate chart pdf

pip install opencv-python pillow cairosvg svgwrite
python3 scripts/generate_aprilgrid.py -h

Reference

Dependencies

~21–45MB
~808K SLoC