Users Manual
Comparison
Both QR codes and AprilTags have their up and down sides. While QR codes allow arbitrary user-defined data
to be stored, AprilTags have a pre-defined and limited set of tags. On the other hand, AprilTags have a lower
resolution and can therefore be detected at larger distances. Moreover, the continuous white to black edge around
AprilTags allow for more precise pose estimation.
Note: If user-defined data is not required, AprilTags should be preferred over QR codes.
7.3.2 Tag reading
The first step in the tag detection pipeline is reading the tags on the 2D image pair. This step takes most of the
processing time and its precision is crucial for the precision of the resulting tag pose. To control the speed of
this step, the quality parameter can be set by the user. It results in a downscaling of the image pair before
reading the tags. “H” (High) yields the largest maximum detection distance and highest precision, but also the
highest processing time. “L” (Low) results in the smallest maximum detection distance and lowest precision,
but processing requires less than half of the time. “M” (Medium) lies in between. Please note that this quality
parameter has no relation to the quality parameter of Stereo matching (Section 6.2).
Fig. 7.3.3: Visualization of module size 𝑠, size of a tag in modules 𝑟, and size of a tag in meters 𝑡 for AprilTags
(left) and QR codes (right)
The maximum detection distance 𝑧 at quality “H” can be approximated by using the following formulae,
𝑧 =
𝑓𝑠
𝑝
,
𝑠 =
𝑡
𝑟
,
where 𝑓 is the focal length (Section 6.1.2) in pixels and 𝑠 is the size of a module in meters. 𝑠 can easily be
calculated by the latter formula, where 𝑡 is the size of the tag in meters and 𝑟 is the width of the code in modules
(for AprilTags without the white border). Fig. 7.3.3 visualizes these variables. 𝑝 denotes the number of image
pixels per module required for detection. It is different for QR codes and AprilTags. Moreover, it varies with the
tag’s angle to the camera and illumination. Approximate values for robust detection are:
• AprilTag: 𝑝 = 5 pixels/module
• QR code: 𝑝 = 6 pixels/module
The following tables give sample maximum distances for different situations, assuming a focal length of 1075
pixels and the parameter quality to be set to “H”.
7.3. TagDetect 77