# ArUco

**ArUco** 是一个开源的方形基准标记（印刷的参考物体，相机通过识别它来确定位置）系统，用于相机位姿估计。计算机视觉库在图像中检测、识别并定位这些印刷的黑白方形标记。该系统由西班牙科尔多瓦大学的 S. Garrido-Jurado、R. Muñoz-Salinas、F.J. Madrid-Cuevas 和 M.J. Marín-Jiménez 开发，2014 年发表于《模式识别》（*Pattern Recognition*），并以 BSD 许可证在 ArUco 库中发布<sup>[1](https://andrewd.ces.clemson.edu/courses/cpsc482/papers/GMMM14_arucoMarkers.pdf)</sup>。其名称源自创建该系统的西班牙“科尔多瓦大学增强现实”研究组（Augmented Reality University of Córdoba，简称 Ava）<sup>[2](https://github.com/paroj/aruco)</sup>。如今，一个实现已并入 OpenCV，使 ArUco 成为机器人学和增强现实领域广泛使用的基准标记软件包<sup>[3](https://doi.org/10.1007%2Fs10846-020-01307-9)</sup>。

| 关键事实 | 详情 |
|---|---|
| 标记设计 | 一种合成方形标记，外缘为宽黑边框，内部为二进制矩阵，矩阵决定其标识符（id）；边框便于快速检测，二进制编码则支持识别及错误检测与纠正<sup>[4](https://docs.opencv.org/5.0/tutorials/objdetect/aruco_detection/aruco_detection.html)</sup> |
| 原始发表 | Garrido-Jurado 等，《模式识别》47(6): 2280–2292，2014 年 6 月，科尔多瓦大学<sup>[1](https://andrewd.ces.clemson.edu/courses/cpsc482/papers/GMMM14_arucoMarkers.pdf)</sup> |
| 字典属性 | 字典大小（标记数量）和标记大小（每边比特数，如 4x4 = 16 比特）；标记间距离，即标记之间的最小汉明距离，决定纠错能力<sup>[4](https://docs.opencv.org/5.0/tutorials/objdetect/aruco_detection/aruco_detection.html)</sup> |
| 原始编码 | 一种略作修改的汉明码：5 行 5 列共 25 比特，其中 10 比特携带真实信息，可容纳 1024 个不同标记<sup>[2](https://github.com/paroj/aruco)</sup> |
| OpenCV 状态 | 在 OpenCV 4.7.0（2022 年 12 月）中，ArUco 和 ChArUco 从 opencv_contrib 移至主仓库的 objdetect 模块<sup>[5](https://opencv.org/blog/opencv-4-7-0/)</sup> |
| 速度 | ArUco3 检测方法显著快于 OpenCV 实现，在 4K 分辨率下最低加速比为 17，最佳情况下可达 40<sup>[6](https://andrewd.ces.clemson.edu/courses/cpsc482/papers/RMM18_speededAruco.pdf)</sup> |
| 与 AprilTag 的比较 | 在一项无人机精确着陆研究中，AprilTag 在全分辨率下最远可检测 34.7 米处的标记，而 ArUco 约为 16 米，但 ArUco 计算时间更短、误报更少<sup>[7](https://www.mdpi.com/2079-9292/15/8/1582)</sup> |

## 标记与字典

ArUco 标记是一种合成方形标记，由宽黑边框和决定其标识符的内部二进制矩阵组成。黑色边框便于在图像中快速检测，二进制编码则支持识别以及错误检测与纠正技术的应用。大小为 4x4 的标记由 16 比特组成<sup>[4](https://docs.opencv.org/5.0/tutorials/objdetect/aruco_detection/aruco_detection.html)</sup>。

标记在环境中可能以旋转后的姿态出现，检测过程必须确定其原始旋转，以便明确识别每个角点；这同样通过二进制编码完成<sup>[4](https://docs.opencv.org/5.0/tutorials/objdetect/aruco_detection/aruco_detection.html)</sup>。

**字典**是特定应用中所考虑的一组标记，即其标记的二进制编码列表。其主要属性为字典大小（标记数量）和标记大小（每边比特数）。第三个属性是标记间距离，即字典中标记之间的最小汉明距离，决定字典检测和纠正错误的能力。字典越小、标记越大，标记间距离越大；而标记越大越难检测，因为需要从图像中提取更多比特。因此，如果一个应用只需要 10 个标记，那么由这 10 个标记组成的字典比包含 1000 个标记的字典抗错性更强<sup>[4](https://docs.opencv.org/5.0/tutorials/objdetect/aruco_detection/aruco_detection.html)</sup>。

标记 id 并非其二进制编码的十进制值，而只是该标记在其字典中的索引，因此字典中前五个标记的 id 为 0 到 4<sup>[4](https://docs.opencv.org/5.0/tutorials/objdetect/aruco_detection/aruco_detection.html)</sup>。

2014 年引入该系统的论文提出了一种生成可配置标记字典的算法，可按大小和比特数配置，使标记间距离和比特跳变次数最大化，并推导出了方形二进制标记字典所能具有的最大理论标记间距离<sup>[1](https://andrewd.ces.clemson.edu/courses/cpsc482/papers/GMMM14_arucoMarkers.pdf)</sup>。

## 检测与位姿估计

检测为每个标记返回其四个角点在图像中的位置（按原始顺序，从左上角开始顺时针）以及标记 id。该过程有两个主要步骤：候选检测和内部编码分析。第二步中，通过透视变换将候选区域变换至其规范形式，使用 Otsu 方法对规范图像进行阈值处理以分离白比特和黑比特，然后根据标记大小和边框大小将图像划分为单元格<sup>[8](https://github.com/opencv/opencv/blob/5.x/doc/tutorials/objdetect/aruco_detection/aruco_detection.markdown)</sup>。

在 OpenCV 中，检测由 `cv::aruco::ArucoDetector` 对象执行，该对象使用字典（如预定义的 `cv::aruco::DICT_6X6_250`，即 250 个 6x6 比特的标记）和用于定制检测过程的 `cv::aruco::DetectorParameters` 对象构造。最初的步骤之一是对输入图像进行自适应阈值处理，由窗口大小区间 `adaptiveThreshWinSizeMin` 到 `adaptiveThreshWinSizeMax` 以及窗口大小之间的步长等参数控制；阈值处理后，检测并过滤轮廓，以便在进入计算代价更高的后续阶段之前丢弃可能性较低的候选区域<sup>[4](https://docs.opencv.org/5.0/tutorials/objdetect/aruco_detection/aruco_detection.html)</sup>。

检测完成后，相机相对于标记的位姿是从标记坐标系到相机坐标系的三维变换，由旋转向量和平移向量表示。估计该位姿需要相机的标定参数，即相机矩阵和畸变系数，OpenCV 提供 `cv::solvePnP()` 函数进行计算；平移向量以标记边长所用的同一单位表示<sup>[8](https://github.com/opencv/opencv/blob/5.x/doc/tutorials/objdetect/aruco_detection/aruco_detection.markdown)</sup>。

## 板与 ChArUco

单个标记可以组合成板。使用 ArUco 板而非单个标记，可以在部分标记被遮挡时仍估计位姿，`cv::aruco::GridBoard` 由标记数量和标记字典等参数定义<sup>[8](https://github.com/opencv/opencv/blob/5.x/doc/tutorials/objdetect/aruco_detection/aruco_detection.markdown)</sup><sup> • </sup><sup>[9](https://github.com/opencv/opencv/blob/5.x/doc/tutorials/objdetect/aruco_board_detection/aruco_board_detection.markdown)</sup>。

**ChArUco 板**将棋盘格与 ArUco 标记相结合。它们将高精度的角点检测与可识别的标记 ID 相结合，这使其尤其适用于相机标定<sup>[10](https://documentserver.uhasselt.be/bitstream/1942/47203/1/ecb7b4a6-8105-4034-8b02-cbe29679f9e9.pdf)</sup>。由于板比单个标记拥有更多角点，相机位姿估计变得更加精确<sup>[2](https://github.com/paroj/aruco)</sup>。

2014 年的论文还通过将多个标记与颜色分割计算出的遮挡掩膜相结合，解决了增强现实应用中的遮挡问题<sup>[1](https://andrewd.ces.clemson.edu/courses/cpsc482/papers/GMMM14_arucoMarkers.pdf)</sup>。

## 与其他标记系统的性能比较

ArUco 经常与 ARTag、[AprilTag](https://www.edgepedia.org/zh/apriltag) 和 [STag](https://www.edgepedia.org/zh/stag) 等其他广泛使用的方形基准标记软件包进行比较<sup>[3](https://doi.org/10.1007%2Fs10846-020-01307-9)</sup>。在一项跨距离、方向、光照条件和三种计算平台的实验比较中，AprilTag、ArUco 和 STag 的检测率均大于 90%，仅 STag 在低分辨率数据、正常条件下 80° 角时出现一个异常值。ArUco 在检测率上始终具有竞争力，但平均误差和标准差通常高于 AprilTag，表明精度较低。在计算成本方面，AprilTag 在所有平台上都是开销最大的软件包，而 ArUco 与 ARTag 和 STag 的计算需求相对较低<sup>[11](https://www.researchgate.net/profile/Nikolaos_Vitzilaios/publication/347154054_Experimental_Comparison_of_Fiducial_Markers_for_Pose_Estimation/links/664cbe1522a7f16b4f40c667/Experimental-Comparison-of-Fiducial-Markers-for-Pose-Estimation.pdf)</sup>。

一项 2026 年关于无人航空系统精确定位的研究报告了互补的权衡关系：AprilTag 标记可达到的最大检测距离显著更大，全分辨率下可达 34.7 米，而 ArUco 标记则限于约 16 米；尽管如此，OpenCV 的 ArUco 检测器在高分辨率下的处理速率达到 AprilTag 的两倍多（ArUco 为 22.8），比较表将 ArUco 评为检测率高、计算时间低、误报少，对部分遮挡具有中等鲁棒性<sup>[7](https://www.mdpi.com/2079-9292/15/8/1582)</sup>。

## 历史与软件生态

原始 ArUco 库是一个仅基于 OpenCV 的极简 C++ 库，用于增强现实标记检测，由科尔多瓦大学 Ava 组作为教育项目开发，以 BSD 许可证分发<sup>[2](https://github.com/paroj/aruco)</sup>。在 OpenCV 中，aruco 模块起源于 opencv_contrib，2015 年 [Google Summer of Code](https://www.edgepedia.org/zh/google-summer-of-code) 期间出现了“用于相机标定的棋盘格与 ArUco 组合”功能<sup>[12](https://opencv.org/blog/opencv-3-1/)</sup>。随着 2022 年 12 月 OpenCV 4.7.0 的发布，ArUco 和 ChArUco 移至主仓库的 objdetect 模块<sup>[5](https://opencv.org/blog/opencv-4-7-0/)</sup>，同时 API 也发生了变化：`DetectorParameters_create()` 被 `cv::aruco::DetectorParameters` 类和用于字典的 `getPredefinedDictionary()` 所取代<sup>[4](https://docs.opencv.org/5.0/tutorials/objdetect/aruco_detection/aruco_detection.html)</sup>。

检测速度一直是后续工作的重点。ArUco3 方法旨在最大化速度的同时保持精度和鲁棒性，在 4K 分辨率下相对 OpenCV 实现的最低加速比为 17，最佳情况下可达 40，且加速比随图像分辨率和观测到的标记面积增大而提高<sup>[6](https://andrewd.ces.clemson.edu/courses/cpsc482/papers/RMM18_speededAruco.pdf)</sup>。深度学习扩展针对经典检测方法难以应对的条件：DeepArUco++ 使用卷积神经网络在挑战性光照条件下进行标记检测和解码，在合成数据上训练，并在困难光照下 ArUco 标记的真实数据集上评估<sup>[13](https://arxiv.org/abs/2411.05552)</sup>。

## 应用

ArUco 标记作为无源、可识别的位置参考，可印刷在纸上并分布在感兴趣区域内，仅需单目相机作为传感器；平面室内定位研究考察了标记数量、标记相对相机的方向以及相机与标记的距离如何影响定位行为<sup>[14](https://arxiv.org/abs/2509.17345)</sup>。在机器人学中，当 GNSS、视觉惯性里程计和 SLAM 不可用或精度不足时，基准标记位姿估计可增强或替代这些方法，提供具有内置故障检测的易于识别的特征<sup>[3](https://doi.org/10.1007%2Fs10846-020-01307-9)</sup>。ArUco 库的 ROS 封装提供高帧率的 AR 标记跟踪、针对最小感知歧义优化的标记生成，以及通过标记板增强的精度，应用于物体位姿估计和视觉伺服<sup>[15](https://index.ros.org/r/aruco_ros/)</sup>。

## References

1. [S. Garrido-Jurado, R. Muñoz-Salinas, F.J. Madrid-Cuevas, M.J. Marín-Jiménez (2014). Automatic generation and detection of highly reliable fiducial markers under occlusion. Pattern Recognition 47(6): 2280–2292.](https://andrewd.ces.clemson.edu/courses/cpsc482/papers/GMMM14_arucoMarkers.pdf)
2. [ArUco: Augmented Reality library from the University of Cordoba (GitHub, paroj/aruco)](https://github.com/paroj/aruco)
3. [M. Kalaitzakis et al. (2021). Fiducial Markers for Pose Estimation: Overview, Applications and Experimental Comparison of the ARTag, AprilTag, ArUco and STag Markers. Journal of Intelligent & Robotic Systems 101:71.](https://doi.org/10.1007%2Fs10846-020-01307-9)
4. [Detection of ArUco Markers, OpenCV Tutorials](https://docs.opencv.org/5.0/tutorials/objdetect/aruco_detection/aruco_detection.html)
5. [OpenCV 4.7.0 Is Now Available!, OpenCV](https://opencv.org/blog/opencv-4-7-0/)
6. [R. Muñoz-Salinas, R. Medina-Carnicer (2020). Speeded Up Detection of Squared Fiducial Markers (ArUco3)](https://andrewd.ces.clemson.edu/courses/cpsc482/papers/RMM18_speededAruco.pdf)
7. [Experimental Evaluation of Precision Positioning in Unmanned Aerial Systems Using Fiducial Markers, Electronics (MDPI), 2026](https://www.mdpi.com/2079-9292/15/8/1582)
8. [aruco_detection.markdown, OpenCV 5.x documentation source (GitHub)](https://github.com/opencv/opencv/blob/5.x/doc/tutorials/objdetect/aruco_detection/aruco_detection.markdown)
9. [aruco_board_detection.markdown, OpenCV 5.x documentation source (GitHub)](https://github.com/opencv/opencv/blob/5.x/doc/tutorials/objdetect/aruco_board_detection/aruco_board_detection.markdown)
10. [Fiducial markers and ArUco extensions, Universiteit Hasselt thesis](https://documentserver.uhasselt.be/bitstream/1942/47203/1/ecb7b4a6-8105-4034-8b02-cbe29679f9e9.pdf)
11. [Experimental Comparison of Fiducial Markers for Pose Estimation (Kalaitzakis et al., full text)](https://www.researchgate.net/profile/Nikolaos_Vitzilaios/publication/347154054_Experimental_Comparison_of_Fiducial_Markers_for_Pose_Estimation/links/664cbe1522a7f16b4f40c667/Experimental-Comparison-of-Fiducial-Markers-for-Pose-Estimation.pdf)
12. [OpenCV 3.1 release notes, OpenCV](https://opencv.org/blog/opencv-3-1/)
13. [DeepArUco++: Improved detection of square fiducial markers in challenging lighting conditions, arXiv:2411.05552](https://arxiv.org/abs/2411.05552)
14. [Investigation of ArUco Marker Placement for Planar Indoor Localization, arXiv:2509.17345](https://arxiv.org/abs/2509.17345)
15. [aruco_ros, ROS Index](https://index.ros.org/r/aruco_ros/)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 工程与制造 › 机器人技术与自动化 › Robot software, AI, and methods › Localization, state estimation, and navigation

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/aruco

English original: https://www.edgepedia.org/aruco
