《基于机器视觉的智能车跟踪系统研究与实现》由会员分享,可在线阅读,更多相关《基于机器视觉的智能车跟踪系统研究与实现(67页珍藏版)》请在金锄头文库上搜索。
1、中南民族大学 硕士学位论文 基于机器视觉的智能车跟踪系统研究与实现 姓名:李圆双 申请学位级别:硕士 专业:通信与信息系统 指导教师:谢勤岚 2011-05-16 中南民族大学硕士学位论文 I 摘 要 机器视觉领域是一个重要的科学领域,它是用机器(摄像机和计算机等)替代 人眼对目标进行检测、识别、跟踪、判断,主要用于大批量的工业生产、药品检 测、银行卡演示系统、表面检测及汽车电子行业。自 20 世纪 50 年代以来,汽车 电子和智能控制技术得到广泛的重视和飞速的发展,智能车随之成为汽车控制领 域内的一个研究热点,而视觉跟踪是智能车研究的主要方向之一。智能车对移动 目标的识别和跟踪是从视觉传感器
2、获取的图像序列中分割出运动目标并对这些目 标进行识别和跟踪,因此,目标的检测、识别和跟踪是智能车视觉跟踪中的一个 重要任务。 本课题设计了一个基于高速球形摄像机的智能车跟踪系统,该系统对摄像头 视野中的两辆小车进行跟踪, PC 机通过摄像头获取前方目标车的运动状态, 利用 机器视觉算法进行判断和分析, 通过无线指令控制后方智能小车跟踪前方目标车, 并且摄像头跟随目标的运动方向转动,使两车体始终在摄像头的视野范围之内。 其核心研究内容主要包括三个部分:一是运动目标的检测与提取;二是运动目标 的跟踪;三是摄像头和智能车速度及方向的控制。 本文首先介绍了几种常用的运动目标检测算法,包括光流法、时间差
3、分法、 背景差分法,验证并分析它们各自的优缺点和适用范围,重点阐述了基于混合高 斯背景模型的目标检测方法;然后,介绍了 MeanShift 算法的基本原理,主要研 究了 CAMShift 目标跟踪算法、Kalman 运动估计跟踪算法、粒子滤波跟踪算法。 在此基础上,论文完成了如下工作: (1) 结合混合高斯模型与 CAMShift 目标跟踪算法, 设计实现了一种自动的运 动目标检测与跟踪系统。首先用基于混合高斯的背景模型实现对运动目标所在区 域的识别和提取,确定目标区域并初始化跟踪窗口;然后在目标区域内提取颜色 特征,通过 CAMShift 算法计算目标的精确位置并调整搜索窗口大小。在跟踪过
4、程中,利用目标位置信息,通过串口控制高速球机的运动,使目标并尽可能位于 视场中央,以实现对运动目标的快速准确的实时跟踪。 (2) 在上述算法实现的基础上对 CAMShift 做出几点改进, 一是融合目标的颜 色特征与纹理特征,将色调直方图与梯度直方图进行加权处理,作为目标特征模 板,处理相似颜色的干扰;二是用自适应扩展搜索窗口改进 CAMShift 算法,避 免因目标瞬时速度过大导致跟踪目标丢失;三是引入运动预测估计算法,结合 Kalman 滤波进行目标位置预测和更新,解决因严重遮挡引起的跟踪丢失问题。 (3) 设计了一种多目标跟踪的解决方案,由于运动场景和运动状态的复杂化, 卡尔曼滤波在非线
5、性、非高斯系统表现出来的效果欠佳,论文对粒子滤波算法进 基于机器视觉的智能车跟踪系统研究与实现 II 行了研究,利用样本重要性重采样法,加权融合目标颜色与梯度方向直方图,实 现基于多特征的粒子滤波目标跟踪算法,并用 CAMShift 算法优化粒子滤波,用 于多目标的跟踪,提高了跟踪的实时性和鲁棒性。 (4) 利用视觉跟踪算法的反馈结果给出了一种简单有效的智能车控制指令的 策略,实现智能车的前行、停止、左转、右转。同时,设计了一种高速球形摄像 机的方向和速度控制策略,在球机机械参数未知的情况下,设定摄像头速度比例 系数,根据目标位置的偏移程度对摄像机的转速进行线性调节,防止球机震荡, 调整球机
6、P/T 方向角度使被跟踪目标始终在视野之内。 (5) 基于 OpenCV 图像处理技术,运用 VS2008 软件在 Windows 平台上建立 运动目标检测、跟踪、控制的整套软、硬件试验系统。基于 MFC 的开发库,将 多个功能集成在一个友好界面下,实现了智能车视觉跟踪系统,并验证了系统各 项功能的有效性。 关键词:视觉跟踪;智能车;粒子滤波;CAMShift 算法;卡尔曼滤波 中南民族大学硕士学位论文 III Abstract Machine vision is an important scientific field that uses the machine in place of h
7、uman eyes to detect, identify and track target, which is mainly used in large quantities of industrial production, drug testing, bank card demo system, surface inspection and automobile electronic industry. Since the 1950s, automotive electronics and intelligent control technology have been apprecia
8、ted extensively and have developed rapidly.Subsequently, intelligent vehicle then becomes a hot research in the field of automotive control, and vision tracking also becomes one of the main directions of intelligent vehicle research. The identification and track for moving target in intelligent car
9、is to separate the object from image sequences which are obtained from visual sensor and to track and identify the object the background, therefore, the target detection, identification and tracking is an important mission of intelligent car vision tracking. The thesis designs an intelligent car tra
10、cking system based on high-speed spherical camera, which tracks two cars in the view of camera. PC unit gets the motion state of the car in front of one smart car through the camera and and uses car machine vision algorithm to control the rear intelligent car to track target car through wireless com
11、mand. During the tracking, the information about the objective location is transmitted by serial communication to control the PTZ in order to track the two objects to ensure them being inside of scene all along. For this system, the research mainly includes three parts: first, moving target detectio
12、n and extraction; second, moving target tracking; third, the speed and direction of camera and intelligent vehicle control. Several commonly motion detection algorithms are firstly introduced, including optical flow, time-difference, background-difference, and the sphere of applications of these alg
13、orithms have been verified and analyzed. The method of foreground detection based on the mixture of Gaussian model is emphasized especially. Then the basic principle of MeanShift algorithm is recommended, and CAMShift target tracking algorithm, Kalman motion estimation tracking algorithm and particl
14、e filter tracking algorithm is thoroughly studied. On this basis, the paper has been fulfilled following works: (1) A system combining mixture of Gaussian background model with CAMShift 基于机器视觉的智能车跟踪系统研究与实现 IV algorithm has been designed to detect and track automatically the moving target. For detect
15、ing the moving object, the region which the movement object belongs to is firstly identified and extracted by mixture model of Gaussian, and the centroid of this region is determined as the center of initializing window for tracking. The color feature of object is then extracted in the region, and t
16、he CAMShift algorithm is used to calculate the exact location of the target and adjust the size of search window. During the tracking, the information about the objective location is transmitted by serial communication to control the PTZ in order to track the object to ensure it being inside of scene all along. (2) On the basis of above algorithm, some improvements to CAMShift are made. First, color features and the texture cha