Monocular visual positioning system with characteristic distortion based on embedded GPU
-
摘要: 视觉定位和导航在物流仓储等领域具有广泛的应用前景,传统单目视觉难以实现准确的定位,而双目视觉虽能完成精确的定位和导航,但硬件成本高且影响车体尺寸。提出一种基于特征物形变的单目定位技术,利用单个相机对地面铺设的特征物(带编码的圆环图案)的畸变进行记录,以嵌入式图像处理单元(graphics processing unit,GPU)进行分析,实现端到端的单目视觉定位。其中嵌入式GPU对相机采集的图像通过深度学习目标检测算法识别特征圆环的编码图案,经传统图像处理获取图案物像的形变信息,将该形变信息输入至经极端梯度提升算法(extreme gradient boosting,XGBoost)训练好的回归模型,预测出相机相对图案中心的坐标,同时结合该特征圆环的绝对坐标,最终解算出相机的室内绝对坐标。实验结果表明:在2 m×2 m 的范围内定位平均误差仅为0.55 cm,优于文献报道1个数量级,且算法在电脑端和在嵌入式GPU上的定位解算帧率分别为20帧和4帧,具有实时性。Abstract: Visual positioning and navigation have a wide application prospect in logistics warehousing and other fields, but traditional monocular vision is difficult to achieve accurate positioning. Although binocular vision can achieve accurate positioning and navigation, the hardware cost is high and make vehicle to be bigger size. Therefore, a monocular positioning technology based on feature deformation was proposed. In this method, a single camera was used to record the distortion of features (ring patterns with encodings) laid on the ground with an embedded graphics processing unit (GPU) which analyzed the distortion, and achieved end-to-end monocular visual positioning. The embedded GPU recognized the encoded patterns of the feature ring through the deep-learning target detection algorithm for the images collected by the camera, and the deformation information of the pattern object through traditional image processing was obtained. The deformation information was input to a regression model trained by the extreme gradient boosting algorithm (XGBoost) to predict the coordinates of the camera relative to the center of the pattern. At the same time, combining the absolute coordinates of the feature ring, the indoor absolute coordinates of the camera were finally calculated. The experimental results show that the average positioning error in the range of 2 m×2 m is only 0.55 cm, which is one order of magnitude better than that reported in the literature. The algorithm has a real-time performance with a positioning solution frame rate of 20 frames on the computer and 4 frames on the embedded GPU.
-
Key words:
- embedded GPU /
- indoor positioning /
- deep learning /
- regression model /
- ring encoded patterns
-
表 1 码型与相机朝向映射表
Table 1 Code type and camera orientation mapping
圆环数 二进制码 中心绝对坐标/cm 相机朝向 2 010 (100,100) 东 0101 (100,100) 南 101 (100,100) 西 1010 (100,100) 北 3 01010 (200,200) 东 010101 (200,200) 南 10101 (200,200) 西 101010 (200,200) 北 表 2 嵌入式设备参数
Table 2 Embedded device parameters
系统环境 软件环境 硬件环境 Ubuntu 16.04 Python 3.5.2 NVIDIA Jetson TX2模块* OpenCV 3.4.4 瑞泰RTSO-9001载板 CUDA-9.0 罗技C270摄像机,300万像素 *运存与显存共用,容量为8 G,外存容量30 G。 表 3 实验用电脑参数
Table 3 Experimental host parameters
系统环境 硬件环境 Ubuntu 18.04 GPU:Nvidia GTX1080Ti,10 G显存 CPU:Intel(R) Core(TM) i7-7700 CPU @ 3.60 GHz 32 G RAM内存 表 4 各模块平均运行时间
Table 4 Average running time of each module
ms 模块 电脑主机 TX2 YOLO 35 280 椭圆拟合 1 6 预测坐标 8 15 解码 1 9 合计 45 310 表 5 测量误差
Table 5 Measuring errors
cm 参数 平均误差 标准差 误差最大值 坐标x 0.31 0.28 1.57 坐标y 0.52 0.51 2.91 距离$ \left(\sqrt{x^{2}+y^{2}}\right) $ 0.55 0.53 3.31 -
[1] 李宁. 基于网络时代下的人工智能发展分析[J]. 现代电子技术,2016,39(7):112-114.LI Ning. Analysis of artificial intelligence development in Internet age[J]. Modern Electronics Technique,2016,39(7):112-114. [2] 李照, 舒志兵. 一种改进二维码视觉精定位AGV技术研究[J]. 控制工程,2019,26(6):1049-1054. doi: 10.14107/j.cnki.kzgc.161448LI Zhao, SHU Zhibing. Research on AGV vision precision positioning technology by an improved two-dimensional code[J]. Control Engineering of China,2019,26(6):1049-1054. doi: 10.14107/j.cnki.kzgc.161448 [3] 董永峰, 王安娜, 周艳聪, 等. 一种新的基于RFID的室内移动机器人自定位方法研究[J]. 计算机应用研究,2016,33(3):749-753. doi: 10.3969/j.issn.1001-3695.2016.03.025DONG Yongfeng, WANG Anna, ZHOU Yancong, et al. Research on novel self-localization method for indoor robot based on RFID[J]. Application Research of Computers,2016,33(3):749-753. doi: 10.3969/j.issn.1001-3695.2016.03.025 [4] 温拓朴, 丁文浩, 潘长勇. 基于定向天线的蓝牙室内定位系统[J]. 现代电子技术,2019,42(3):6-9. doi: 10.16652/j.issn.1004-373x.2019.03.002WEN Tuopu, DING Wenhao, PAN Changyong. Bluetooth indoor localization system based on directional antenna[J]. Modern Electronics Technique,2019,42(3):6-9. doi: 10.16652/j.issn.1004-373x.2019.03.002 [5] 吴楠, 杨爱英, 冯立辉, 等. 可见光定位关键技术的研究与展望[J]. 南京信息工程大学学报(自然科学版),2017,9(2):159-167.WU Nan, YANG Aiying, FENG Lihui, et al. Research and prospect of key technologies for visible light localization[J]. Journal of Nanjing University of Information Science and Technology(Natural Science Edition),2017,9(2):159-167. [6] 王海亮, 陈登旭, 刘吉, 等. 基于单目视觉的矩形靶面弹着点测量[J]. 应用光学,2021,42(1):131-136. doi: 10.5768/JAO202142.0103006WANG Hailiang, CHEN Dengxu, LIU Ji, et al. Measurement of impact point of rectangular target surface based on monocular vision[J]. Journal of Applied Optics,2021,42(1):131-136. doi: 10.5768/JAO202142.0103006 [7] 黄伟. 计算机视觉技术及产业化应用态势分析[J]. 信息通信技术与政策,2018(9):59-62.HUANG Wei. Computer vision technology and industrial application situation analysis[J]. Information and Communications Technology and Policy,2018(9):59-62. [8] HAN S B, KIM J H, MYUNG H. Landmark-based particle localization algorithm for mobile robots with a fish-eye vision system[J]. IEEE/ASME Transactions on Mechatronics,2012,18(6):1745-1756. [9] YANG Guojun, SANIIE J. Indoor navigation for visually impaired using AR markers[C]// 2017 IEEE International Conference on Electro Information Technology (EIT), New York: IEEE, 2017: 1-5. [10] 曹小华, 任晓玉. 基于平面投影的单目视觉 AGV 定位算法[J]. 起重运输机械,2018(4):103-106. doi: 10.3969/j.issn.1001-0785.2018.04.026CAO Xiaohua,REN Xiaoyu. Monocular vision AGV localization algorithm based on planar projection[J]. Lifting and Transportation Machinery,2018(4):103-106. doi: 10.3969/j.issn.1001-0785.2018.04.026 [11] 韩思奇, 王蕾. 图像分割的阈值法综述[J]. 系统工程与电子技术,2002,24(6):91-94. doi: 10.3321/j.issn:1001-506X.2002.06.027HAN Siqi, WANG Lei. A survey of thresholding methods for image segmentation[J]. Systems Engineering and Electronics,2002,24(6):91-94. doi: 10.3321/j.issn:1001-506X.2002.06.027 [12] 张万祥, 庞其昌, 赵静, 等. 中药光谱成像图像自适应区域增长分割方法[J]. 应用光学,2010,31(1):78-82. doi: 10.3969/j.issn.1002-2082.2010.01.018ZHANG Wanxiang, PANG Qichang, ZHAO Jing, et al. Self-adaptive region growing algorithm to segment images of spectral imaging for TCM assessment[J]. Journal of Applied Optics,2010,31(1):78-82. doi: 10.3969/j.issn.1002-2082.2010.01.018 [13] 郭贵松, 林彬, 杨夏, 等. 基于斑马鱼图像特征的鱼群检测算法[J]. 应用光学,2022,43(2):257-268. doi: 10.5768/JAO202243.0202004GUO Guisong, LIN Bin, YANG Xia, et al. Fish stock detection algorithm based on zebrafish image features[J]. Journal of Applied Optics,2022,43(2):257-268. doi: 10.5768/JAO202243.0202004 [14] FITZGIBBON A, PILU M, FISHER R B. Direct least square fitting of ellipses[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence,1999,21:476-480. doi: 10.1109/34.765658 [15] 闫蓓, 王斌, 李媛. 基于最小二乘法的椭圆拟合改进算法[J]. 北京航空航天大学学报, 2008, 34(3): 295-298.YAN Bei, WANG Bin, LI Yuan. Optimal ellipse fitting method based on least-square principle[J]. Journal of Beijing University of Aeronautics and Astronautics, 34(3): 295-298. [16] CHEN T Q, GUESTRIN C. XGBoost: a scalable tree boosting system[R]. New York, USA: Association for Computing Machinery, 2016: 785-794. [17] 齐健. NVIDIA Jetson TX2平台: 加速发展小型化人工智能终端[J]. 智能制造,2017(5):20-21. doi: 10.3969/j.issn.1671-8186.2017.05.005QI Jian. NVIDIA Jetson TX2 platform: accelerating the development of miniaturized artificial intelligence terminal[J]. Intelligent Manufacturing,2017(5):20-21. doi: 10.3969/j.issn.1671-8186.2017.05.005 -