-
文中姿态测量系统由单目相机、精密二维载台和被测物体组成。单目相机固定在精密二维载台上,可随着二维载台在俯仰和方位两个方向自由旋转。相机理论上是绕光心旋转,不存在平移向量;但由于相机和载台的中心不重合,存在安装误差,因此相机在旋转前后存在安装误差矢量δt。首先,在旋转前后相机分别采集一幅被测物体的图像,并对采集的图像的特征点进行识别;然后,结合提前标定好的系统参数计算出特征点对应相机坐标系下的三维坐标信息;最后,结合特征点与被测物体的几何约束关系,解算出被测物体在相机坐标系下的姿态信息。
如图1所示,相机在二维载台的旋转带动下,旋转前的相机坐标系Oc1-Xc1Yc1Zc1变为旋转后的相机坐标系Oc2-Xc2Yc2Zc2,空间点P在两个像面坐标系下的像素坐标分别为p1(u1,v1)、p2(u2,v2);在两个相机坐标系下的坐标分别为P1(xc1,yc1,zc1)、P2(xc2,yc2,zc2)。
由相机的针孔成像模型得:
$$ {s_i}\left[ {\begin{array}{*{20}{c}} {{u_i}} \\ {{v_i}} \\ 1 \end{array}} \right] = {{{M}}_1}\left[ {\begin{array}{*{20}{c}} {{x_{ci}}} \\ {{y_{ci}}} \\ {{{\textit{z}}_{ci}}} \end{array}} \right]\left( {i = 1,2} \right) $$ (1) 式中:s1、s2为比例因子;M1为相机的内参矩阵,可由相机标定得到。
经过一次相机旋转,P点在两个相机坐标系下的坐标间的关系为:
$$ \left[ \begin{gathered} {x_{c2}} \\ {y_{c2}} \\ {{\textit{z}}_{c2}} \\ \end{gathered} \right] = {{{R}}_c}\left[ \begin{gathered} {x_{c1}} \\ {y_{c1}} \\ {{\textit{z}}_{c1}} \\ \end{gathered} \right] + {{\delta}} {{t}} $$ (2) 式中:Rc为旋转前的相机坐标系Oc1-Xc1Yc1Zc1到旋转后相机坐标系Oc2-Xc2Yc2Zc2的旋转矩阵;δt为相机旋转前后坐标系由于安装非同轴引起的误差平移矢量。旋转前后的旋转矩阵Rc和误差平移矢量δt可根据载台的旋转角度结合载台与相机间的转换矩阵进行解算得到。
联立公式(1)和(2)得到关于含有两个未知数s1和s2的线性方程组:
$$ {s_1}{{{M}}_1}^{ - 1}\left[ {\begin{array}{*{20}{c}} {{u_2}} \\ {{v_2}} \\ 1 \end{array}} \right] - {s_2}{{{R}}_c}{{{M}}_1}^{ - 1}\left[ {\begin{array}{*{20}{c}} {{u_1}} \\ {{v_1}} \\ 1 \end{array}} \right] = {{\delta}} {{t}} $$ (3) 式中:Rc、δt、M1、p1(u1,v1)、p2(u2,v2)均已知,为减少测量误差,采用最小二乘法解出比例因子s1和s2。通过将求解出的比例因子s1、 s2代入公式(1),可求解出点P在两个相机坐标系下的三维坐标。
用世界坐标系Ow-XwYwZw表征被测物体的位置,P点在世界坐标系Ow-XwYwZw下的坐标与在相机坐标系Oc1-Xc1Yc1Zc1下的坐标满足:
$$ \left[ \begin{gathered} {x_{c1}} \\ {y_{c1}} \\ {{\textit{z}}_{c1}} \\ \end{gathered} \right] = {{R}}\left[ \begin{gathered} {x_w} \\ {y_w} \\ {{\textit{z}}_w} \\ \end{gathered} \right] + {{T}} $$ (4) 式中:R和T分别为世界坐标系Ow-XwYwZw到相机坐标系Oc1-Xc1Yc1Zc1的旋转矩阵和平移矩阵。用旋转矩阵R的三向欧拉角表示被测物体在相机坐标系下的相对姿态角。若P点在世界坐标系下的坐标已知,则可求出被测物体相对相机坐标系下的姿态角。
-
以大地倾角仪坐标系进行测量基准的统一,需要标定出倾角仪和姿态测量系统的位姿变换关系,从而求出在大地倾角仪坐标系下的系统姿态测量结果。
-
单目相机和二维载台的工装校准方面,文中通过视觉关联标定建立眼台校准模型。二维载台的初始坐标系Ot-XtYtZt以二维载台的水平转轴为Xt轴,以其竖直转轴为Zt轴,Yt轴由右手法则确定。姿态测量系统涉及的坐标系定义如图2所示,相机坐标系Oc-XcYcZc、载台坐标系Ot-XtYtZt和棋盘格坐标系Ow-XwYwZw。相机和载台在初始位置处的坐标系为Oc1-Xc1Yc1Zc1、Ot1-Xt1Yt1Zt1,随着二维载台在俯仰方向上绕OtXt轴旋转α、在方位方向上绕OtZt轴旋转γ后,相机和载台的坐标系分别变为Oc2-Xc2Yc2Zc2、Ot2-Xt2Yt2Zt2。通过相机与二维载台的视觉关联标定,即可标定出载台坐标系到相机坐标系的旋转平移矩阵Rct、Tct。
设棋盘格坐标系Ow-XwYwZw到初始位置下相机坐标系Oc1-Xc1Yc1Zc1的旋转平移矩阵为R1、T1,棋盘格坐标系Ow-XwYwZw到旋转后相机坐标系Oc2-Xc2Yc2Zc2的旋转平移矩阵为R2、T2,初始位置的相机坐标系Oc1-Xc1Yc1Zc1到旋转后相机坐标系Oc2-Xc2Yc2Zc2的旋转矩阵为Rc和安装误差矢量δt。
旋转前后的相机坐标系Oc-XcYcZc和棋盘格坐标系Ow-XwYwZw间的坐标转换关系为:
$$ \left[ \begin{gathered} {x_{ci}} \\ {y_{ci}} \\ {{\textit{z}}_{ci}} \\ \end{gathered} \right] = {{{R}}_i}\left[ \begin{gathered} {x_w} \\ {y_w} \\ {{\textit{z}}_w} \\ \end{gathered} \right] + {{{T}}_i}\left( {i = 1,2} \right) $$ (5) 在相机和载台视觉关联标定时,保持棋盘格坐标系Ow-XwYwZw不变,则初始位置相机坐标系Oc1-Xc1Yc1Zc1到旋转后的相机坐标系Oc2-Xc2Yc2Zc2间的坐标关系为:
$$ \left[ \begin{gathered} {x_{c2}} \\ {y_{c2}} \\ {{\textit{z}}_{c2}} \\ \end{gathered} \right] = {{{R}}_2}{{R}}_1^{ - 1}\left[ \begin{gathered} {x_{c1}} \\ {y_{c1}} \\ {{\textit{z}}_{c1}} \\ \end{gathered} \right] - {{{R}}_2}{{R}}_1^{ - 1}{{{T}}_1} + {{{T}}_2} $$ (6) 由公式(2)和(6)可推导出:
$$ \begin{split} &{{{R}}_c} = {{{R}}_2}{{R}}_1^{ - 1} \\ &{{\delta}} {{t}} = {{{T}}_2} - {{{R}}_c}{{{T}}_1} \\ \end{split} $$ (7) 式中:棋盘格坐标系Ow-XwYwZw到相机坐标系Oc-XcYcZc的旋转平移矩阵R1、T1、R2、T2利用单目PNP算法迭代[14]计算得到,据公式(7)可计算出Rc、δt。
由于相机与二维载台是固连的,故载台坐标系到相机坐标系的旋转平移矩阵Rct、Tct是固定不变的。二维载台旋转前后载台坐标系Ot-XtYtZt到相机坐标系Oc-XcYcZc坐标间的关系如下:
$$ \left[ \begin{gathered} {x_{ci}} \\ {y_{ci}} \\ {{\textit{z}}_{ci}} \\ \end{gathered} \right] = {{{R}}_{ct}}\left[ \begin{gathered} {x_{ti}} \\ {y_{ti}} \\ {{\textit{z}}_{ti}} \\ \end{gathered} \right] + {{{T}}_{ct}}\left( {i = 1,2} \right) $$ (8) 二维载台在方位方向上绕载台坐标系Ot1-Xt1Yt1Zt1的OtZt轴旋转γ角,在俯仰方向上绕转动后的OtXt轴旋转α角,载台坐标系变为Ot2-Xt2Yt2Zt2。载台坐标系的中心在旋转前后默认保持不变,故旋转前后载台坐标系间不存在平移矩阵。旋转前后的载台坐标系下的坐标满足:
$$ \left[ \begin{gathered} {x_{t2}} \\ {y_{t2}} \\ {{\textit{z}}_{t2}} \\ \end{gathered} \right] = {{R}}\left( {{{\alpha}} ,{{\gamma}} } \right)\left[ \begin{gathered} {x_{t1}} \\ {y_{t1}} \\ {{\textit{z}}_{t1}} \\ \end{gathered} \right] $$ (9) 其中,旋转前后的载台坐标系间的旋转矩阵R(α,γ)为:
$$ {{R}}\left( {{{\alpha}} ,{{\gamma}} } \right) = \left[ {\begin{array}{*{20}{c}} 1&0&0 \\ 0&{\cos \alpha }&{ - \sin \alpha } \\ 0&{\sin \alpha }&{\cos \alpha } \end{array}} \right]\left[ {\begin{array}{*{20}{c}} {\cos \gamma }&{ - \sin \gamma }&0 \\ {\sin \gamma }&{\cos \gamma }&0 \\ 0&0&1 \end{array}} \right] $$ (10) 式中:α、γ可从二维载台的主控显示终端界面中读出。
根据相机、载台间的位姿闭环关系,由公式(2)、(8)和(9)推导出:
$$ {{{R}}_{ct}}{{R}}\left( {{{\alpha}} ,{{\gamma}} } \right) - {{{R}}_c}{{{R}}_{ct}} = 0 $$ (11) $$ \left( {{{E}} - {{{R}}_c}} \right){{{T}}_{ct}} = {{\delta}} {{t}} $$ (12) 令${{{R}}_{ct}} = \left[ {\begin{array}{*{20}{c}} {{s_1}} & {{s_2}} & {{s_3}} \\ {{s_4}} & {{s_5}} & {{s_6}} \\ {{s_7}} & {{s_8}} & {{s_9}} \end{array}} \right]$、${{R}}\left( {{{\alpha}} ,{{\gamma}} } \right) = \left[ {\begin{array}{*{20}{c}} {{m_1}} & {{m_2}} & {{m_3}} \\ {{m_4}} & {{m_5}} & {{m_6}} \\ {{m_7}} & {{m_8}} & {{m_9}} \end{array}} \right]$、$ {{{R}}_c} = \left[ {\begin{array}{*{20}{c}} {{n_1}} & {{n_2}} & {{n_3}} \\ {{n_4}} & {{n_5}} & {{n_6}} \\ {{n_7}} & {{n_8}} & {{n_9}} \end{array}} \right] $,将公式(11)整理为线性方程组:
$$ \left[ {\begin{array}{*{20}{c}} {{m_1} - {n_1}}&{{m_4}}&{{m_7}}&{ - {n_2}}&0&0&{ - {n_3}}&0&0 \\ {{m_2}}&{{m_5} - {n_1}}&{{m_8}}&0&{ - {n_2}}&0&0&{ - {n_3}}&0 \\ {{m_3}}&{{m_6}}&{{m_9} - {n_1}}&0&0&{ - {n_2}}&0&0&{ - {n_3}} \\ { - {n_4}}&0&0&{{m_1} - {n_5}}&{{m_4}}&{{m_7}}&{{n_6}}&0&0 \\ 0&{ - {n_4}}&0&{{m_2}}&{{m_5} - {n_5}}&{{m_8}}&0&{{n_6}}&0 \\ 0&0&{ - {n_4}}&{{m_3}}&{{m_6}}&{{m_9} - {n_5}}&0&0&{{n_6}} \\ { - {n_7}}&0&0&{ - {n_8}}&0&0&{{m_1} - {n_9}}&{{m_4}}&{{m_7}} \\ 0&{ - {n_7}}&0&0&{ - {n_8}}&0&{{m_2}}&{{m_5} - {n_9}}&{{m_8}} \\ 0&0&{ - {n_7}}&0&0&{ - {n_8}}&{{m_3}}&{{m_6}}&{{m_9} - {n_9}} \end{array}} \right]\left[ {\begin{array}{*{20}{c}} {{s_1}} \\ {{s_2}} \\ {{s_3}} \\ {{s_4}} \\ {{s_5}} \\ {{s_6}} \\ {{s_7}} \\ {{s_8}} \\ {{s_9}} \end{array}} \right] = 0 $$ (13) 在对相机和载台联合标定时,采集88组棋盘格图像并记录对应的二维载台旋转的两个角度,可由公式(7)和(10)计算出对应的旋转矩阵Rc、R(α,γ)。将所有的旋转矩阵整理合并为公式(13)的形式,形成如${{Ax}} = {{0}}$的超定线性方程组。其中$x = \left[ {{s_1}}\;\;{{s_2}}\;\;{{s_3}}\;\;{{s_4}}\;\; {{s_5}}\;\;{{s_6}}\;\;{{s_7}}\;\;{{s_8}}\;\;{{s_9}} \right]^{\rm{T}}$,其为旋转矩阵Rct的9个元素。A为由旋转矩阵Rc、R(α,γ)中的元素组成的9×88行9列的矩阵,利用最小二乘法可得到载台坐标系到相机坐标系下的旋转矩阵Rct,需采用奇异值分解使其强制正交,使Rct具有旋转矩阵的正交性。
设载台坐标系Ot-XtYtZt相对于相机坐标系Oc-XcYcZc的平移矩阵${{{T}}_{ct}} = {\left[ {\begin{array}{*{20}{c}} {{c_1}} & {{c_2}} & {{c_3}} \end{array}} \right]^{\rm{T}}}$,将公式(12)整理为线性方程组:
$$ {{B}}\left[ {\begin{array}{*{20}{c}} {{c_1}} \\ {{c_2}} \\ {{c_3}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{t_1}} \\ {{t_2}} \\ {{t_3}} \end{array}} \right] $$ (14) 式中:${{B}} = {{E}} - {{{R}}_c}$、${{\delta}} {{t}} = \left[ {\begin{array}{*{20}{c}} {{t_1}} & {{t_2}} & {{t_3}} \end{array}} \right]^{\rm{T}}$,棋盘格在任意两个相机姿态下,都可由公式(7)计算出一组B、δt,将其整理为如公式(14)的方程。将多个方程合并为形如$Bx = b$的超定线性方程组。其中x为载台坐标系到相机坐标系的平移向量,b为多组δt组成的平移向量。利用最小二乘法${{x}} = {\left( {{{{B}}^{\rm{T}}}{{B}}} \right)^{ - 1}}{{{B}}^{\rm{T}}}{{b}}$求解得到平移向量Tct,该向量由相机在不同位姿下的平移矩阵共同解算得到,可有效抑制误差的逐级传递。
-
在倾角仪和姿态测量系统的位姿变换关系标定方面,由于倾角仪输出的姿态角定义和旋转矩阵对应的欧拉角的定义不同,故先要对倾角仪输出角度与欧拉角间进行转换。双轴倾角仪输出的角度为俯仰角a和横滚角b,分别为传感器X、Y轴与水平面间的夹角。倾角仪本体坐标系OI-XIYIZI相对于倾角仪零点坐标系OI0-XI0YI0ZI0旋转矩阵对应的欧拉角的旋转顺序定义为:先绕Z轴旋转γ,再绕Y轴旋转β、最后绕X轴旋转α。
图3描述了倾角仪输出角度与欧拉角间的关系。图中OI-XIYI表示倾角仪本体坐标系,Z轴方向的旋转不影响XOY平面,绕Y轴旋转的欧拉角β等于倾角仪XI轴方向与水平面间的夹角即俯仰角a。图中直线AC、BD垂直于水平参考平面,故直线OIE垂直于平面BED和平面OIAC,所以平面BED和平面OIAC平行。延长ED到F使BF平行于OIA,且直线OIA垂直于平面OIBE,可知∠BFE=∠AOIC=a,BF⊥BE,由此可得∠DBE=a,根据几何关系得:
$$ \sin b = \frac{{BD}}{{{O_I}B}} = \frac{{BD}}{{BE}} \times \frac{{BE}}{{{O_I}B}} = \cos a \cdot \sin \alpha $$ (15) 得姿态传感器的输出角度a、b与相应的欧拉角α、β间的关系:
$$ \left\{ \begin{gathered} \beta = a \\ \alpha = \arcsin \left( {\frac{{\sin b}}{{\cos a}}} \right) \\ \end{gathered} \right. $$ (16) 如图4所示,倾角仪在使用前先进行调零校准,调零后倾角仪零点位置坐标系OI0-XI0YI0ZI0相对于相机初始位置坐标系Oc1-Xc1Yc1Zc1的旋转矩阵Rm保持不变。由于倾角仪固定在棋盘格靶标上,故倾角仪本体坐标系OI-XIYIZI到棋盘格坐标系Ow-XwYwZw的旋转矩阵Rg也固定不变。倾角仪零点位置坐标系OI0-XI0YI0ZI0到倾角仪本体坐标系OI-XIYIZI的旋转矩阵R3可由倾角仪示数计算得到,棋盘格坐标系Ow-XwYwZw到相机初始位置坐标系Oc1-Xc1Yc1Zc1的旋转矩阵R1可PNP单目算法求解。在载台的两个旋转角为0°的状态下,拍摄39组不同姿态下的棋盘格图像,并采集倾角仪的示数,得到Rg、Rm的最小二乘解。
标定Rg、Rm后,根据公式(18)将不同姿态下的棋盘格到相机初始位置坐标系的旋转矩阵R1的测量结果变换到倾角仪坐标系下,并将R3按照公式(19)进行三向欧拉角的分解,得到倾角仪本体坐标系OI-XIYIZI相对于倾角仪零点坐标系OI0-XI0YI0ZI0旋转矩阵对应的绕Z、Y、X轴的欧拉角为γ、β、α,将α、β代入公式(16)解算出物体姿态测量值在倾角仪坐标系下的倾角值a、b,与物体位姿真值——倾角仪读数进行比较,用于物体姿态测量值两轴方向的精度评价。
$$ {{{R}}_{3\_cal}} = {\left( {{{{R}}_1}{{{R}}_g}} \right)^{\rm{T}}}{{{R}}_m} $$ (18) $$ {{R}} = {{{R}}_X}\left( {{\alpha}} \right){{{R}}_Y}\left( {{\beta}} \right){{{R}}_Z}\left( {{\gamma}} \right) = \left[ {\begin{array}{*{20}{c}} {\cos \beta \cos \gamma }&{ - \cos \beta \sin \gamma }&{\sin \beta } \\ {\sin \alpha \sin \beta \cos \gamma + \cos \alpha \sin \gamma }&{ - \sin \alpha \sin \beta \sin \gamma + \cos \alpha \cos \gamma }&{ - \sin \alpha \cos \beta } \\ { - \cos \alpha \sin \beta \cos \gamma + \sin \alpha \sin \gamma }&{\cos \alpha \sin \beta \sin \gamma + \sin \alpha \cos \gamma }&{\cos \alpha \cos \beta } \end{array}} \right] $$ (19) 式中:γ、β、α分别为依次绕Z、Y、X轴旋转的三向欧拉角。
-
为验证文中方法的有效性,构建了单目位姿测量实验环境,实验场景如图5所示。测量系统由单目相机、精密二维载台和靶标组成。测量相机采用Basler scA1600-14 gm相机,1/1.8 in(1 in=2.54 cm)CCD,2 MP分辨率,像元大小4.4 μm;镜头为25 mm定焦镜头;采用LE-30双轴倾角仪测量值作为姿态角真值,倾角仪双轴的测量范围为±30°,测量精度为±0.01°;精密二维载台可以绕俯仰轴和方位轴转动,两轴的旋转角范围为±45°,转角精度为±0.04°,可在主控终端界面数值显示。被测棋盘格为12×9视觉靶标,每个方格的边长为20 mm。
-
标定包括相机标定、相机与二维载台的视觉关联标定和倾角仪标定,标定得到的参数如表1所示。其中,fu、fv为相机焦距信息,u0、v0为主点位置信息,kc为镜头畸变系数,Rct_eul为相机坐标系与载台坐标系的旋转矩阵Rct对应的三向欧拉角,Tct为相机坐标系与载台坐标系的平移向量,Rg_eul为倾角仪本体坐标系到棋盘格坐标系的旋转矩阵Rg对应的三向欧拉角,Rm_eul为倾角仪零点位置坐标系相对于相机初始位置坐标系的旋转矩阵Rm对应的三向欧拉角。
表 1 系统标定参数
Table 1. System calibration parameter
fu,fv/pixel u0,v0/pixel kc Camera 5764.37,
5766.97840.86,
609.35[−0.14, 1.77, −0.0003,
0.0021, 0.00]Rct_eul/rad [1.5857, 0.0174, 0.0032] Tct/mm [9.6939, −6.5506, −103.1031] Rg_eul/rad [−1.5001, −0.0071, 3.1308] Rm_eul/rad [−1.4822, −0.0398, 1.2351] 1)相机标定
相机标定采用张氏标定法[15],标定出的主要参数见表1,得到相机焦距fu、fv分别为5 764.37、5 766.97 pixel,主点位置u0、v0分别为840.86、609.35 pixel,径向畸变系数k1、k2分别为−0.14、1.77,切向畸变系数p1、p2分别为−0.0003、0.0021,且标定重投影误差为0.08 pixel。
2)相机与二维载台的视觉关联标定
相机与二维载台视觉关联标定的具体流程为:保持棋盘格位置不动,相机在载台的转动下分别采集棋盘格图像,记录载台在俯仰和方位两个方向的转动角。二维载台在未转动时,其俯仰角和方位角均为0°。标定时,精密二维载台的俯仰角取值范围为−3°~4°、方位角取值范围为−5°~5°,均以1°为采样间隔,最终,共采集了88组不同相机姿态下对应的棋盘格图像,其中的24幅棋盘格图像如图6所示。标定出的Rct对应的角度信息和平移向量Tct见表1。
相机与二维载台视觉关联标定的计算步骤如下:
步骤一: 取任意一个载台角度在非0°位置和0°位置处的两个棋盘格图像,根据公式(7)可以计算出相机在这两个位置处的旋转矩阵Rc和误差矢量δt;
步骤二:根据二维载台在旋转前后的位置关系,由载台对应位置的俯仰角和方位角的变化量代入公式(10),可计算出旋转前后载台坐标系间的旋转矩阵R(α,γ);
步骤三:重复步骤一和步骤二,直至完成88组图像和对应的载台角度的采集,并计算出对应的Rc、δt和R(α,γ);
步骤四:将步骤三计算出的88组数据整理为如公式(13)和(14)形式的矩阵,利用最小二乘法计算出载台坐标系相对于相机坐标系的旋转和平移矩阵Rct、Tct,完成相机与二维载台的视觉关联标定。
3)倾角仪标定
倾角仪与测量系统的标定流程为:保持二维载台的俯仰角和方位角均为0°,采集39组不同姿态下的棋盘格图像,并记录对应棋盘格位置的倾角仪的读数,保持倾角仪的两个倾角均匀分布在±15°以内。根据公式(17)计算出Rg、Rm。标定出的Rg、Rm对应的角度信息如表1所示。
倾角仪与测量系统标定的标定误差图如图7所示。图中展示了39组不同姿态下的棋盘格的倾角标定误差,将标定出的两个矩阵Rg、Rm代入公式(18)并转换成倾角,与倾角仪上的示数作比较,得到倾角仪与测量系统的标定误差。从图7可以看出,俯仰角和横滚角的标定误差均<0.31°。
-
具体实验过程如下:
1) 固定棋盘格位置,并记录下倾角仪的示数;
2) 调节载台的俯仰角和方位角,使棋盘格在相机的视场范围内,采集棋盘格图像并记录下载台的俯仰角和方位角;
3) 调节载台的两个角度,重复2),直至得到9组棋盘格图像及对应的载台角度;
4) 改变棋盘格位置,使棋盘格的姿态控制在±15°范围内,在棋盘格的俯仰角和横滚角均在+15°、+10°、+5°、−5°、−10°、−15°附近时重复步骤1)~步骤3),得到6个不同棋盘格位置的图像和载台角度。
其中3个棋盘格位置下的两个不同载台视角的图像如图8所示,图中横轴的数字表示载台的俯仰角和方位角。
实验采集了6个棋盘格位置,每个棋盘格位置采集9组棋盘格图像及对应的载台角度,共采集了54组棋盘格图像和对应的载台角度。取棋盘格的俯仰角和横滚角均在−10°附近的实验数据为例,表2为其对应不同载台角度测量的姿态测量数据。
图 8 (a) +15°附近棋盘格位置采集的两幅图像; (b) +5°附近棋盘格位置采集的两幅图像; (c) −15°附近棋盘格位置采集的两幅图像
Figure 8. (a) Two images from the checkerboard position near +15°; (b) Two images from the checkerboard position near +5°; (c) Two images from the checkerboard position near −15°
表 2 在−10°附近棋盘格的姿态角测量数据
Table 2. Checkerboard attitude angle measurements near −10°
Number Measured value/(°) True value/(°) Measurement error/(°) Relative error Pitch Roll Pitch Roll Pitch Roll Pitch Roll 1 −9.95 −11.34 −10.09 −11.06 0.14 −0.28 −1.39% 2.55% 2 −10.10 −11.35 −10.10 −11.06 −0.004 −0.28 0.41% 2.56% 3 −10.02 −11.32 −10.09 −11.06 0.07 −0.25 −0.69% 2.30% 4 −9.95 −11.42 −10.09 −11.06 0.14 −0.35 −1.41% 3.19% 5 −10.12 −11.28 −10.09 −11.06 −0.012 −0.22 0.14% 1.98% 6 −10.04 −11.38 −10.09 −11.06 0.05 −0.32 −0.51% 2.85% 7 −9.92 −11.31 −10.09 −11.06 0.17 −0.24 −1.68% 2.21% 棋盘格6个不同位置处俯仰角和横滚角的测量值与真值如图9所示,图(a)、(b)分别为棋盘格6个位置的俯仰角和横滚角的测量值与真值,两个角度均分布在±15°、±10°、±5°附近。从图9可以看出,俯仰角在真值为+15°、+10°、+5°附近时相比真值为−5°、−10°、−15°附近时的测量误差较大;横滚角的测量误差整体上相较于俯仰角的测量误差较小。
图 9 (a)俯仰角的测量值与真值;(b)横滚角的测量值与真值
Figure 9. (a) The measured value and true value of pitch angle; (b) Measured value and true value of roll angle
棋盘格姿态角测量的误差和相对误差如图10所示。图10(a)和10(b)分别为棋盘格6个位置俯仰角和横滚角的测量误差折线图,俯仰角在真值为15°左右时测量误差最大,测量误差最大为0.82°;而横滚角在真值为−15°左右时测量误差最大,测量误差最大为−0.43°;且横滚角的测量误差的变化范围相对于俯仰角的较小。图10(c)和(d)分别为棋盘格6个位置俯仰角和横滚角测量的相对误差折线图,俯仰角在真值为正时比真值为负的相对误差较大,且在真值为5°左右时,相对误差最大,相对误差最大为6.1%;横滚角在真值为−5°左右时相对误差最大,最大相对误差为−3.4%,且横滚角的相对误差相较于俯仰角整体上较小。
图 10 (a) 俯仰角测量误差折线图;(b) 横滚角测量误差折线图;(c) 俯仰角测量相对误差折线图;(d) 横滚角测量相对误差折线图
Figure 10. (a) Pitch angle measurement error line chart; (b) Roll angle measurement error line chart; (c) Pitch angle measurement relative error line chart; (d) Roll angle measurement relative error line chart
实验还进行了作用距离与姿态误差的测量实验。在作用距离分别为1.82、2.02、2.43、2.64、2.84 m下,所对应的两个姿态角的测量误差分布如图11所示。
从图11可以观察到,在测量距离为2.02 m时测角误差最小,随着测量距离与2.02 m位置偏离程度的增大,对应测角误差相应增大,但均能控制在0.6°测量精度范围内。若进一步通过改善光学系统的视场角大小、成像质量以及进一步深入研究位姿测量模型的优化方法,则可进一步提升该方法的测量精度。
Monocular spatial attitude measurement method guided by two dimensional active pose
-
摘要: 针对空间物体姿态快速测量问题,以构建视觉最小系统需求为依据,研究了一种基于二维主动位姿引导的单目视觉空间姿态测量方法,建立了单目相机、二维载台与倾角仪之间的姿态测量模型,实现了空间物体的姿态角的测量。该方法以大地倾角仪坐标系统一测量系统的测量基准,由精密二维载台引导单目相机覆盖地空大视野三维空间,通过前期标定设计完成了单目相机与二维载台之间的工装校准;建立了载台坐标系、摄像机坐标系以及大地倾角仪坐标系之间的姿态测量传递模型,实现了定轴旋转双视角拍照下的空间物体的姿态解算和角度测量。构建了实验验证环境,测角实验结果表明:在系统测量基准坐标系下,其俯仰角的测量误差≤0.82°,测量相对误差≤6.1%;其横滚角的测量误差≤0.43°,测量相对误差≤3.4%。Abstract:
Objective Monocular vision measurement technology has the advantages of simple structure, low cost, convenient and flexible operation, and there are two types of monocular vision measurement technology in general. One is the combination of monocular camera and measured object, but it needs to design a suitable cooperative target, which has certain limitations. The other is the combination of monocular camera and active sensor, but the adjustment or calibration process of the pose relationship between the camera and the active sensor is more complicated. Aiming at how to quickly measure the pose of space objects, this paper studies a monocular visual spatial pose measurement method based on two-dimensional active pose guidance. This method only requires a camera and a precision two-dimensional carrier to collect one image before and after the carrier rotates, which can complete the rapid attitude measurement of space objects. The attitude measurement method has the advantages of low cost, simple operation and large measuring range, which is less dependent on equipment. Methods A monocular attitude measurement system composed of monocular camera, precision two-dimensional platform and measured object is established. And an attitude measurement model of monocular camera, precision two-dimensional platform and tilt meter is designed. A precision checkerboard image and two angles of the two-dimensional platform under different image positions were taken by the camera for multiple times to carry out joint visual calibration of the camera and the two-dimensional platform (Fig.2). The pose relationship between the camera and the platform was obtained, and the pose relationship between the checkerboard and the initial camera coordinate system was calculated. Based on the coordinate system of the geodetic inclinometer, the pose relationship between the inclinometer and the attitude measuring system was calibrated according to the coordinate system relationship between the inclinometer and the checker (Fig.3), and the measured values were converted to the coordinate system of the inclinometer, realizing the rapid measurement of monocular vision. Results and Discussions A monocular visual spatial pose measurement method based on 2D active pose guidance is studied. Through the acquisition of precision checkerboard images for many times, the pose relationship between the camera and the two-dimensional platform, the inclinometer and the measuring attitude system was obtained, and the calibration errors of pitch angle and roll angle were both < 0.31° (Fig.7). Taking the checkerboard as the measured object, combined with the calibrated parameters, the measurement error is the largest when the pitch angle is about 15°, and the measurement error is 0.82°. When the roll angle is about −15°, the maximum measurement error is −0.43° (Fig.10). Conclusions In this paper, a monocular visual spatial pose measurement method based on 2D active pose guidance is studied, and the attitude measurement model of monocular camera, precision 2D pedestal and inclinometer is established. This method uses only one camera, and does not need to consider the baseline distance under binocular setting. Moreover, this method can realize the rapid measurement of the object's attitude after calibration, and realize the measurement of the object's attitude under fixed-axis dual-angle photography. The experimental results show that the proposed method can be used to measure the attitude of space objects quickly. -
Key words:
- visual measurement /
- attitude measurement /
- monocular vision /
- two-dimensional load
-
表 1 系统标定参数
Table 1. System calibration parameter
fu,fv/pixel u0,v0/pixel kc Camera 5764.37,
5766.97840.86,
609.35[−0.14, 1.77, −0.0003,
0.0021, 0.00]Rct_eul/rad [1.5857, 0.0174, 0.0032] Tct/mm [9.6939, −6.5506, −103.1031] Rg_eul/rad [−1.5001, −0.0071, 3.1308] Rm_eul/rad [−1.4822, −0.0398, 1.2351] 表 2 在−10°附近棋盘格的姿态角测量数据
Table 2. Checkerboard attitude angle measurements near −10°
Number Measured value/(°) True value/(°) Measurement error/(°) Relative error Pitch Roll Pitch Roll Pitch Roll Pitch Roll 1 −9.95 −11.34 −10.09 −11.06 0.14 −0.28 −1.39% 2.55% 2 −10.10 −11.35 −10.10 −11.06 −0.004 −0.28 0.41% 2.56% 3 −10.02 −11.32 −10.09 −11.06 0.07 −0.25 −0.69% 2.30% 4 −9.95 −11.42 −10.09 −11.06 0.14 −0.35 −1.41% 3.19% 5 −10.12 −11.28 −10.09 −11.06 −0.012 −0.22 0.14% 1.98% 6 −10.04 −11.38 −10.09 −11.06 0.05 −0.32 −0.51% 2.85% 7 −9.92 −11.31 −10.09 −11.06 0.17 −0.24 −1.68% 2.21% -
[1] 解则晓, 韩振华, 高翔. 光笔式单目视觉测量系统的关键技术[J]. 中国光学, 2013, 6(5): 780-787. doi: 10.3788/CO.20130605.0780 Xie Zexiao, Han Zhenhua, Gao Xiang. Key technologies of monocular vision measurement system with light pen [J]. Chinese Optics, 2013, 6(5): 780-787. (in Chinese) doi: 10.3788/CO.20130605.0780 [2] 张慧娟, 熊芝, 劳达宝, 等. 基于EPNP算法的单目视觉测量系统研究[J]. 红外与激光工程, 2019, 48(5): 517005-0517005(6). doi: 10.3788/IRLA201948.0517005 Zhang Huijuan, Xiong Zhi, Lao Dabao, et al. Monocular vision measurement system based on EPNP algorithm [J]. Infrared and Laser Engineering, 2019, 48(5): 0517005. (in Chinese) doi: 10.3788/IRLA201948.0517005 [3] Zhang Z, Zhang Y, Cao Y. Monocular vision-based obstacle avoidance trajectory planning for unmanned aerial vehicles[C]//2020 International Conference on Unmanned Aircraft Systems (ICUAS). Athens, GREECE: IEEE, 2020: 627-632. [4] 孙森震, 冯其强, 王力. 可见光通信与双目视觉的室内定位[J]. 光学精密工程, 2020, 28(4): 834-843. DOI: 10.3788/OPE.20202804.0834. Sun Senzhen, Feng Qiqiang, Wang Li. Indoor positioning based on visible light communication and binocular vision [J]. Optics and Precision Engineering, 2020, 28(4): 834-843. (in Chinese) doi: 10.3788/OPE.20202804.0834 [5] 陈仁虹, 梁晋, 叶美图, 等. 柔性复合薄膜成形极限曲线的视觉测定方法[J]. 中国光学. doi: 10.37188/CO.2021-0101 Chen Renhong, Liang Jin, Ye Meitu, et al. Visual method for measuring forming limit curve of pliable composite film [J]. Chinese Optics, 2022, 15(1): 22-33. (in Chinese) doi: 10.37188/CO.2021-0101 [6] 岳丽清, 贾馨, 苗洋, 等. 机械臂双目视觉系统内外参高精度标定[J]. 红外与激光工程, 2021, 50(9): 20200525. doi: 10.3788/IRLA20200525 Yue Liqing, Jia Xin, Miao Yang, et al. High precision calibration for internal and external parameter of manipulator binocular vision system [J]. Infrared and Laser Engineering, 2021, 50(9): 20200525. (in Chinese) doi: 10.3788/IRLA20200525 [7] 乔玉晶, 贾保明, 姜金刚, 等. 多视点立体视觉测量网络组网方法[J]. 红外与激光工程, 2020, 49(7): 20190492. doi: 10.3788/IRLA20190492 Qiao Yujing, Jia Baoming, Jiang Jingang, et al. Networking method of multi-view stereo-vision measurement network [J]. Infrared and Laser Engineering, 2020, 49(7): 20190492. (in Chinese) doi: 10.3788/IRLA20190492 [8] 李云雷, 张曦. 基于立体定向靶标的探针式多视场三维视觉测量系统[J]. 光学精密工程, 2019, 27(1): 34-44. DOI: 10.3788/OPE.20192701.0034 Li Yunlei, Zhang Xi. Probe-based multi-view field 3D vision measurement system based on three-dimensional orientation target [J]. Optics and Precision Engineering, 2019, 27(1): 34-44. (in Chinese) doi: 10.3788/OPE.20192701.0034 [9] 许凌志, 符钦伟, 陶卫, 等. 基于三维模型的单目车辆位姿估计[J]. 光学精密工程, 2021, 29(06): 1346-1355. doi: 10.37188/OPE.20212906.1346 Xu Lingzhi, Fu Qingwei, Tao Wei, et al. Pose estimation of monocular vehicle based on 3D model [J]. Optical Precision Engineering, 2021, 29(6): 1346-1355. (in Chinese) doi: 10.37188/OPE.20212906.1346 [10] 薛伟, 陈志明, 吴云华, 等. 基于单目视觉的三轴气浮台姿态测量方法[J]. 光学技术, 2021, 47(06): 658-665. Xue Wei, Chen Zhiming, Wu Yunhua, et al. Attitude measurement method of three-axis air floating platform based on monocular vision [J]. Optical Technology, 2021, 47(6): 658-665. (in Chinese) [11] 张壮. 基于主被动融合的非合作目标重建与位姿测量研究[D]. 北京: 中国科学院大学(中国科学院光电技术研究所), 2019. Zhang Zhuang. Reconstruction and pose measurement of non-cooperative target based on active and passive fusion[D]. Beijing: University of Chinese Academy of Sciences (Institute of Optoelectronic Technology, Chinese Academy of Sciences), 2019. (in Chinese) [12] Liu Yang, Xie Zongwu, Liu Hong. Three-line structured light vision system for non-cooperative satellites in proximity operations [J]. Chinese Journal of Aeronautics, 2020, 33(5): 1494-1504. doi: 10.1016/j.cja.2019.08.024 [13] 汪启跃, 王中宇. 基于单目视觉的航天器位姿测量[J]. 应用光学, 2017, 38(02): 250-255. Wang Qiyue, Wang Zhongyu. Position and pose measurement of spacecraft based on monocular vision [J]. Journal of Applied Optics, 2017, 38(2): 250-255. (in Chinese) [14] Hesch J A , Roumeliotis S I. A direct least-squares (DLS) method for PnP[C]//2011 International Conference on Computer Vision, Barcelona, SPAIN: IEEE ICCV, 2011: 383–390. [15] Zhang Z. A flexible new technique for camera calibration [J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2000, 22(11): 1330-1334.