1. Quick Decision Rules
If you need an immediate engineering default without reading every benchmark:
Pick DICT_4X4_50 (small IDs, long range) or DICT_6X6_250 (strong false-positive rejection). Use only the smallest dictionary size you need.
Pick AprilTag tag36h11 (587 IDs, Hamming distance 11) — universally supported by apriltag_ros, OpenCV, and pupil-apriltags.
Pick tagStandard41h12 (2,115 IDs, 5-cell pose core) or tagCustom48h12 (42,211 IDs with a 2×2 center cutout for recursive/nested tags).
Use ETH Kalibr AprilGrid (tag36h11 with 2-bit black border + auxiliary corner blocks), not bare AprilTags.
2. Architecture & Metric Comparison
Key structural differences verified against OpenCV 4.13.0 and AprilRobotics/apriltag C source:
| Dimension | OpenCV ArUco | AprilTag 3 Classic | AprilTag 3 Reversed Border |
|---|---|---|---|
| Representative Families | DICT_4X4_50 .. DICT_7X7_1000 | tag16h5, tag25h9, tag36h11 | tagStandard41h12, tagCircle21h7, tagCustom48h12 |
| Border Polarity | Black border inside white quiet zone | Black border inside white quiet zone | White inner ring + outer data ring (black core border) |
| Corner Order (0–3) | CW from Top-Left [TL, TR, BR, BL] | CCW from Bottom-Left [BL, BR, TR, TL] | CCW from Bottom-Left [BL, BR, TR, TL] |
| Pose Size Reference | Outer black border edge (mm) | width_at_border (8 cells for 36h11) | width_at_border (5 cells for 41h12 — NOT outer width!) |
| False-Positive Guard | Shrink ID count (50 vs 1000) | Prefer tag36h11 over tag16h5 | High Hamming (h=12) + white border rejects clutter |
3. The width_at_border vs total_width Pose Trap
The #1 cause of scaled 3D translation errors in AprilTag deployments is measuring the printed outer artwork width instead of the detector’s homography border width (width_at_border).
AprilTag’s homography and ROS 2 apriltag_ros size parameter measure width_at_border (the black-to-white transition quad), NOT total_width. For tag36h11, full artwork with 1-cell white border is 10/8 = 1.25× wider; for reversed-border tagStandard41h12, total_width is 9/5 = 1.80× wider! Entering total_width into apriltag_ros scales Z distance by 1.80×.
4. Complete AprilTag 3 Family Reference
All 6 official AprilRobotics families supported natively by Movid’s generator and 45 KB WASM scanner:
| Family | IDs | Hamming (h) | total_width / width_at_border |
|---|---|---|---|
| tag16h5 | 30 | 5 (high FP risk) | 8 / 6 = 1.333× |
| tag25h9 | 35 | 9 | 9 / 7 = 1.286× |
| tag36h11 | 587 | 11 (robotics default) | 10 / 8 = 1.250× |
| tagStandard41h12 | 2,115 | 12 (reversed border) | 9 / 5 = 1.800× |
| tagCircle21h7 | 38 | 7 (circular data) | 9 / 5 = 1.800× |
| tagCustom48h12 | 42,211 | 12 (2×2 center cutout) | 10 / 6 = 1.667× |
5. Verified OpenCV 4.13 Detection Snippets
Both snippets below are automatically executed in Movid’s CI pipeline against rasterized vector PDF outputs:
import cv2
# OpenCV >= 4.7 API (tested on OpenCV 4.13.0)
img = cv2.imread("captured_aruco.png", cv2.IMREAD_GRAYSCALE)
dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_6X6_250)
params = cv2.aruco.DetectorParameters()
params.markerBorderBits = 1 # Set to 2 only if printed with borderBits=2
detector = cv2.aruco.ArucoDetector(dictionary, params)
corners, ids, _ = detector.detectMarkers(img)
print("Detected ArUco IDs:", [] if ids is None else ids.flatten().tolist())
import cv2
# OpenCV 4.x includes built-in AprilTag 36h11 detection via cv2.aruco
img = cv2.imread("captured_apriltag.png", cv2.IMREAD_GRAYSCALE)
dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_APRILTAG_36h11)
detector = cv2.aruco.ArucoDetector(dictionary)
corners, ids, _ = detector.detectMarkers(img)
print("Detected AprilTag 36h11 IDs:", [] if ids is None else ids.flatten().tolist())
6. Four Common Field Pitfalls
16-bit False Positives in Cluttered Scenes
DICT_4X4_1000 and tag16h5 have small Hamming margins. Always choose the smallest dictionary capacity (e.g. DICT_4X4_50) or upgrade to tag36h11 / DICT_6X6_250.
Printer “Fit to Page” Silent Scaling
PDF viewers often shrink A4 prints to ~96%, introducing a hidden 4% translation error. Always print at 100% Actual Size and verify Movid’s X and Y check rulers with a caliper.
Missing White Quiet Zone
Trimming paper flush against the black border destroys edge gradient contrast. Leave at least 1–2 cell widths of uninterrupted matte white margin around standard tags.
Mixing Up ArUco CW vs AprilTag CCW Corners
OpenCV ArUco orders corners clockwise from top-left; AprilTag orders counter-clockwise from bottom-left. Never reuse an ArUco object-point array verbatim for AprilTag solvePnP.
Launch Verified Tools with Guide Presets
Generate DICT_6X6_250 ID 42 (100 mm)
Vector PDF + SVG with dual-axis check rulers and matched OpenCV code.
Generate tagStandard41h12 (100 mm border)
Inspect live 100 mm pose border vs 180 mm full layout and export ROS 2 YAML.
Verify Your Printed Target Live
Confirm ID, Hamming error, and corner 0–3 orientation in your browser.