apriltag-image

Crates.ioapriltag-image
lib.rsapriltag-image
version0.1.0
sourcesrc
created_at2023-01-28 18:03:30.355682
updated_at2023-01-28 18:03:30.355682
descriptionConversion from/to image crate types for apriltag
homepagehttps://github.com/jerry73204/apriltag-rust
repositoryhttps://github.com/jerry73204/apriltag-rust.git
max_upload_size
id770493
size23,782
(jerry73204)

documentation

https://docs.rs/apriltag-image/

README

apriltag-image

It's an extension to apriltag crate that adds image conversion from/to image crate for apriltag crate.

Example

use apriltag::{Detector, Family, Image};
use apriltag_image::prelude::*;

fn main() -> anyhow::Result<()> {
    let path = "test_data/DICT_APRILTAG_16h5-2x2-500-10-0.8-29,12,22,2.jpg";
    let reader = image::io::Reader::open(path)?;
    let image_buf = reader.decode()?.to_luma8();
    let image = Image::from_image_buffer(&image_buf);
    let mut detector = Detector::builder()
        .add_family_bits(Family::tag_16h5(), 1)
        .build()?;
    let detections = detector.detect(&image);
    Ok(())
}
Commit count: 150

cargo fmt