基于IMX6平台的车载双目视觉系统开发毕业论文
2021-04-17 23:34:13
摘 要
双目立体视觉技术是机器视觉领域的科学发展至今的一个研究重点方向,它是目前研究的一个热点领域,它模拟人眼识别的模式,基于左摄像机拍摄物体得的两图像存在视差,再计算两幅图像各个对应的点之间的存在的位置差,来获得景深图以及三维视图。在近年的发展中,在航空航天领域、机器人领域、军事领域、测量领域、VR领域、无人驾驶等领域内,双目立体视觉技术都起到了巨大的作用。
传统的双目立体视觉系统的开发,多是在电脑端来实现,因其对处理器的计算能力有较大的要求,同时还需要与FPGA等一起使用。但是PC机因其价格昂贵、不便于携带等问题,不是开发双目立体视觉的最佳环境。而随着近年来嵌入式技术的发展,处理器不断升级,计算能力不断加强,已经可以满足双目立体视觉的基本要求,同时其固有的低成本、低功耗、便携性、及专用性强、扩展性强的优势,使我们研究的课题嵌入式双目立体视觉系统的开发在无人驾驶领域显得更加的重要。
本文章中嵌入式双目立体视觉系统的开发芯片采用飞思卡尔公司的i.MX 6系列开发板,该开发板采用ARM® Cortex™-A9内核和E Ink控制器,左摄像机和右摄像机采用为索尼公司生产的RS-680 MODEL 中 PAL 彩色系列CCD摄像机。由于标定工作只有需要做一些次便可以持续使用标定好的摄像头来进行拍摄工作,所以在PC端与摄像机连接进行单目摄像机的标定和立体标定。在软件系统方面,根据该开发板利用U-boot来移植嵌入式Linux系统,并在PC端安装Ubuntu系统和专用编译工具来构建交叉编译环境,植入OpenCV视觉库,于此同时,本文章详细介绍了硬件装置的安装及使用,软件系统的搭载和配置。软件部分完成左摄像头和右摄像头的读取、单目标定、双目标定、图像校正、立体匹配、输出深度信息和三维重建的工作,本文实现了软硬件系统的联合研究。
本文的主要重点是双目立体视觉系统的左摄像头和右摄像头标定和立体匹配的研究。本文首先介绍了双目立体视觉的原理,包括单个摄像机成像原理、双目摄像机成像原理、三种坐标系(世界坐标系、图像坐标系、相机坐标系)的介绍和变换的数学公式、标定原理、校正原理和匹配及三维重建的原理。研究了基于OpenCV的图像处理(包括标定和匹配)的算法,分析了不同的算法优势和劣势,标定选择张正友标定法的算法,匹配选择了OpenCV中自带的基于块立体匹配的BM算法。三维重建方面选择了SFM算法来计算获取空间点的三维坐标,利用OpenCV中自带的Delaunay函数来进行三角剖分,最后使用OpenGL来视觉化三维重建的信息。最后使用该系统和双目摄像头对物体来拍摄来测量精神来验证系统的可行性。
关键词:嵌入式;双目立体视觉视觉;原理;双目摄像头标定;立体匹配
Abstract
Binocular stereo vision technology is a research direction of scientific development in the field of machine vision. It is currently a hot research field. It simulates the pattern of human eye recognition. There are parallaxes in the two images obtained by the left camera, and then the calculation is performed. The difference in position between the corresponding points of the two images is used to obtain a depth map and a three-dimensional view. In recent years, binocular stereo vision technology has played an enormous role in the fields of aerospace, robotics, military, measurement, VR, and driverless.
The development of traditional binocular stereoscopic vision systems is mostly implemented on the computer side because of the greater requirements on the computing power of the processor and the need to use it together with FPGAs. However, PCs are not the best environment for the development of binocular stereo vision because of their high cost and inconvenience for carrying. The continuous upgrading of processors and the continuous enhancement of computing capabilities have met the basic requirements of binocular stereo vision, and its inherent low cost, low power consumption, portability, and strong specificity. With the advantage of strong expandability, the development of the embedded binocular stereo vision system for our research becomes even more important in the unmanned field.
The development of the embedded binocular stereo vision system in this article is based on Freescale's i.MX 6 series development board. The development board uses ARM® CortexTM-A9 core and E Ink controller. The left and right cameras are used. A PAL color series CCD camera for the RS-680 MODEL produced by Sony Corporation. Because the calibration work only needs to be done a few times, it can continue to use the calibrated camera for shooting work, so the camera is connected with the camera at the PC end for the calibration and stereo calibration of the monocular camera. On the software system side, according to the development board, U-boot is used to transplant the embedded Linux system, and the Ubuntu system and special compilation tools are installed on the PC side to build the cross-compilation environment and the OpenCV vision library is implanted. At the same time, this article details Describes the installation and use of hardware devices, and the installation and configuration of software systems. The software part completes the reading of the left camera and right camera, single target setting, dual target setting, image correction, stereo matching, output depth information and 3D reconstruction work. This paper realizes the joint research of hardware and software systems.
The main focus of this paper is the study of the left camera and right camera calibration and stereo matching of the binocular stereo vision system. This article first introduced the principle of binocular stereo vision, including the principle of single camera imaging, the principle of binocular camera imaging, the introduction of three coordinate systems (world coordinate system, image coordinate system, and camera coordinate system) and the mathematical formula and calibration principle of transformation. Principles of correction, principles of matching and 3D reconstruction. The algorithm of image processing based on OpenCV (including calibration and matching) is studied. The advantages and disadvantages of different algorithms are analyzed. The algorithm of Zhang Zhengyou calibration method is selected for calibration, and the BM algorithm based on block stereo matching that comes with OpenCV is selected. In the three-dimensional reconstruction, the SFM algorithm was chosen to calculate the three-dimensional coordinates of the acquired spatial point. The Delaunay function provided in OpenCV was used to triangulate. Finally, OpenGL was used to visualize the three-dimensional reconstruction information. Finally, use the system and binocular camera to measure the spirit by shooting objects to verify the feasibility of the system.
Key words: embedded system; binocular stereo vision; principle; binocular camera calibration; stereo matching
目 录
摘要 I
Abstract II
第1章 绪论 1
1.1 研究背景及其现实的意义 1
1.2 国内外关于无人驾驶及嵌入式双目立体视觉系统的研究现状 4
1.2.1 国外的研究现状 4