﻿ 一种利用单幅图像的现场摄像机自标定方法

# 一种利用单幅图像的现场摄像机自标定方法A Live Camera Calibration Method Using Single Image

Abstract: In view of the requirements of the live camera work characteristics on the calibration method, the camera calibration method for the image of a single “Tian” glyph is designed. Based on the van-ishing point theory, the two vanishing points identified by the projection line of two groups of parallel lines in the imaging plane are solved. According to the nature of the vanishing point, the vanishing point determined by another set of parallel lines that are orthogonal to the two groups of parallel lines is solved, the parameter matrix and the rotation matrix in further. Based on the above results, the translation vector is solved by the auxiliary line segment of the world coordinate system origin projection point. Matlab software was used to write the calibration procedure of the method in this paper, 50 groups of experiments were done, and compared with Zhang zhengyou calibration method. The accuracy and stability of this method have been verified by experiments.

1. 引言

2. 摄像机的成像模型

2.1. 摄像机内部模型

$\left[\begin{array}{c}u\\ v\\ 1\end{array}\right]=\left[\begin{array}{ccc}{f}_{x}& 0& {u}_{0}\\ 0& {f}_{y}& {v}_{0}\\ 0& 0& 1\end{array}\right]\left[\begin{array}{c}{x}_{c}/{z}_{c}\\ {y}_{c}/{z}_{c}\\ 1\end{array}\right]$ (1)

2.2. 摄像机外部模型

$\left[\begin{array}{c}{x}_{c}\\ {y}_{c}\\ {z}_{c}\\ 1\end{array}\right]=\left[\begin{array}{cccc}{i}_{x}& {j}_{x}& {k}_{x}& {t}_{1}\\ {i}_{y}& {j}_{y}& {k}_{y}& {t}_{2}\\ {i}_{z}& {j}_{z}& {k}_{z}& {t}_{3}\\ 0& 0& 0& 1\end{array}\right]\left[\begin{array}{c}{x}_{w}\\ {y}_{w}\\ {z}_{w}\\ 1\end{array}\right]=\left[\begin{array}{cc}R& T\\ 0& 1\end{array}\right]\left[\begin{array}{c}{x}_{w}\\ {y}_{w}\\ {z}_{w}\\ 1\end{array}\right]$ (2)

Figure 1. Camera aperture imaging model

${z}_{c}\left[\begin{array}{c}u\\ v\\ 1\end{array}\right]=\left[\begin{array}{cccc}f/{d}_{x}& 0& {u}_{0}& 0\\ 0& f/{d}_{y}& {v}_{0}& 0\\ 0& 0& 1& 0\end{array}\right]\left[\begin{array}{cccc}{i}_{x}& {j}_{x}& {k}_{x}& {t}_{1}\\ {i}_{y}& {j}_{y}& {k}_{y}& {t}_{2}\\ {i}_{z}& {j}_{z}& {k}_{z}& {t}_{3}\\ 0& 0& 0& 1\end{array}\right]\left[\begin{array}{c}{x}_{w}\\ {y}_{w}\\ {z}_{w}\\ 1\end{array}\right]$ (3)

3. 本文的摄像机标定方法

3.1. 摄像机内部参数矩阵的求解

3.1.1. 求解第三个灭点坐标

Figure 2. Calibration method

