当前位置:
文档之家› 基于OpenCV的疲劳驾驶检测系统的设计与实现
基于OpenCV的疲劳驾驶检测系统的设计与实现
保密□, 本论文属于 不保密□。
在
年解密后适用本授权书。
(请在以上方框内打“√”)
学位论文作者签名: 日期: 年 月 日
指导教师签名: 日期: 年 月 日
பைடு நூலகம்
华 中 科 技 大 学 硕 士 学 位 论 文
摘 要
随着我国经济近年来的飞速`发展,城市以及高速道路的机动车辆保有量正在急 剧增加。在全球,每年由于疲劳驾驶而导致交通事故和人员伤亡数以万计,在我国, 疲劳驾驶也被交管部门列为导致道路交通事故的三大原因之一,给人民群众的生活 带去了十分恶劣的影响。因此在实际情况中,如何采取有效措施来预防或者减少驾 驶员疲劳的情况,对于保护人民生命财产安全和减少交通事故的发生便具有非常重 大的意义。 本文采用 CCD 摄像头对驾驶室内的驾驶员进行实时的面部图像抓拍,通过图像 处理的技术分析人眼的闭合程度,从而判断驾驶员的疲劳程度。PERCLOS 是我们的 主要评价标准, 意为人眼持续闭合时间占特定时间的比率。 本文介绍了一种基于 Haar 特征的 AdaBoost 级联分类器算法,并根据此算法对目标图像进行人脸检测,然后在 分割出的人脸图像中,对人脸图像进行水平投影,并根据水平投影得到的人眼上下 眼睑,定位出人眼的位置,而且根据人眼的上下眼睑可以通过事先给出的一定判别 标准,判断眼部是否处于疲劳状态,从而达到疲劳检测的目的。当检测出驾驶员处 于疲劳时,系统会自动报警,使驾驶员恢复到正常状态,从而尽量规避了行车的安 全隐患,并且系统做出预留功能,可以将驾驶员的疲劳状态图片发送给指定的服务 器以备查询。 本系统采用的核心算法是基于 Haar 特征的 AdaBoost 级联分类器算法和水平投 影,首先介绍了这两种算法的主要思想及工作原理,然后对驾驶员实际驾驶环境的 特点进行了分析并给出需求分析, 接着在 visual studio 的平台下, 使用 intel 开发的图 像处理开发包 OpenCV 对整个设计进行实现,最后再对 YALE 人脸数据库和拍摄的 人脸集进行测试,并得出实验结果。实验结果显示,基于 Haar 特征的 AdaBoost 方 法对于人脸检测以及水平投影对于人眼定位的方法,具有精确度高、计算迅速以及 鲁棒性强的优点。最后再分析了实验中的不足,并给出了下一步的改进方法。
II
华 中 科 技 大 学 硕 士 学 位 论 文
目
录
摘 要............................................................................................................... I Abstract ........................................................................................................... II 1 绪论 1.1 研究背景和意义 .................................................................................. (1) 1.2 国内外研究现状 .................................................................................. (2) 1.3 主要研究工作 ...................................................................................... (3) 1.4 组织结构............................................................................................... (4) 2 相关技术背景 2.1 疲劳检测的评价标准 .......................................................................... (5) 2.2 人脸检测技术概述 .............................................................................. (8) 2.3 人眼定位技术概述 .............................................................................. (9) 2.4 OpenCV 简介 ..................................................................................... (10) 2.5 本章小结............................................................................................. (16) 3 疲劳驾驶检测系统需求分析与概要设计 3.1 疲劳驾驶检测系统需求分析 ............................................................ (17) 3.2 疲劳驾驶检测系统概要设计 ............................................................ (18) 3.3 本章小结............................................................................................. (20) 4 疲劳驾驶检测系统详细设计与实现 4.1 视频采集模块 .................................................................................... (22) 4.2 人脸检测............................................................................................. (23) 4.3 图像预处理......................................................................................... (26) 4.4 二值化................................................................................................. (30)
关键词:人眼检测
疲劳驾驶
OpenCV
PERCLOS
I
华 中 科 技 大 学 硕 士 学 位 论 文
Abstract
With the rapid development of China's economy in recent years, the city as well as high-speed road motor vehicle ownership is increasing dramatically. In the world every year due to driver fatigue which leads to traffic accidents and casualties of tens of thousands in China, fatigue driving, defined by the traffic control department as one of the three main reasons of road traffic accidents, affected the life of the people of the very seriously. Therefore, how to effectively detect and prevent driver fatigue puts extremely importance to control and reduce traffic accidents. This article describes the system of sensor on the driver's face image acquisition.Analysis of the state of the human eye to determine the degree of fatigue.The main indicators to measure the degree of driver fatigue:the closing time of the human eye continued to account for the specific time the the ratio PERCLOS.The system uses Gadabouts cascade tomb Haar features classifier algorithm to face detection position in the face area by the template matching method on the basis of the tomb of the detected face,the human eye to detect eye state when the system detected the driver is in a sleep state,and timely alarm to alert the driver,and retain the data uploaded to the ground control center. In this paper,based on Haar features AdaBoost cascade classification algorithm and template matching algorithm,described on the basis of its principles and specific,software programming,and realization of the algorithm tested by several test sets. The experiments show that the AdaBoost method and the template matching method,with detection with high accuracy,fast speed and robustness to good advantage.Finally,the lack of the algorithm exposed in the test, further improvements. Key words: Eye Detection Fatigue Driving OpenCV Perclos