基于二维码的相机位姿求解
Solving camera pose based on two-dimensional code
-
摘要: 针对视觉机器人定位问题,提出基于二维码的相机位姿求解方法,以实现视觉机器人的精准定位.利用开源计算机视觉库(open source computer vision library, OpenCV),首先对二维码的标准位置和相机进行标定;其次对图像进行预处理,得到二维码准确的边缘轮廓;然后利用循环遍历和最大距离算法求解特征点,对于像素过低导致的边缘失真采用"像素突变"算法进行优化;最后利用特征点通过坐标变换求解出相机位姿.在实际场景中对该方法进行测试,试验结果表明算法的旋转轴误差为±0.18 m,旋转角误差为±2°,平移量总误差为±0.02 m,可以有效地对视觉机器人进行精准定位.Abstract: To solve the positioning problem of the visual robot, based on the two-dimensional code, a method for solving camera pose was proposed to realize the precise positioning of the visual robot. Using the open source computer vision libracy(OpenCV), the standard positions of the two-dimensional code and the camera were calibrated. The image was preprocessed to obtain the accurate edge contour of the two-dimensional code. The loop traversal and the maximum distance algorithm were used to solve the feature points, and the "pixel mutation" algorithm was used to optimize the edge distortion caused by low pixel. The feature points were used to solve the camera position through coordinate transformation, and the method was tested in actual scenes. The experimental results show that the rotation axis error of the algorithm is plus or minus 0.18 meters with the rotation angle error plus or minus 2 degrees and the total translation error plus or minus 0.02 meters, which can realize accurate and effective vision robot positioning.