$\left\{\begin{array}{l}{F}_{1}{F}_{2}\cdot {F}_{3}{O}_{0}=0\\ {F}_{1}{F}_{3}\cdot {F}_{2}{O}_{0}=0\\ {F}_{2}{F}_{3}\cdot {F}_{1}{O}_{0}=0\end{array}$ (4)

3.1.2. 基于灭点性质求解焦距

${O}_{c}{F}_{1}\parallel AB\parallel CD\parallel {B}_{1}{D}_{1}$${O}_{c}{F}_{2}\parallel AD\parallel BC\parallel {A}_{1}{C}_{1}$ 。则可得直线 ${O}_{c}{F}_{1}$${O}_{c}{F}_{2}$${O}_{c}{F}_{3}$ 两两相互垂直。

$\left\{\begin{array}{l}{‖{F}_{1}{F}_{2}‖}^{2}={‖{O}_{c}{F}_{1}‖}^{2}+{‖{O}_{c}{F}_{2}‖}^{2}\\ {‖{F}_{1}{F}_{3}‖}^{2}={‖{O}_{c}{F}_{1}‖}^{2}+{‖{O}_{c}{F}_{3}‖}^{2}\\ {‖{F}_{2}{F}_{3}‖}^{2}={‖{O}_{c}{F}_{2}‖}^{2}+{‖{O}_{c}{F}_{3}‖}^{2}\end{array}$ (5)

3.2. 求解旋转矩阵

$i={\left[\begin{array}{ccc}{i}_{x}& {i}_{y}& {i}_{z}\end{array}\right]}^{\text{T}}$$j={\left[\begin{array}{ccc}{j}_{x}& {j}_{y}& {j}_{z}\end{array}\right]}^{\text{T}}$$k={\left[\begin{array}{ccc}{k}_{x}& {k}_{y}& {k}_{z}\end{array}\right]}^{\text{T}}$ 分别与 ${O}_{c}{F}_{2}$${O}_{c}{F}_{1}$${F}_{3}{O}_{c}$ 的单位方向向量相同。

$i=\left[\begin{array}{c}{i}_{x}\\ {i}_{y}\\ {i}_{z}\end{array}\right]=\frac{{O}_{c}{F}_{2}}{‖{O}_{c}{F}_{2}‖}$ , $j=\left[\begin{array}{c}{j}_{x}\\ {j}_{y}\\ {j}_{z}\end{array}\right]=\frac{{O}_{c}{F}_{1}}{‖{O}_{c}{F}_{1}‖}$ , $k=\left[\begin{array}{c}{k}_{x}\\ {k}_{y}\\ {k}_{z}\end{array}\right]=\frac{{F}_{3}{O}_{c}}{‖{F}_{3}{O}_{c}‖}$ (6)

3.3. 求解平移向量

$T={O}_{c}A=\frac{{O}_{c}a\cdot m}{‖a{d}_{2}‖}$ (7)

Figure 3. Signal of the origin relation between the vanishing point and camera coordinate system

Figure 4. Solve for translation vector notation

$l=\frac{ag}{‖ag‖}$ ，再按照上述方法做辅助线段求解平移向量。则可证，在摄像机视场内已知任何一空间点在世界

4. 实验方法

5. 实验结果及分析

5.1. 实验结果

Figure 5. Checkerboard mesh image

Figure 6. This paper calibrates the pattern

Table 1. Parameter calibration results in two methods

Table 2. External parameter calibration results of two methods

Table 3. Real coordinates and measurement coordinates

Figure 7. World coordinate system

Figure 8. Actual measurement experiment

5.2. 分析与讨论

6. 结语

[1] Abdel-Aziz, Y.I. and Karara, H.M. (1971) Direct Linear Transformation into Object Space Coordinates in Close-Range Photogrammetry. Proceedings of Symposium on Close-Range Photogrammetry, Falls Church, VA, USA, 1-18.

[2] Tsai, R.Y. (1986) An Efficient and Accurate Camera Calibration Technique for 3D Machine Vision. Proc CV PR’86, Miami Beach, Miami, USA, 22-26 June 1986, 364-374.

[3] Martins, H.A., Birk, J.R. and Kelley, R.B. (1981) Camera Models Based on Data from Two Calibration Planes. Computer Graphics and Imaging Processing, 17, 173-180.
https://doi.org/10.1016/0146-664X(81)90024-1

[4] Zhang, Z.Y. (2000) A Flexible New Technique for Camera Calibration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22, 1330-1334.
https://doi.org/10.1109/34.888718

[5] Ma, S.D. (1996) A Self-Calibration Technique for Active Vision System. IEEE Transactions on Robotics and Automation, 12, 114-120.
https://doi.org/10.1109/70.481755

[6] 于洪川, 吴福朝, 袁波, 韦穗. 基于主动视觉的摄像机自标定方法[J]. 机器人, 1999, 18(1): 1-10.

[7] 雷成, 吴福朝, 胡占义. 一种新的基于主动视觉系统的摄像机自标定方法[J]. 计算机学报, 2000, 23(11): 1130-1139.

[8] 朱嘉, 李醒飞, 徐颖欣. 摄像机的一种主动视觉标定法[J]. 光学学报, 2010, 30(5): 1297-1303.

[9] Meng, X.Q. and Hu, Z.Y. (2002) A New Camera Calibration Technique Based on Circular Points. Journal of Software, 13, 957-965.

[10] 全红艳, 张田文. 一新的利用模板进行摄像机自标定的方法[J]. 电子学报, 2005, 33(11): 1941-1945.

[11] 傅丹, 李立春, 徐一丹, 于起峰. 基于直线的射影不变性和极线约束标定摄像机参数[J]. 应用光学, 2008, 29(2): 192-197.

[12] 彭亚丽, 刘芳, 焦李成, 刘侍刚. 基于两对互相垂直平行线的自定标方法[J]. 光子学报, 2009, 38(1): 233-236.

[13] 严红平, 汪凌峰, 潘春洪. 高速公路动态环境下的摄像机自标定[J]. 计算机辅助设计与图形学学报, 2013, 25(7): 1036-1044.

[14] CipolIa, R., Drummond, T. and Roberston, D. (1999) Camera Calibration from Vanishing Points in Images of Architectural Scenes. In: Proceedings of the 10th British Machine Vision Conference Surrey, BMVA Press, University of Nottingham, Nottingham, England, Vol. 2, 38.1-38.10.

[15] Lv, F., Zhao, T. and Nevatia, R. (2006) Camera Calibration from Video of Walking Human. IEEE Transactions on Pattern Analysis and Machine Intelligence, 9, 1513-1518.

[16] 邾继贵, 于之靖. 视觉测量原理与方法[M]. 北京: 机械工业出版社, 2011: 15-17.

[17] 徐德, 谭民, 李原. 机器人视觉测量与控制[M]. 北京: 国防工业出版社, 2015: 40.

Top