# 手眼标定

手眼标定是一种机器人学与计算机视觉方法，它根据成对的机器人位姿观测和相机位姿观测，估计相机与机器人末端执行器之间、或固定相机与机器人基座之间的刚体变换。在[眼在手上配置](https://www.edgepedia.org/zh/eye-in-hand-configuration)中，相机刚性安装在机器人夹爪上，未知量是相机镜头中心坐标系与夹爪坐标系之间的相对三维位置和姿态；在[眼在手外配置](https://www.edgepedia.org/zh/eye-to-hand-configuration)中，相机固定不动，未知量是相机到基座的变换。<sup>[1](https://kmlee.gatech.edu/me6406/handeye.pdf)</sup> 标定结果让机器人能够把在相机坐标中测得的物体位姿转换到自己的基座坐标系中，这是视觉引导抓取与检查的基础。最近的无标记方法将这两种设置视为由正运动学（从机器人关节角计算夹爪位置）联系的对偶。<sup>[2](https://arxiv.org/pdf/2408.10562)</sup>

| 关键事实 | 数值 |
|---|---|
| 估计的未知量 | 一个4×4刚体变换：相机到夹爪（眼在手上）或相机到基座（眼在手外）<sup>[1](https://kmlee.gatech.edu/me6406/handeye.pdf)</sup> |
| 控制方程 | \( AX = XB \)，其中 \( A \) 和 \( B \) 分别为机器人侧和相机侧的相对运动<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC6631330/)</sup> |
| 最少数据 | 2个旋转轴不平行的运动，即至少3个位姿；建议更多<sup>[4](https://docs.rs/opencv/latest/opencv/calib/fn.calibrate_hand_eye_def.html)</sup> |
| 实际位姿数 | 10个或更多位姿，旋转至少30°（HALCON）；15–20次眼在手上移动或10–20幅眼在手外图像（RealMan）；约36个变换（camodocal）<sup>[5](https://www.mvtec.com/doc/halcon/11/en/calibrate_hand_eye.html)</sup><sup> • </sup><sup>[6](https://develop.realman-robotics.com/en/AI/developerGuide/hand/)</sup><sup> • </sup><sup>[7](https://github.com/jhu-lcsr/handeye_calib_camodocal/)</sup> |
| 典型实验室残差 | 0.456°旋转和5.41 mm平移（ViSP Franka + RealSense示例，工厂内参）<sup>[8](https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-calibration-extrinsic-eye-in-hand.html)</sup> |
| 机器人噪声下限 | 末端执行器位置精度约0.1–0.2 mm；重复性一般为0.1–0.3 mm<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC6631330/)</sup> |
| 机器人–世界变体 | \( AX = ZB \) 或 \( AX = YB \)，同时求解基座/世界与工具/相机变换<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC6631330/)</sup><sup> • </sup><sup>[9](https://doi.org/10.1109/70.313105)</sup> |

## 工作原理

每个位姿对在机器人侧产生一个相对运动 \( A \)，由两个夹爪位姿之间的正运动学计算得到；在相机侧产生一个相对运动 \( B \)，由目标到相机的位姿估计计算得到。由于相机和夹爪刚性连接，两者描述的是同一个物理运动，从而给出齐次变换方程 \( AX = XB \)，其中 \( X \) 是未知的手眼变换。<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC6631330/)</sup> 该方程的单个实例有无限多个解：\( X \) 的旋转轴方向和位置还留有两个自由参数。因此，唯一解至少需要两个独立运动，几何上意味着至少三个机器人位置；由单个运动得到的线性系统是秩亏的。<sup>[10](https://people.csail.mit.edu/tieu/stuff/FassiHandEye2005.pdf)</sup><sup> • </sup><sup>[11](https://ar5iv.labs.arxiv.org/html/2311.12655)</sup> 当有两个或更多方程时，在噪声存在下系统变为超定，最佳近似解在最小二乘意义下最小化 \( AX - XB \) 的[欧几里得范数](https://www.edgepedia.org/zh/euclidean-norm)。<sup>[10](https://people.csail.mit.edu/tieu/stuff/FassiHandEye2005.pdf)</sup> 以这种方式组合位姿，还从方程中消去了基座坐标系中未知的目标位姿。<sup>[12](https://github.com/moveit/moveit_tutorials/blob/master/doc/hand_eye_calibration/hand_eye_calibration_tutorial.rst)</sup>

一个相关的表述——机器人–世界标定，或称手眼标定——写作 \( AX = ZB \)（等价地 \( AX = YB \)），其中 \( X \) 是基座到世界的变换，\( Z \) 是工具到相机的变换；两者同时求解。<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC6631330/)</sup><sup> • </sup><sup>[9](https://doi.org/10.1109/70.313105)</sup>

## 操作流程

OpenCV的calibrate_hand_eye中实现的标准流程有三步。<sup>[4](https://docs.rs/opencv/latest/opencv/calib/fn.calibrate_hand_eye_def.html)</sup> 首先，观察一个静态标定图案，并估计目标到相机的位姿，通常通过从图案检测结果中求解透视n点（PnP）问题来完成。其次，将夹爪移动到一系列位姿；对每个位姿，从机器人运动学记录夹爪到基座的变换，并从图像记录目标到相机的变换。第三，求解器返回相机到夹爪的旋转和平移。

目标选择很重要。用张正友标定法（Zhang's method）定位的棋盘格很常见，但运动恢复结构虽然无需图案，却会继承额外误差，降低整体标定精度。<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC6631330/)</sup> 基于camodocal的ROS节点推荐ArUco风格基准标记而非棋盘格，因为棋盘格图案在旋转下存在歧义。<sup>[7](https://github.com/jhu-lcsr/handeye_calib_camodocal/)</sup>

位姿采集指南在不同来源中趋于一致：OpenCV要求至少3个位姿，并强烈建议更多；<sup>[4](https://docs.rs/opencv/latest/opencv/calib/fn.calibrate_hand_eye_def.html)</sup> HALCON建议10个或更多位姿，绕至少两个不同轴旋转至少30°，最好60°；<sup>[5](https://www.mvtec.com/doc/halcon/11/en/calibrate_hand_eye.html)</sup> RealMan指南建议15–20次眼在手上移动或10–20幅眼在手外图像；<sup>[6](https://develop.realman-robotics.com/en/AI/developerGuide/hand/)</sup> camodocal建议约36个精确变换。<sup>[7](https://github.com/jhu-lcsr/handeye_calib_camodocal/)</sup> MoveIt报告质量通常在约12–15个样本后趋于平稳。<sup>[12](https://github.com/moveit/moveit_tutorials/blob/master/doc/hand_eye_calibration/hand_eye_calibration_tutorial.rst)</sup>

验证使用求解器的残差。HALCON使用与输入位姿相同的单位，返回平移和旋转误差的均方根与最大值；<sup>[5](https://www.mvtec.com/doc/halcon/11/en/calibrate_hand_eye.html)</sup> 一项比较研究列出平均旋转误差（度）、平均平移误差（mm）和重投影误差作为推荐的指标。<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC6631330/)</sup> 一旦标定完成，除非相机–机械臂相对位置发生变化，否则无需重新标定；测得的物体位姿通过组合末端执行器、手眼和物体在相机中的变换，变换到基座坐标系。<sup>[6](https://develop.realman-robotics.com/en/AI/developerGuide/hand/)</sup>

## 起源

针对腕部安装机器人传感器的 \( AX=XB \) 表述，由Y.C. 希乌（Y.C. Shiu）与S. 艾哈迈德（S. Ahmad）于1989年以期刊形式发表在《IEEE机器人学与自动化汇刊》（IEEE Transactions on Robotics and Automation）上，<sup>[1](https://kmlee.gatech.edu/me6406/handeye.pdf)</sup> R.Y. 蔡（R.Y. Tsai）与R.K. 伦茨（R.K. Lenz）也独立地在同一年同一期刊上发表了他们高效的三维手/眼标定技术。<sup>[13](https://doi.org/10.1109/70.34770)</sup> 两者都建立在1987年发表的早期会议版本之上。<sup>[14](https://people.csail.mit.edu/tieu/stuff/Tsai.pdf)</sup> 同时求解旋转和平移的非线性方法由拉杜·霍劳德（Radu Horaud）和法迪·多尔奈卡（Fadi Dornaika）在他们1995年《国际机器人研究杂志》（IJRR）论文《手眼标定》（"Hand-Eye Calibration"）中提出。<sup>[15](https://doi.org/10.1177/027836499501400301)</sup>

## 变体

求解器分为两类。可分离方法先估计旋转，再估计平移。希乌与艾哈迈德将旋转角的正弦和余弦视为独立未知量，使未知数数量翻倍；而蔡与伦茨利用冗余坐标系保持未知数数量不变。<sup>[1](https://kmlee.gatech.edu/me6406/handeye.pdf)</sup> 帕克（Park）与马丁（Martin）于1994年在[欧几里得群](https://www.edgepedia.org/zh/euclidean-group)上求解 \( AX=XB \)，<sup>[16](https://doi.org/10.1109/70.326576)</sup> 霍劳德与多尔奈卡还提出了一种可分离变体，后来在OpenCV中实现。<sup>[4](https://docs.rs/opencv/latest/opencv/calib/fn.calibrate_hand_eye_def.html)</sup> 可分离方法通常方向精度好，但位置精度受损，因为旋转误差会传播到平移步骤。<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC6631330/)</sup>

同时估计方法将旋转和平移一起估计。杰克·C.K. 周（Jack C. K. Chou）与M. 卡梅尔（M. Kamel）于1991年提出首个基于四元数的算法，最初用牛顿–拉夫森迭代求解，后来简化为用奇异值分解（SVD）求解的线性系统。<sup>[17](https://doi.org/10.1177/027836499101000305)</sup> 康斯坦丁诺斯·达尼利迪斯（Konstantinos Daniilidis）引入对偶四元数——旋量的代数对应物，证明只有旋量轴的线系数重要，并给出基于SVD的同时解；他的真实与合成实验显示其优于当时另外两种方法。<sup>[18](https://journals.sagepub.com/doi/10.1177/02783649922066213)</sup> 在非线性方面，与蔡–伦茨线性方法和闭式四元数方法相比，霍劳德与多尔奈卡的莱文贝格–马夸特方法被发现在噪声和测量误差方面最稳健；<sup>[11](https://ar5iv.labs.arxiv.org/html/2311.12655)</sup> 多尔奈卡与霍劳德于1998年将非线性最小二乘扩展到同时求解机器人–世界与手眼问题。<sup>[19](https://doi.org/10.1109/70.704233)</sup> 小出（Koide）与梅内加蒂（Menegatti）于2019年将一般手眼标定重新表述为重投影误差最小化。<sup>[20](https://doi.org/10.1109/lra.2019.2893612)</sup> OpenCV提供其中五种求解器（蔡–伦茨、帕克–马丁、霍劳德–多尔奈卡、安德烈夫–霍劳德–埃斯皮奥和达尼利迪斯），默认使用蔡–伦茨。<sup>[4](https://docs.rs/opencv/latest/opencv/calib/fn.calibrate_hand_eye_def.html)</sup>

两类方法在噪声下的比较尚无定论。在UR5e配Azure Kinect的基准测试中发现，同时方法对旋转噪声更耐受，而可分离方法更好地处理平移噪声；<sup>[21](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0273261)</sup> 然而，2024年一项使用13种配置（平均重投影误差0.22 px）的Franka Panda实验发现，两阶段方法比一阶段方法给出更准确的平移，这与标准的误差传播批评相矛盾。<sup>[22](https://www.iri.upc.edu/files/scidoc/2525-Hand-Eye-Calibration-Made-Easy-through-a-Closed-Form-Two-Stage-Method.pdf)</sup>

## 应用

手眼标定支撑视觉引导操作：相机坐标中任何检测到的物体位姿都通过标定变换映射到机器人基座坐标系，从而支持眼在手上和眼在手外相机的抓取、检查与伺服。<sup>[5](https://www.mvtec.com/doc/halcon/11/en/calibrate_hand_eye.html)</sup><sup> • </sup><sup>[6](https://develop.realman-robotics.com/en/AI/developerGuide/hand/)</sup>

典型实验室条件下可达到的精度可以从已记录的示例中读出。[ViSP](https://www.edgepedia.org/zh/visp)教程的Franka + RealSense D435眼在手上运行，使用未考虑畸变的工厂内参，产生了0.456°旋转和5.41 mm平移的平均残差；使用包含畸变的估计内参则给出更小的残差和更准确的标定。<sup>[8](https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-calibration-extrinsic-eye-in-hand.html)</sup> 机器人本身设定了噪声下限：对许多机械臂而言，由关节编码器得到的末端执行器位置精度约为0.1–0.2 mm，重复性一般为0.1–0.3 mm。<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC6631330/)</sup>

## 局限与替代方案

已记录若干失效模式。旋转角接近或等于180°会导致计算中的奇异性，因此基准运动被限制在该阈值以下。<sup>[21](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0273261)</sup> 平行或重合的旋转轴使系统无法求解，必须采集其他数据。<sup>[10](https://people.csail.mit.edu/tieu/stuff/FassiHandEye2005.pdf)</sup> 旋转不足是最常见的实际错误：OpenCV的蔡求解器失败并提示“手眼标定失败！提供足够信息的运动不足——请加入更大幅度的旋转”，解决方法是所有三个轴上的旋转大于30°，并至少使用10组多样化位姿。<sup>[6](https://develop.realman-robotics.com/en/AI/developerGuide/hand/)</sup> 横滚–俯仰–偏航表示可能退化，因此结果应存储为旋转矩阵、对偶四元数或四元数加平移。<sup>[7](https://github.com/jhu-lcsr/handeye_calib_camodocal/)</sup> 相机内参必须保持固定：图像尺寸、焦距、光圈或聚焦的变化会改变内部参数并使标定失效。<sup>[5](https://www.mvtec.com/doc/halcon/11/en/calibrate_hand_eye.html)</sup> 移动平台在移动时容易因振动而丢失标定。<sup>[23](https://ar5iv.labs.arxiv.org/html/2004.12611)</sup>

主要的[结构](https://www.edgepedia.org/zh/structure)性限制是，经典解决方案依赖棋盘格等大型标定物体，其位姿估计精度随物体尺寸增大而提高，这使标定成为一个单独的、耗时的设置阶段，会打断生产。<sup>[23](https://ar5iv.labs.arxiv.org/html/2004.12611)</sup> 一种替代方案将标定物体简化为单个三维点，仅求解平移方程，使机器人实际任务期间能够连续重新标定，而不限制其运动。<sup>[23](https://ar5iv.labs.arxiv.org/html/2004.12611)</sup> 自2023年以来，一波无标记和基于学习的方法解决了同一问题：陈令豪（Linghao Chen）及其同事的EasyHeC使用可微分渲染和空间探索；<sup>[24](https://doi.org/10.1109/lra.2023.3315551)</sup> Kalib用视觉基础模型跟踪机器人上一个预定义的参考点，并用SQPnP求解器估计变换，无需训练网络；<sup>[2](https://arxiv.org/pdf/2408.10562)</sup> Hydra用SAM 2分割机器人，并在[李代数](https://www.edgepedia.org/zh/lie-algebra)上运行点到平面ICP，仅用三种配置就达到约90%的成功标定率；<sup>[25](https://arxiv.org/html/2504.20584v1)</sup> 一种持续学习表述使用蓄水池缓冲区适应随时间变化的相机位姿，而不是从头重新标定。<sup>[26](https://link.springer.com/article/10.1007/s00138-024-01572-w)</sup> 已发表的比较未量化工厂预标定或工具法兰基准标记替代方案。

## References

1. [A new technique for fully autonomous and efficient 3D robotics hand/eye calibration (Tsai & Lenz, IEEE Trans. Robotics and Automation, 1989, full text)](https://kmlee.gatech.edu/me6406/handeye.pdf)
2. [Kalib: Easy Hand-Eye Calibration with Reference Point Tracking (arXiv 2408.10562)](https://arxiv.org/pdf/2408.10562)
3. [Methods for Simultaneous Robot-World-Hand–Eye Calibration: A Comparative Study (Sensors 2019)](https://pmc.ncbi.nlm.nih.gov/articles/PMC6631330/)
4. [calibrate_hand_eye in opencv::calib (OpenCV documentation)](https://docs.rs/opencv/latest/opencv/calib/fn.calibrate_hand_eye_def.html)
5. [calibrate_hand_eye [HALCON Operator Reference]](https://www.mvtec.com/doc/halcon/11/en/calibrate_hand_eye.html)
6. [RealMan Robotics SDK developer guide: Hand-eye Calibration](https://develop.realman-robotics.com/en/AI/developerGuide/hand/)
7. [jhu-lcsr/handeye_calib_camodocal (ROS node integrating CamOdoCal)](https://github.com/jhu-lcsr/handeye_calib_camodocal/)
8. [ViSP Tutorial: Camera eye-in-hand extrinsic calibration](https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-calibration-extrinsic-eye-in-hand.html)
9. [Hanqi Zhuang, Z.S. Roth, R. Sudhakar (1994). Simultaneous robot/world and tool/flange calibration by solving homogeneous transformation equations of the form AX=YB. IEEE Transactions on Robotics and Automation.](https://doi.org/10.1109/70.313105)
10. [Hand to sensor calibration: A geometrical interpretation of the matrix equation AX=XB (Fassi & Legnani, Journal of Robotic Systems, 2005)](https://people.csail.mit.edu/tieu/stuff/FassiHandEye2005.pdf)
11. [Hand-Eye Calibration (Horaud & Dornaika, IJRR 1995; arXiv HTML repost 2311.12655)](https://ar5iv.labs.arxiv.org/html/2311.12655)
12. [MoveIt Hand-Eye Calibration Tutorial](https://github.com/moveit/moveit_tutorials/blob/master/doc/hand_eye_calibration/hand_eye_calibration_tutorial.rst)
13. [R.Y. Tsai, R.K. Lenz (1989). A new technique for fully autonomous and efficient 3D robotics hand/eye calibration. IEEE Transactions on Robotics and Automation.](https://doi.org/10.1109/70.34770)
14. [Real time versatile robotics hand/eye calibration using 3D machine vision (Tsai & Lenz, ICRA 1988)](https://people.csail.mit.edu/tieu/stuff/Tsai.pdf)
15. [Radu Horaud, Fadi Dornaika (1995). Hand-Eye Calibration. The International Journal of Robotics Research.](https://doi.org/10.1177/027836499501400301)
16. [F.C. Park, B.J. Martin (1994). Robot sensor calibration: solving AX=XB on the Euclidean group. IEEE Transactions on Robotics and Automation.](https://doi.org/10.1109/70.326576)
17. [Jack C. K. Chou, M. Kamel (1991). Finding the Position and Orientation of a Sensor on a Robot Manipulator Using Quaternions. The International Journal of Robotics Research.](https://doi.org/10.1177/027836499101000305)
18. [Hand-Eye Calibration Using Dual Quaternions (Daniilidis, IJRR 1999)](https://journals.sagepub.com/doi/10.1177/02783649922066213)
19. [F. Dornaika, R. Horaud (1998). Simultaneous robot-world and hand-eye calibration. IEEE Transactions on Robotics and Automation.](https://doi.org/10.1109/70.704233)
20. [Kenji Koide, Emanuele Menegatti (2019). General Hand–Eye Calibration Based on Reprojection Error Minimization. IEEE Robotics and Automation Letters.](https://doi.org/10.1109/lra.2019.2893612)
21. [Accuracy evaluation of hand-eye calibration techniques for vision-guided robots (PLOS One)](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0273261)
22. [Hand-Eye Calibration Made Easy through a Closed-Form Two-Stage Method](https://www.iri.upc.edu/files/scidoc/2525-Hand-Eye-Calibration-Made-Easy-through-a-Closed-Form-Two-Stage-Method.pdf)
23. [Continuous hand-eye calibration using 3D points (arXiv 2004.12611)](https://ar5iv.labs.arxiv.org/html/2004.12611)
24. [Linghao Chen and colleagues (2023). EasyHeC: Accurate and Automatic Hand-Eye Calibration Via Differentiable Rendering and Space Exploration. IEEE Robotics and Automation Letters.](https://doi.org/10.1109/lra.2023.3315551)
25. [Hydra: Marker-Free RGB-D Hand-Eye Calibration (arXiv 2504.20584)](https://arxiv.org/html/2504.20584v1)
26. [Continual learning approaches to hand–eye calibration in robots (Machine Vision and Applications, 2024)](https://link.springer.com/article/10.1007/s00138-024-01572-w)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

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

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/hand-eye-calibration

English original: https://www.edgepedia.org/hand-eye-calibration
