-
文中在传统光束法平差的基础上,建立基于法化矩阵降维的多相机快速光束法平差算法。为了验证此算法的优越之处。在仿真实验部分取空间中30个特征点构成一个长方体作为测试的三维点集,此长方体的尺寸设定为300 mm×400 mm×500 mm。设置4个等距离且平行的相机对场景进行模拟采集,作为第一组结果。然后将4个相机捆绑,同时向远离场景的方向每次平移10 mm并再次采集一次,一共采集4次,共产生16幅模拟图像。图3所示为模拟测试的三维点图空间分布。
在模拟实验中,设置4个相机内参相等,均为
${f_u} = {f_v} = 2500\ \rm pixel$ ,${u_0} = 640\ \rm pixel$ ,${v_0} = 512\ \rm pixel$ ,$s = 0$ 。将16幅模拟图像中加入干扰,即高斯噪声。向相机外参和三维点中均加入相对误差为0%~5%等间距的高斯白噪声作为光束法平差的初值,并分别求出对应的重投影误差。下面进行新算法精度的验证。首先比较算法的重投影误差的平均值。使用Levenberg-Marquardt算法进行50次迭代,计算出迭代前与迭代后的重投影误差并取平均值,每次取不同相对误差的高斯噪声。为了避免偶然性,取定一种相对误差后重复10次并取均值。实验结果如图4所示。
由图4可以看出,随着噪声的增大,在新算法下图片的重投影误差并无明显的变化,说明此算法合理,并且可以达到预期的收敛效果。
然后,比较重建的三维点与真实三维点的误差。将重构点与真实点逐一求取距离,并取均值算出平均每一点的偏差量,相当于求解每一点的平均绝对误差。并与传统光束法平差算法进行比较,实验结果如图5所示。
由图5可以看出,在不同的噪声下,新算法重建的三维点误差都要小于传统的算法结果,因此得到了优化。并且随着噪声的增大,优化的程度也更大,因为这里将4个相机捆绑为一个整体,相当于增加了传感器的数量,并且固定相机间的位姿关系,使得总体上方程个数增多,但未知数个数较传统算法而言却减少了。故新算法的重建精度较原来相比提升了约15.5%,重建精度得到了提升与优化。
-
为了进一步验证光束法平差新算法对优化相机参数与三维点的有效性,用4台Mikrotron相机MC3010进行拍摄。获取的图像尺寸为
$1\;680 \times 1\;710$ pixel,每个像素为0.008 mm/pixels,并且相机镜头型号均为AF Zoom-Nikkor 24-85 mm/1:2.8-4D。相机与靶标的捕获深度方向上距离约为3200 mm,相机采集系统架构如图6所示。通过图6中所示的4台相机对平面99圆靶标进行图像采集,采集到的图像分布如图7所示,并对每个标定板上的99特征点进行圆心提取与编号,图7中的编号值即为已经完成的特征点对应编码。
在图像采集完成之后,进行多相机系统的标定运算,由于型号相同,因此4个相机的内参在一定程度上相同,解算出相机的内参,以及从相机与主相机间的内外参关系如表1所示。
Camera internal parameters Relationship between slave cameras and master camera ${f_u} = 3\;061.237\;5$
${f_v} = 3\;061.599\;8$
$ {u}_{0}= 832.213\;0$
${v_0} = 901.286\;0$
${k_1} = - 0.185\;7$
${k_2} = 0.280\;4$,
$s = 0$$\left\{ \begin{array}{l} {{{R}}_{{{m1}}}} = \left[ {\begin{array}{*{20}{c}} {0.999\;5}&{ - 0.008\;7}&{ - 0.028\;8} \\ {0.002\;5}&{0.977\;8}&{ - 0.209\;5} \\ {0.030\;0}&{0.209\;4}&{0.977\;4} \end{array}} \right] \\ {{{T}}_{{{m1}}}} = {\left[ {\begin{array}{*{20}{c}} {38.922\;1}&{302.359\;9}&{12.804\;4} \end{array}} \right]^{'}} \\ \end{array} \right.$
$\left\{ \begin{array}{l} {{{R}}_{{{m2}}}} = \left[ {\begin{array}{*{20}{c}} {0.991\;0}&{ - 0.034\;7}&{ - 0.129\;6} \\ {0.004\;1}&{0.973\;3}&{ - 0.229\;4} \\ {0.134\;1}&{0.226\;8}&{0.964\;7} \end{array}} \right] \\ {{{T}}_{{{m2}}}} = {\left[ {\begin{array}{*{20}{c}} {18.258\;2}&{329.791\;0}&{ - 3.970\;3} \end{array}} \right]^{'}} \\ \end{array} \right.$
$\left\{ \begin{array}{l} {{{R}}_{{{m3}}}} = \left[ {\begin{array}{*{20}{c}} {0.995\;1}&{0.024\;8}&{0.095\;8} \\ {0.000\;3}&{0.967\;5}&{ - 0.253\;0} \\ {0.099\;0}&{0.251\;8}&{0.962\;7} \end{array}} \right] \\ {{{T}}_{{{m3}}}} = {\left[ {\begin{array}{*{20}{c}} { - 19.633\;9}&{364.697\;7}&{35.690\;1} \end{array}} \right]^{'}} \\ \end{array} \right.$Table 1. Camera internal parameters and fixed pose relationship
然后对99个圆心点的三维坐标与相机外参分别用传统的光束法平差和新算法进行优化处理,并将所有圆心点以空间三维分布进行显示,保留每个三维点的坐标值方便对比。重构出的靶板特征点空间三维布局效果图以及对应的编号如图8所示。
接着由表1得出的位姿关系,可以根据前文的推导计算出系统位姿变换矩阵的初值,如公式(16)所示。
将此矩阵作为相机外参之间的关系代入光束法平差算法中,将主相机的外参与99个三维点进行综合优化后得到的结果于真实值比较,并计算出每个点的误差以及所有点坐标的平均误差。表2给出其中连续11个编号点的坐标值以及平均误差值。
Code Ideal value/mm Traditional bundle adjustment/mm Novel bundle adjustment/mm X Y Z X Y Z Error X Y Z Error 12 25 0 0 25.2106 −0.2415 −0.1984 0.3769 25.1914 −0.1423 −0.0512 0.2439 13 25 25 0 25.2464 24.8546 −0.1426 0.3197 25.1559 24.9824 −0.0618 0.1686 14 25 50 0 25.2186 49.9145 0.0146 0.2352 25.1049 49.9532 0.0778 0.1387 15 25 75 0 25.1954 74.8462 0.2492 0.3520 25.1440 74.9068 0.1136 0.2057 16 25 100 0 25.1002 99.8164 0.2012 0.2902 25.0229 99.9103 0.0993 0.1358 17 25 125 0 25.1026 124.8125 0.2179 0.3052 25.0710 124.9809 0.1434 0.1612 18 25 150 0 25.2312 149.8978 0.1002 0.2719 25.1007 149.9481 0.0406 0.1203 19 25 175 0 25.1089 174.8713 −0.1243 0.2095 25.0817 174.9308 −0.0409 0.1146 20 25 200 0 25.1916 199.8846 0.1582 0.2740 25.0656 199.8917 0.1471 0.1941 21 25 225 0 25.0598 224.7996 0.1893 0.2821 25.0159 224.8457 0.1125 0.1916 22 25 250 0 25.1649 249.8162 −0.0146 0.2474 25.0433 249.9197 −0.0051 0.0914 Table 2. Comparison of world coordinate values of partially reconstructed 3D points
根据计算,得出用传统光束法平差时,最后得到的平均误差为每个点0.2946 mm,而新算法得到的误差为每个点0.1527 mm,再结合表2可以看出,文中算法可以得到很好的效果,并且对于多相机系统而言,新的算法在精度上更有优势。得到的三维点误差也更小,算法在重构精度及稳定性上均得到了优化。
最后,为了验证新算法的效率优势,将新算法优化三维点的时间与原算法运行时间作比较,以点的个数作为自变量。观察重建点增加时两个算法的运行时间。实验结果如图9所示。
由图9可以看出,新算法在运行速率、执行效率上高于传统算法,这是因为将多个相机绑定为一个相机,那么在一次迭代过程中可以处理多幅图像,同时通过法化矩阵降维,实现运算速度的提升,并且随着三维点的增加,效果更加明显。根据运行时间与三维点数目关系计算得到新算法效率提升了约7.8%。
此算法优化处理多相机系统时,可以大幅度降低法化矩阵的维数,在精确性与快速性上占一定的优势。但是此算法在优化的过程中并没有对相机的内参进行优化。而在多相机系统领域,随着相机数量的增多,相机的内参也会对光束法平差结果产生一定的影响。因此后续在此算法的基础上,可以考虑在不改变算法效率的前提上,适当的加入相机内参从而在算法精度上完成进一步的提升,以适应于超大视场的高精度视觉测量与重构。
Multi-camera fast bundle adjustment algorithm based on normalized matrix dimensionality reduction
doi: 10.3788/IRLA20200156
- Received Date: 2020-12-22
- Rev Recd Date: 2021-01-14
- Available Online: 2021-02-07
- Publish Date: 2021-02-07
-
Key words:
- stereo vision /
- multi-camera system /
- matrix dimensionality reduction /
- bundle adjustment
Abstract: Aiming at the problem of high-precision and fast bundle adjustment of multi-camera systems, a multi-camera fast bundle adjustment algorithm based on normalized matrix dimensionality reduction was proposed. Considering the fixed pose parameter relationship between the master and slave cameras in a multi-camera system, the system pose transformation matrix with the dimension of 3N (number of cameras)×4 was used. According to this matrix, each slave camera parameters could be quickly obtained from the master camera parameters, and the transformation relationship was taken into the bundle adjustment algorithm to get the posture of all slave cameras. For external parameters optimization of all cameras, only the external parameter of main camera need to be updated. So all cameras were bundled as a whole, which made the dimension of the Jacobian matrix and the normalized matrix relatively reduce. The calculation of multiple camera feature images could be implemented in one iteration, so the accuracy and speed of the algorithm have been greatly improved. According to simulation and practical measurement experiments, the optimization accuracy of the proposed algorithm is 15.5% higher than traditional bundle adjustment, and the operation efficiency is improved by 7.8%. These precise results can meet the practical engineering application requirements.