针对现有双目测距系统存在体积大、成本高和移植困难等问题,设计基于Android嵌入式平台的小型双目测距系统。利用双目相机标定、图像预处理、双目图像校正和块匹配算法等关键技术,实现机器人人机交互系统的小型双目测距;针对因遮挡等因素引起的视差值不可靠导致视差图出现空洞的情况,加入左右一致性检测和快速均值滤波,得到最终视差图,由视差图获取物体相对双目相机的空间三维坐标和距离;搭建双目视觉硬件实验平台测试所提双目测距方案。结果表明:设计的测距系统体积小、成本低,在检测目标距离双目相机400~900 mm时,检测误差率在1.05%以内,检测时间低于156 ms;可针对不同距离范围给出相应的交互提示,基本满足Android平台人机交互体验的测距精度和时间要求。
Abstract:
In view of the problems of the existing binocular system such as large size, high cost and difficulty in transplantation, a small binocular ranging system based on the Android embedded platform was designed. The key technologies such as binocular camera calibration, image preprocessing, binocular image correction and block matching algorithm were used to realize a small binocular ranging of robot human-computer interaction system. Aiming at the problem that the parallax value caused by focclusion is unreliability, which leads to holes in the disparity map, the left-right consistency detection and fast average filtering were added to obtain the final disparity map, and the spatial three-dimensional coordinates and distance of the object relative to the binocular camera were obtained from the disparity map. The binocular vision hardware experimental platform was built to test the proposed binocular ranging scheme. The results show that the designed ranging system is small in size and low in cost. When the detected target is 400-900 mm away from the binocular camera, the detection error rate is below 1.05%, the detection time is less than 156 ms. It can give the corresponding interactive prompts for different distance ranges, which basically meets the requirements of ranging accuracy and time of human-computer interaction experience on Android platform.