AprilTags on robots

Project AprilTags Visual Fiducial System
License BSD
Bugs/Discussion mailman page
Current Version 2016-12-01 (0.9.8)
Source Download apriltag-2016-12-01.tgz
iOS Download AprilTag

AprilTag is a visual fiducial system, useful for a wide variety of tasks including augmented reality, robotics, and camera calibration. Targets can be created from an ordinary printer, and the AprilTag detection software computes the precise 3D position, orientation, and identity of the tags relative to the camera. Implementations are available in Java, as well as in C. Notably, the C implementation has no external dependencies and is designed to be easily included in other applications, as well as portable to embedded devices. Real-time performance can be achieved even on cell-phone grade processors.

Technical Description

The fiducial design and coding system are based on a near-optimal lexicographic coding system, and the detection software is robust to lighting conditions and view angle. This system is described in more detail in our AprilTag paper (AprilTag: A robust and flexible visual fiducial system, ICRA 2011). One useful application of AprilTags is camera calibration (AprilCal: Assisted and repeatable camera calibration, IROS 2013).

Various AprilTag families

AprilTags are conceptually similar to QR Codes, in that they are a type of two-dimensional bar code. However, they are designed to encode far smaller data payloads (between 4 and 12 bits), allowing them to be detected more robustly and from longer ranges. Further, they are designed for high localization accuracy— you can compute the precise 3D position of the AprilTag with respect to the camera.

ARToolkit is very similar in objective to AprilTags, though as our technical paper shows, AprilTag outperforms ARToolkit in terms of detection rates and accuracy.

User Information

Pre-generated tag families

Each set includes individual PNGs of each tag, a mosaic PNG containing every tag, and a ready-to-print postscript file with one tag per page.

Generating tag families

The code which generated the above tags is available as a tar archive: apriltag-generate.tgz

To generate a 16 bit tag family with a minimum hamming distance of 5 and a minimum complexity of 3, you would do this:

java -cp april.jar april.tag.TagFamilyGenerator 16 5 3

C Language Implementation

AprilTags-C - The C implementation is intended for software developers wanting to integrate AprilTags into their application. It has no external dependencies, but does not include image acquisition support.

Java Language Implementation

The previous Java-language implementation has been deprecated. The current C version can be called via JNI.

iOS Support Notes

The iOS version supports transmitting tag detections over UDP to another machine for additional processing. Data is transmitted on UDP port 7709, and an example decoder (in Java) is available here: AprilTagReceive.java

Note that conversion of tag coordinates to absolute positions requires you to calibrate your iPhone camera. (Approximate calibrations for common iOS devices coming soon!)