4 releases (2 breaking)

0.4.0 Jan 28, 2023
0.3.1 Oct 17, 2020
0.3.0 Oct 17, 2020
0.1.0 Jun 28, 2020

#455 in Images

Download history 49/week @ 2024-07-27 40/week @ 2024-08-03 40/week @ 2024-08-10 41/week @ 2024-08-17 41/week @ 2024-08-24 39/week @ 2024-08-31 55/week @ 2024-09-07 43/week @ 2024-09-14 47/week @ 2024-09-21 45/week @ 2024-09-28 32/week @ 2024-10-05 54/week @ 2024-10-12 45/week @ 2024-10-19 36/week @ 2024-10-26 76/week @ 2024-11-02 37/week @ 2024-11-09

202 downloads per month
Used in 2 crates

BSD-2-Clause

4.5MB
175K SLoC

C 172K SLoC // 0.0% comments Rust 3K SLoC // 0.0% comments C++ 129 SLoC // 0.2% comments Python 25 SLoC Shell 7 SLoC // 0.4% comments

apriltag crate

High-level API for AprilTag library built on top of apriltag-sys.

Usage

Import to your project

Add apriltag crate to your Cargo.toml.

cargo add apriltag

Customize the build (optional)

The apriltag crate ships and statically links the AprilTag C library by default. If you would like to customize the way to link the AprilTag library, please read the notes in apriltag-sys README.

Example

To run apriltag detection on an PNM image,

cargo run --example detector -- input.pnm

It accepts additional arguments:

cargo run --example detector -- \
    --family tag36h11 \
    --tag-params 1,2.1,2.2,4,5 \
    input.pnm

where the arguments are explained as follows.

  • --family tag36h11 specifies the tag36h11 tag family.
  • --tag-params 1,2.1,2.2,4,5 sets the tag size, fx, fy, cx and cy parameters. It enable pose estimation feature.

Third-party type conversions

Third-party type conversions are supported by extension crates, including

  • apriltag-nalgebra: Add conversions from/to two dimensional byte matrix in nalgebra crate.
  • apriltag-image: Add conversions from/to image types in image crate.

License

BSD 2-Clause License. See LICENSE file.

Dependencies