汽车牌照定位系统设计与开发 (文档和资料)
汽车牌照定位系统设计与开发 (文档和资料),汽车牌照定位系统设计与开发,(文档和资料),汽车,牌照,定位,系统,设计,开发,文档,以及,资料
编 号 无锡太湖学院 毕 业 设 计 ( 论 文 ) 题目: 汽车牌照定位系统设计与开发 信 机 系 计 算 机 科 学 与 技 术 专 业 学 号: 学生姓名: 指导教师: 2013 年 5 月 25 无锡太湖学院本科毕业设计(论文) 诚 信 承 诺 书 本人郑重声明:所呈交的毕业设计(论文) 汽车牌照定 位系统设计与开发 是本人在导师的指导下独立进行研究所取 得的成果,其内容除了在毕业设计(论文)中特别加以标注引 用,表示致谢的内容外,本毕业设计(论文)不包含任何其他 个人、集体已发表或撰写的成果作品。 班 级: 计科 94 学 号: 0921144 作者姓名: 2013 年 5 月 25 日 I 无 锡 太 湖 学 院 信 机 系 计 算 机 科 学 与 技 术 专 业 毕 业 设 计 论 文 任 务 书 一、题目及专题: 、题目 汽车牌照定位系统设计与开发 、专题 二、课题来源及选题依据 课题来源:导师指定 选题依据:汽车车牌识别系统是近几年发展起来的计算机视觉和 模式识别技术在智能交通领域应用的重要研究课题之一。在车牌自动 识别系统中,首先要将车牌从所获取的图像中分割出来实现车牌定位。 这是进行车牌字符识别的重要步骤,定位的准确与否直接影响车牌识 别率。 车辆牌照定位与识别是计算机视觉与模式识别技术在智能交通 领域应用的重要研究课题之一,该技术应用范围非常广泛,其中包括: (1)交通流量检测;(2)交通控制与诱导;(3)机场、港口等出入口车辆 管理;(4)小区车辆管理;(5)闯红灯等违章车辆监控;(6)不停车自动 收费;(7)道口检查站车辆监控;(8)公共停车场安全防盗管理;(9)计 算出行时间等。其潜在在市场应用价值极大,有能力产生巨大的社会 II 效益和经济效益 。 三、本设计(论文或其他)应达到的要求: 软件、技术要求: 在基于图像处理的车牌识别技术的基础上设计并开发了一 个基于 MATLAB 的车牌定位系统通过编写 MATLAB 文件对各 种车辆图像处理方法进行分析、比较,最终确定了车牌预处理、车 牌粗定位和精定位的方法。 四、接受任务学生: 计科 94 班 姓名 宋开拓 五、开始及完成日期: 自 2012 年 11 月 12 日 至 2013 年 5 月 25 日 六、设计(论文)指导(或顾问): 指导教师 签名 签名 签名 教 研 室 主 任 学科组组长研究所 所长 签名 系主任 签名 III 2012 年 11 月 12 日 摘 要 车辆牌照识别系统(vehicle license plate recognition system,简称LPR)是 现代智能交通系统中的一项重要研究课题,是实现智能交通的重要环节,涉及 领域异常广阔。智能交通系统可以在不影响汽车正常行驶的状态下自动完成对 牌照的有效识别,很显然这一技术的发明对于交通管理工作起到了很大的推动 作用。目前,车辆牌照识别技术已经广泛应用于高速公路的监测,电子收费, 交通违规管理,安全停车管理,偷盗车辆辨别等重要领域。由于牌照拍摄场景 的复杂性以及车牌位置和图像质量的不可预知性,车牌定位系统一直都未做到 令人满意,所以车牌定位一直是这个领域研究的热点。因此对于汽车牌照识别 技术的研究具有重要的现实意义。 车牌识别技术主要包括车牌定位和车牌识别两部分,而车牌定位是该系统的 关键之一。本文针对车牌识别系统中关于静态图片中的车牌定位问题。在车牌 定位系统中,在MATLAB开发平台上,我们分别对图像预处理、图像的边缘检 测和分割的若干方法进行编程实验,通过对静态图片进行灰度变换,二值化, 中值滤波等一系列处理,提出了基于垂直边缘检测算子的车牌定位方法,根据 汽车牌照区域的垂直边缘统计特性,从图像中确定可能存在的牌照候选区,在 利用车牌几何形状的特点对这些候选区进行筛选,得到车牌位置,为进一步的 字符识别打下基础。 关键词:车牌定位;图像处理;边缘检测;MATLAB IV Abstract The vehicle license plate recognition system (vehicle license plate recognition system, referred to as LPR) is an important research subject in modern intelligent transportation system, is an important part of realizing intelligent transportation, relates to the very broad filed. Intelligent transportation systems can auto-complete state does not affect the normal driving license identification, it is clear that the invention of this technology for traffic management has played a significant role in promoting. At present, the vehicle license plate recognition technology has been widely used in highway monitoring, electronic toll collection, traffic violation management, security, parking management, vehicle theft to identify important areas such as. License shooting scene complexity as well as the license plate location and image quality of the unpredictability of the, license plate positioning system, none has been done satisfactorily, so license plate location has been a hot research of this area. Therefore, the vehicle license plate recognition technology has important practical significance. License plate recognition technology mainly includes two parts of the license plate location and license plate recognition, the license plate location is one of the keys of the system. In this paper, the license plate location for license plate recognition system on a static picture. License plate positioning system, in the MATLAB development platform, we use image preprocessing, image edge detection and segmentation method for programming experiment, by gray-scale transformation of the still pictures, the two values, median filtering and a series of processing, put forward license plate location method based on vertical edge detection operator, according to the vertical edges of the statistical characteristics of the vehicle license area, identify possible license candidate from the image, on the use of license plate geometry characteristics of these candidate screening, license plate location, and lay the foundation for further character recognition. Keywords:License plate location; image processing; edge detection; MATLAB V 目 录 摘 要 .III ABSTRACT .IV 目 录 .V 1 绪论 .1 1.1 本课题的研究背景和意义 .1 1.2 国内外的发展概况 .1 1.3 本课题主要研究的内容 .2 1.4 我国车牌的特点 .2 1.5 设计的总体思想 .3 1.6 本文各章节内容安排 .3 1.7 开发工具及运行环境 .3 2 基础知识和技术介绍 .5 2.1 基础知识 .5 2.2 MATLAB 简介 .6 3 车牌定位详细设计 .11 3.1 图像预处理 .12 3.1.1 车牌的基本特征 .12 3.1.2 彩色图像的灰度化 .12 3.1.3 图像灰度变换 .17 3.1.4 线性变换 .17 3.1.5 分段线性灰度变换 .18 3.1.6 非线性灰度变换 .19 3.1.7 图像平滑 .19 3.2 平滑处理 .19 3.2.1 噪声的基本概念 .19 3.2.2 空间域平滑 .20 3.2.3 频率域平滑 .22 3.3 图像边缘检测 .22 3.3.1 引言 .22 3.3.2 梯度算子 .22 3.3.3 Roberts 算子 .23 3.3.4 Prewitt 算子 .23 3.3.5 Sobel 算子 .24 3.3.6 Canny 算子 .25 3.3.7 Laplacian 算子 .26 3.4 牌照的定位与分割 .27 3.4.1 形态学去噪 .28 VI 3.4.2 牌照区域的分割 .32 3.4.3 车牌图像二值化 .32 3.4.4 中值滤波 .34 3.4.5 字符的分割与归一化 .36 3.5 本章小结 .37 4 车牌定位系统实现与测试 .39 4.1 系统构成 .39 4.2 实验结果及分析 .39 4.3 本程序对其他图片的识别效果 .44 4.4 本章小结 .50 5 结论与展望 .51 5.1 结论 .51 5.2 研究工作的展望 .51 致 谢 .53 参考文献 .54 汽车牌照定位系统设计与开发 1 1 绪论 1.1 本课题的研究背景和意义 20世纪90年代以来,随着我国经济的快速发展,人民生活水平的不断提高,国内高 速公路、城市道路、停车场建设越来越多,汽车数量急剧增加。但伴随经济高速发展而 产生的负产物也日益明显,即交通状况的不断恶化,尤其是近十多年来,无论是发达国 家还是发展中国家,都不同程度的受交通问题的困扰。时常发生交通拥挤、事故等。面 对日益严重的交通问题。智能交通系统(Intelligent Transportation System,简称ITS)已经 成为当前交通管理发展的主要方向,而车牌识别技术作为智能交通系统的核心,起着举 足轻重的作用,它在高速公路,城市道路,停车场等项目中占有无可取代的重要地位。 目前,国外车牌识别系统已经成功应用于实际交通系统中,而国内的车牌识别系统的应 用虽然也有部分成功事例,但基本上整体还处于试验阶段。如果引进国外的车牌识别系 统不仅费用较高,而且由于我国车牌自身的特点与国外车牌有着很大的不同之处,特别 是我国牌照中的汉字的识别问题,国外技术就无法实现。这就要求我们研制出适合我国 国情的车牌识别系统。车牌定位是车牌识别系统中的关键性的第一步,很大程度上决定 了车牌识别系统的准确性,鉴于车牌定位的重要性,本课题就是在这一背景下提出的。 汽车牌照识别技术是现代交通管理中的一个非常重要的研究课题,是实现交通管理 智能化的重要环节,它可广泛在高速公路、城市道路、停车场等的车辆管理,交通流量 检测,交通管理,免停车自动收费,闯红灯等违章车辆监控以及车辆安全防盗等领域, 智能交通系统(ITS)已成为当前交通管理发展的主要方向。车牌识别系统在ITS系统中 扮演着越来越重要的角色。所以,车牌识别系统的研究具有极大的市场价值。 1 1.2 国内外的发展概况 汽车牌照识别系统不管采用哪种方法,有两个问题是必须解决的:第一:如何清楚 的拍摄到清晰的汽车牌照图像。即是不论是刮风还是下雨,顺光还是逆光,白天还是黑 夜。都能将牌照拍的清晰。第二:怎样在图像中准确的识别出汽车牌照,就是适应个中 国环境下所拍摄到的图像。 一般来讲汽车牌照识别系统主要包括3个方面,即汽车牌照定位、汽车牌照切割、汽 车牌照识别。汽车牌照定位的主要功能就是在图像中给出汽车牌照的位置并且分割出来, 汽车牌照切割的主要功能就是把已获得的汽车牌照中的字符逐个切分出来,形成单个的 字符图像块。汽车牌照识别是整个系统的最后一个步骤。即把切割出来的字符进行识别 处理,得到可以用于计算机处理的信息格式(如文本格式) 。 国外最早提出的是在20世纪80年代,该阶段并没有形成完整的理论系统知识,而是 对车牌识别的某一种特定环境的应用或某一个问题进行了讨论,采用简单的图像处理技 术来解决问题。国外正式开始出现车牌识别系统化的研究是20世纪90年代以后。1990年, 国外的第一个车牌识别系统成功被研制,其主要途径就是对车牌的图像进行分析,自动 提取车牌信息,进而确定汽车车牌号码。 在现代,以色列Hi-Tech 公司的See/Car System系列,新加坡Optasia公司的VLPRS 系 无锡太湖学院学士学位论文 2 列都是比较成熟的产品。其中,VLPRS 产品主要适合与新加坡的车牌识别, Hi-Tech公司 的See/Car System有多种变形产品来分别适应于某一个国家的车牌识别。See/Car Chinese 系统也可以针对中国大陆的车牌进行识别,但是存在着一定的局限性,不能较好的识别 车牌中的汉字,另外日本、加拿大、德国、意大利、英国等国家都有适合于本国的车牌 识别系统。 国内在20世纪90年代已经开始对车牌识别系统进行了相关的研究,其中的北京汉王 公司的“汉王眼” 、成都西图科技有限公司生产的CIAST2003 车牌识别稽查系统、亚洲 视觉生产的VECONVIS车辆牌照识别系统以及等产品牌照识别率都达到了95以上。上 海交通大学戚飞虎提出了基于彩色分割的拍照识别方法;华中科技大学黄心汉提出了基 于模板匹配和神经网络的拍照识别方法。另外,西安交通大学的郑南宁等人提出了多层 次纹理分析的牌照识别方法也对车辆牌照识别系统也有极大价值的研究。众多的牌照识 别技术的研究促进了适合我国车辆牌照识别产品的问世,国内的牌照识别产品相继问世 并且投入使用。 1.3 本课题主要研究的内容 车牌定位(License Plate Location,简称LPL)就是要在一副拥有复杂背景的车辆图像中 把汽车牌照区域分割出来,它是汽车牌照识别系统中的第一步却是至关重要的一步。对 于一幅车辆图像来说,车牌区域只占全图的一小部分,要想将其准确定位并分割出来是 及其困难的,这就要求研究人员对车牌区域内的字符的纹理特征和字符与其背景之间的 灰度特征进行分析,寻找它们之间的差别。当前最常见的定位技术主要有:“基于边缘 检测的方法、 “基于彩色分割的方法” 、 “基于小波变换的方法和遗传算法等。 本论文是基于Sobel边缘检测和数学形态学的车牌定位系统。针对车牌四周边框,采 取了一种水平垂直结构元素的方法,有效地削弱它们对车牌定位准确率的不利影响,该 方法主要利用了边缘检测和数学形态学中的开运算、图像膨胀和腐蚀、区域填充等对车 牌图像进行处理。有效地提高了车牌定位准确率。 1.4 我国车牌的特点 我国机动车使用的牌照主要是根据公安部1992年颁发的中华人民共和国机动车号牌 标准(GA36-92)制作的。我国现有车辆牌照可分为四类:蓝底白字、黄底黑字、黑底白 字和白底黑字。字符分为四种类型:中文字符、英文字母、阿拉伯数字、圆点分隔符。 所有车辆具有以下特点: (1)1 车辆牌照由7 个字符组成的字符串呈水平排列。待识别的字符模板可分为以 下三类,汉字、英文字母、阿拉伯数字。 (2)车辆牌照区域牌底和牌字颜色对照大,边缘非常丰富。 (3) 车辆牌照原始尺寸每个字宽45mm,字高90mm,间隔符宽10mm,每个单元间 隔12mm。 (4)汽车牌照的悬挂位置不唯一。 (5)我国对于不同车辆、车型、用途使用不同类型的牌照(如军车、民用车、大型 汽车牌照定位系统设计与开发 3 车辆) 此次研究主要研究最常见的蓝底白字的车牌。 1.5 设计的总体思想 本文介绍了课题设计的内容和步骤,然后分析了图像与处理中运用到得处理方法, 如灰度变换,边缘检测,中值滤波等.最后检测车牌上下界和左右界,从而定位出车牌。 设计总体思想如图 1.1 所示。 输入图像 图像预处理 车牌定位 字符分割 图1.1 系统整个过程 第一步:在进行图像处理前先将位图读入到内存,这一步相当于车牌识别系统的汽 车图像数据的采集。 第二步:图像的预处理:包括灰度转换、边缘检测、背景干扰消弱、中值滤波等处 理。 第三步:车牌区域定位:采用水平投影和垂直投影法来获得车牌的具体位置。 第四步:裁减车牌并显示:在获得车牌的坐标位置的灰度图像上裁减车牌并显示出 来。 1.6 本文各章节内容安排 第一章:主要介绍了课题的研究背景及意义,重点阐述了车牌识别技术的研究现状, 并对研究内容和论文结构作了详细描述。 第二章:基本知识和 MATLAB 的基本原理介绍。 第三章:车牌定位详细设计 第四章:实验结果测试 第五章:结论与展望 1.7 开发工具及运行环境 车牌定位系统作为汽车牌照识别系统中重要的一个环节,合理选取开发工具,不仅 会对系统的研究与开发产生重大影响,而且还有可能大幅度降低开发成本,并提高系统 的稳定性和可维护性。车牌定位功能的开发属于一个较为复杂的图像处理程序。换句话 讲就是该功能对稳定性、可维护性有极为严格的要求,为此,本文决定选取MATLAB 作 为开发工具。软件环境:XP/WIN7。 无锡太湖学院学士学位论文 4 汽车牌照定位系统设计与开发 5 2 基础知识和技术介绍 2.1 基础知识 普通的显示器屏幕是由许多个点构成的,我们称之为像素。显示器显示时采用扫描 的方法为:电子枪每次从左到右扫描一行,为每个像素着色,然后从上到下扫描若干行, 就扫过了一屏。为了防止闪烁,每秒要重复上诉过程几十次。例如我们常说的屏幕分辨 率为 1024768,刷新频率为 60Hz,意思是说每行要扫描 1024 个像素,一共有 768 行, 每秒重复扫描屏幕 60 次。我们称这种显示器为位映像设备。所谓位映像,就是指一个二 维的像素矩阵,而位图就是采用位映像方法显示和存储的图像。 大自然界中,人眼直接看到的是连续的模拟信号。色度学理论认为,任何颜色都可 以由红、绿、蓝三种基本颜色按照不同的比例混合而得到,这三种颜色被称为三基色。 因此,人们常称这三种光为三基色或三原色。有的颜色含有蓝色成分多一些,如深蓝; 而有的含有蓝色成分少一些,如浅蓝。针对含有蓝色成分的多少,可以分成 0 到 255 共 256 个等级,0 表示不含蓝色成分;255 级表示含有 100%的蓝色成分。同样的,红色和绿 色也被分成 256 个等级。这种分级称为量化。这样,根据红、绿、蓝各种不同的组合我 们就能表示出 256256256,约 1600 万种颜色。 2 由于计算机处理的是离散数据,因此要处理图像,则需要将图像进行离散化。这一 过程叫做图像采集。图像采集系统包括三个基本单元,即成像系统、采集系统和量化器。 在 Windows 操作系统中,常用的图像格式是位图格式,即 BMP 图像。 位图图像(bitmap), 亦称为绘制图像或点阵图像,是由称作像素(图片元素)的单个 点组成的。这些点可以进行不同的排列和染色以构成图样。BMP 格式的图像是一种设备 无关位图。设备无关的含义是指格式中包含了完整的位图信息似的该位图可以在各种不 同的设备上重现。 位图保持为磁盘文件时,包含了 4 个部分:位图文件头、位图信息头、调色板、实 际的位图数据。如图 2.1 所示。 图 2.1 BMP 文件格式 这四个部分是以.BMP 文件格式存储的。 1.位图文件头:包含文件类型,必须是 0 x424D,即字符串 “BM”,并且指定文件大 小,文件头到实际的位图数据的偏移字节数。 2.位图信息头:信息包含有这个结构的长度,指定图像的宽度,单位是像素.指定图 象的高度,单位是象素。指定位图是否压缩,有效值为 BI_RGB,BI_RLE8,BI_RLE4,BI- 位图文件头 位图信息头 调色板 实际的位图数据 无锡太湖学院学士学位论文 6 BITFIELDS(都是一些 Windows 定义好的常量)。指定实际的位图数据占用的字节数.指定 目标设备的水平分辨率,单位是每米的象素个数,指定目标设备的垂直分辨率.指定本图 像实际用到的颜色数。 3.调色板:调色板实际上是一个数组存有 RGB 信息。 它有若干个表项,每一个表项 是一个 RGBQUAD 类型的结构,定义的一种颜色。 4.实际位图数据:用到调色板的位图,图像数据就是该象素在调色板中的索引值。对 于真彩图,图像数据就是实际的 R、G、B 值对于 2 色位图,用 1 位就可以表示该象素的 颜色(一般 0 表示黑,1 表示白) ,所以一个字节可以表示 8 个象素。对于 256 色位图, 一个字节刚好可以表示一个象素。对于真彩图,三个字节才能表示 1 个象素。 Windows 规定一个扫描行所占的字节数必须是 4 的倍数(即以 long 为单位),不足的以 0 填充。 2.2 MATLAB 简介 MATLAB 是矩阵实验室(MatrixLaboratory )之意。除具备卓越的数值计算能力外, 它还提供了专业水平的符号计算,文字处理,可视化建模仿真和实时控制等功能。在 70 年代中期,CleveMoler 博士和其同事在美国国家科学基金的资助下开发了调用 EISPACK 和 LINPACK 的 FORTRAN 子程序库。EISPACK 是特征值求解的 FOETRAN 程序库, LINPACK 是解线性方程的程序库.在当时,这两个程序库代表矩阵运算的最高水平。到 70 年代后期,身为美国 NewMexico 大学计算机系系主任的 CleveMoler,在给学生讲授线性代 数课程时,想教学生使用 EISPACK 和 LINPACK 程序库,但他发现学生用 FORTRAN 编 写接口程序很费时间,于是他开始自己动手,利用业余时间为学生编写 EISPACK 和 LINPACK 的接口程序。CleveMoler 给这个接口程序取名为 MATLAB,该名为矩阵 (matrix)和实验室(labotatory)两个英文单词的前三个字母的组合。在以后的数年里, MATLAB 在多所大学里作为教学辅助软件使用,并面向大众作为免费软件而广为流传。 1984 年由 Little、Moler 、 SteveBangert 合作成立了的 MathWorks 公司正式把 MATLAB 推 向市场。表 2-1 给出了 MATLAB 的版本更新情况。 3 表 2-1 MATLAB 版本更新情况 版本 建造编号 发布时间 MATLAB 1.0 1984 MATALB 2 1986 MATLAB 3 1987 MATLAB 3.5 1990 MATLAB 4 1992 MATLAB 4.2c R7 1994 MATLAB 5.0 R8 1996 MATLAB 5.1 R9 1997 MATLAB 5.1.1 R9.1 1997 MATLAB 5.2 R10 1998 MATLAB 5.2.1 R10.1 1998 MATLAB 5.3 R11 1999 汽车牌照定位系统设计与开发 7 续表 2-1 版本 建造编号 发布时间 MATLAB 5.3.1 R11.1 1999 MATLAB 6.0 R12 2000 MATLAB 6.1 R12.1 2001 MATLAB 6.5 R13 2002 MATLAB 6.5.1 R13SP1 2003 MATLAB 6.5.2 R13SP2 2003 MATLAB 7 R14 2004 MATLAB 7.0.1 R14SP1 2004 MATLAB 7.0.4 R14SP2 2005 MATLAB 7.1 R14SP3 2005 MATLAB 7.2 R2006a 2006 MATLAB 7.3 R2006b 2006 MATLAB 7.4 R2007a 2007 MATLAB 7.5 R2007b 2007 MATLAB 7.6 R2008a 2008 MATLAB 7.7 R2008b 2008 MATLAB 7.8 R2009a 2009.3.6 MATLAB 7.9 R2009b 2009.9.4 MATLAB 7.10 R2010a 2010.3.5 MATLAB 7.11 R2010b 2010.9.3 MATLAB 7.12 R2011a 2011.4.8 MATLAB 7.13 R2011b 2011.9.1 MATLAB 7.14 R2012a 2012.3.1 MATLAB 8.0 R2012b 2012.9.11 MATLAB 8.1 R2013a 2013.3.7 MATLAB 的基本数据单位是矩阵,它的指令表达式与数学,工程中常用的形式十分 相似,故用 MATLAB 来解算问题要比用 C, FORTRAN 等语言完成相同的事情简捷得多。 当前流行的 MATLAB 5.3/Simulink 3.0 包括拥有数百个内部函数的主包和三十几种工具包 (Toolbox).工具包又可以分为功能性工具包和学科工具包.功能工具包用来扩充 MATLAB 的符号计算,可视化建模仿真,文字处理及实时控制等功能.学科工具包是专业性比较强的工 具包,控制工具包,信号处理工具包,通信工具包等都属于此类。开放性使 MATLAB 广受用 户欢迎.除内部函数外,所有 MATLAB 主包文件和各种工具包都是可读可修改的文件,用 户通过对源程序的修改或加入自己编写程序构造新的专用工具包。 在当 30 多个数学类科技应用软件中,就软件数学处理的原始内核而言,可分为两大类.一 类是数值计算型软件,如 MATLAB,Xmath,Gauss 等,这类软件擅长于数值计算,对处 理大批数据效率较高。另一类是数学分析型软,Mathematica,Maple 等,这类软件以符 号计算见长,能给出解析解和任意精确解,其缺点是处理大量数据时效率较低。 MathWorks 公司顺应多功能需求之潮流,在其卓越数值计算和图示能力的基础上,又率 无锡太湖学院学士学位论文 8 先在专业水平上开拓了其符号计算,文字处理,实时控制能力和可视化建模,开发了适 合多学科,多部门要求的新一代科技应用软件 MATLAB。经过多年的不断努力,MATLAB 已经占据了数值软件市场的主导地位。 时至今日,经过 MathWorks 公司的不断完善,MATLAB 已经发展成适合多学科,多 种工作平台的功能强大的大型软件。特别是在数值分析、工程与科学绘图、控制系统的 设计与仿真、数字图像处理、数字信号处理、通讯系统设计与仿真、财务与金融工程等 领域发挥着着较强的优势。在国外,MATLAB 已经经受了多年考验。在欧美等高校, MATLAB 已经成为线性代数,自动控制理论,数理统计,数字信号处理,时间序列分析, 动态系统仿真等高级课程的基本教学工具;成为攻读学位的大学生,硕士生,博士生必 须掌握的基本技能。在设计研究单位和工业部门,MATLAB 被广泛用于科学研究和解决 各种具体问题。在国内,特别是工程界,MATLAB 一定会盛行起来。可以说,无论你从 事工程方面的哪个学科,都能在 MATLAB 里找到合适的功能。 一种语言之所以能如此迅速地普及,显示出如此旺盛的生命力,是由于它有着不同 于其他语言的特点,正如同 FORTRAN 和 C 等高级语言使人们摆脱了需要直接对计算机 硬件资源进行操作一样,被称作为第四代计算机语言的 MATLAB,利用其丰富的函数资 源,使编程人员从繁琐的程序代码中解放出来。MATLAB 最突出的特点就是简洁。 MATLAB 用更直观的,符合人们思维习惯的代码,代替了 C 和 FORTRAN 语言的冗 长代码。MATLAB 给用户带来的是最直观,最简洁的程序开发环境。以下简单介绍一下 MATLAB 的主要特点。 (1)语言简洁紧凑,使用方便灵活,库函数极其丰富。MATLAB 程序书写形式自由, 利用起丰富的库函数避开繁杂的子程序编程任务,压缩了一切不必要的编程工作。由于 库函数都由本领域的专家编写,用户不必担心函数的可靠性。可以说,用 MATLAB 进行 科技开发是站在专家的肩膀上。 具有 FORTRAN 和 C 等高级语言知识的读者可能已经注意到,如果用 FORTRAN 或 C 语言去编写程序,尤其当涉及矩阵运算和画图时,编程会很麻烦。例如,如果用户想求 解一个线性代数方程,就得编写一个程序块读入数据,然后再使用一种求解线性方程的 算法(例如追赶法)编写一个程序块来求解方程,最后再输出计算结果。在求解过程中, 最麻烦的要算第二部分。解线性方程的麻烦在于要对矩阵的元素作循环,选择稳定的算 法以及代码的调试动不容易。即使有部分源代码,用户也会感到麻烦,且不能保证运算 的稳定性。解线性方程的程序用 FORTRAN 和 C 这样的高级语言编写,至少需要四百多 行,调试这种几百行的计算程序可以说很困难。 (2)运算符丰富。由于 MATLAB 是用 C 语言编写的, MATLAB 提供了和 C 语言 几乎一样多的运算符,灵活使用 MATLAB 的运算符将使程序变得极为简短。 (3)MATLAB 既具有结构化的控制语句(如 for 循环,while 循环,break 语句和 if 语句) ,又有面向对象编程的特性。 (4)程序限制不严格,程序设计自由度大。例如,在 MATLAB 里,用户无需对矩 阵预定义就可使用。 (5)程序的可移植性很好,基本上不做修改就可以在各种型号的计算机和操作系统 汽车牌照定位系统设计与开发 9 上运行。 (6)MATLAB 的图形功能强大。在 FORTRAN 和 C 语言里,绘图都很不容易,但 在 MATLAB 里,数据的可视化非常简单。MATLAB 还具有较强的编辑图形界面的能力。 (7)MATLAB 的缺点是,它和其他高级程序相比,程序的执行速度较慢。由于 MATLAB 的程序不用编译等预处理,也不生成可执行文件,程序为解释执行,所以速度 较慢。 (8)功能强大的工具箱是 MATLAB 的另一特色。 MATLAB 包含两个部分:核心部 分和各种可选的工具箱。核心部分中有数百个核心内部函数。其工具箱又分为两类:功 能性工具箱和学科性工具箱。功能性工具箱主要用来扩充其符号计算功能,图示建模仿 真功能,文字处理功能以及与硬件实时交互功能。功能性工具箱用于多种学科。而学科 性工具箱是专业性比较强的,如 control,toolbox,signal processing toolbox,communication toolbox 等。这些工具箱都是由该领域内学术水平很高的专家编写的,所以用户无需编写 自己学科范围内的基础程序,而直接进行高,精,尖的研究。 (9编号无锡太湖学院毕业设计(论文)相关资料题目: 汽车牌照定位系统设计与开发 信机 系 计算机科学与技术专业学 号:学生姓名:指导教师: 2013年5月25日目 录一、毕业设计(论文)开题报告二、毕业设计(论文)外文资料翻译及原文三、学生“毕业论文(论文)计划、进度、检查及落实表”四、实习鉴定表无锡太湖学院毕业设计(论文)开题报告题目: 汽车牌照定位系统设计与开发 信机 系 计算机科学与技术 专业学 号:学生姓名:指导教师: 2012年11月20日 课题来源导师指定科学依据(包括课题的科学意义;国内外研究概况、水平和发展趋势;应用前景等)汽车车牌识别系统是近几年发展起来的计算机视觉和模式识别技术在智能交通领域应用的重要研究课题之一。在车牌自动识别系统中,首先要将车牌从所获取的图像中分割出来实现车牌定位,这是进行车牌字符识别的重要步骤,定位的准确与否直接影响车牌识别率。研究内容车辆牌照定位与识别是计算机视觉与模式识别技术在智能交通领域应用的重要研究课题之一,该技术应用范围非常广泛,其中包括:(1)交通流量检测;(2)交通控制与诱导;(3)机场、港口等出入口车辆管理;(4)小区车辆管理;(5)闯红灯等违章车辆监控;(6)不停车自动收费;(7)道口检查站车辆监控;(8)公共停车场安全防盗管理;(9)计算出行时间;(10)车辆安全防盗、查堵指定车辆等。其潜在在市场应用价值极大,有能力产生巨大的社会效益和经济效益。国外最早提出的是在20世纪80年别系统成功被研制,其主要途径就是对车牌的图像进行分析,自动提取车牌信息,进而确定汽车车牌号码。在现代,以色列Hi-Tech公司的See/Car System系列,新加坡Optasia公司的VLPRS 系列都是比较成熟的产品。其中,VLPRS产品主要适合与新加坡的车牌识别,Hi-Tech公司的See/Car System有多种变形产品来分别适应于某一个国家的车牌识别。See/Car Chinese系统也可以针对中国大陆的车牌进行识别,但是存在着一定的局限性,不能较好的识别车牌中的汉字,另外日本、加拿大、德国、意大利、英国等国家都有适合于本国的车牌识别系统。国内在20世纪90年代已经开始对车牌识别系统进代,该阶段并没有形成完整的理论系统知识,而是对车牌识别的某一种特定环境的应用或某一个问题进行了讨论,采用简单的图像处理技术来解决问题。国外正式开始出现车牌识别系统化的研究是20世纪90年代以后。1990年,国外的第一个车牌识行了相关的研究,其中的北京汉王公司的“汉王眼”、成都西图科技有限公司生产的CIAST2003车牌识别稽查系统、亚洲视觉生产的VECONVIS车辆牌照识别系统以及等产品牌照识别率都达到了95以上。上海交通大学戚飞虎提出了基于彩色分割的拍照识别方法;华中科技大学黄心汉提出了基于模板匹配和神经网络的拍照识别方法。另外,西安交通大学的郑南宁等人提出了多层次纹理分析的牌照识别方法也对车辆牌照识别系统也有极大价值的研究。众多的牌照识别技术的研究促进了适合我国车辆牌照识别产品的问世,国内的牌照识别产品相继问世并且投入使用。拟采取的研究方法、技术路线、实验方案及可行性分析本次毕业设计首先对车牌识别系统的现状和已有的技术进行了深入的研究在此基础上设计并开发了一个基于MATLAB的车牌定位系统通过编写MATLAB文件对各种车辆图像处理方法进行分析、比较,最终确定了车牌预处理、车牌定位的方法。本次设计采取的是基于Sobel的边缘检测先从经过边缘提取后的车辆图像中提取车牌特征,进行分析处理,从而初步定出车牌的区域,再利用车牌的先验知识和分布特征对车牌区域平滑图像进行处理,从而得到车牌的精确区域,并且取得了较好的定位结果。研究计划及预期成果2011年12月4日以前:填写毕业设计开题报告,并按开题报告条款进入毕业设计阶段2011年12月2012年1月:外文资料翻译,系统设计2012年2月:系统设计、编码2012年3月2012年4月:测试、验收,撰写毕业论文2012年5月:上交论文、系统代码、根据导师意见修改毕业论文并完善论文2012年6月2日4日,进行毕业答辩预期成果:每步安排都可以按时完美完成特色或创新之处本次设计采取的是Sobel边缘检测,先从经过边缘提取后的车辆图像中提取车牌特征,进行分析处理,从而初步定出车牌的区域,再利用车牌的先验知识和分布特征对车牌区域进行处理,从而得到车牌的精确区域并且取得了较好的定位结果。已具备的条件和尚需解决的问题已具备的条件:1、硬件方面有一台计算机,一台相机2、软件方面配有MATLAB平台3、网络方面有数条数据线可用指导教师意见 指导教师签名:年 月 日教研室(学科组、研究所)意见 教研室主任签名: 年 月 日系意见 主管领导签名: 年 月 日英文原文1.IntroductionNowadays license plate recognition becomes akey technique to many automated transport systemssuch as road traffic monitoring, automaticpayment of tolls on highways or bridges and parkinglots access control. License plate location is anessential and important stage in this technique,and it has received considerable attention.Researchers have found many diverse methods of license plate location. Rodolfo and Stefano(2000) devised a method based on vector quantization (VQ). VQ image representation is a quadtree representation by the specific coding mechanism,and it can give a system some hints about the contents of image regions, and such information boosts location performance. Park et al. (1999)used neural networks to locate license plate. Neural networks can be used as filters for analyzing small windows of an image and deciding whether each window contains a license plate, and their inputs are HSI values; a post-processor combinesthese filtered images and locates the bounding boxes of license plates in the image. Besides neural networks, other filters have been considered too. For example, some authors used line sensitive filters to extract the plate areas. License plates are identified as image areas with high density of rather thin dark lines or curves. Therefore, localization is handled looking for rectangular regions in the image containing maxima of response to these line filters, which is computed by a cumulative function (Luis et al., 1999). Plate characters can be direct identified by scanning through the input image and looking for portions of the image that were not linked to other parts of the image.If a number of characters are found to be in a straight line, they may make up a license plate (Lim et al., 1998). Fuzzy logic has been applied to the problem of locating license plate by Zimic et al. (1997). The authors made some intuitive rules to describe the license plate, and gave some membership functions for the fuzzy sets bright and dark, bright and dark sequence to getthe horizontal and vertical plate positions. But this method is sensitive to the license plate color and brightness and needs much processing time. Using color features to locate license plate has been studied by Zhu et al. (2002) and Wei et al. (2001), but these methods are not robust enough to the different environments. Edge features of the car image are very important, and edge density can be used to successfully detect a number plate location due to the characteristics of the number plate. Ming et al. (1996) developed a method to improve the edge image by eliminating the highest and lowest portions of the edge density to simplify the whole image. But some of the plate region identity will be lost in this method.This paper further researches the subject of license plate location. The rectangle license platecontains rich edge and texture information, so we consider it in its edge image but very different toMing et al. (1996). We first enhance the original car image to boost up the plate area, then extractthe vertical edge image using Sobel operator, and then remove the background curves and noise inthe edge image, and finally slide a rectangle window to search the plate in the residual image andsegment it out from the original car image. Section2 describes our method of license plate location, and it contains four parts: image enhancement, vertical edge extraction, background curve andnoise removing, plate search and segmentation. Experiments with three sets of car images are performed in Section 3. Section 4 gives the discussion and conclusions.1. The proposed method for license plate locationAll the input car images have 384 288 pixels and 256 gray levels, and an example image is given in Fig. 1. The license plate of the car consists of several characters (such as Latin letters, Arabic numerals, etc.), so the plate area contains rich edge information. But sometimes the background of the car image holds much edge information too. There are two facts that attract our attention: one is that the background areas around the license plate mainly include some horizontal edges; the other is that the edges in the background are mainly long curves and random noises, whereas the edges in the plate area cluster together and produce intense texture feature. If only the vertical edges are extracted from the car image (although the plate will lose a little horizontal edge information, this little loss is to be valuable) and most of the background edges are removed, the plate area will be isolatedout distinctly in the whole edge image. Thus we propose to locate the license plate in its vertical edge image as the following four stages.2.1. Image enhancementIn Fig. 1, the gradients in the license plate area are much lower than those in the contour areas of the car, which is caused by the car shadow in the dazzling sunshine. The car images captured in the gloomy days or dim nights often bring out weak gradients in plate areas too. A few vertical edges will appear in the plate areas, if we extract edge images directly from these car images. Therefore it is important to enhance the car images firstly.The local areas that need to be enhanced in a car image have low variances. Here we use Ii,jto denote the luminance of the pixel Pi,j (row:0 6 i 288, column: 0 6 j 384) in the car image,and use I1i;j to denote the luminance in the enhanced image. We let Ii,j and I1 i;j satisfy Eq. (1), where Wi,j is a window centered on pixel Pi,j, IW i;j and rW i;j are the mean luminance and standard deviation of the pixels in the window Wi,j, I0 andr0 are the expected mean and standard deviation,respectively. (1)In order to represent the local information better, the size of the window should be smaller than the estimated size of the plate. In this paper, we select a 48 36 rectangle as the window Wi,j and thus 8 8 windows can cover over the whole 384 288 car image. Let I0 be equal to IW i;j and r0 be a constant independent of pixel Pi,j. Now we need to know the values IW i;j and rW i;j at each pixel. Computing out all the values is not advisable, and we can use the bilinear interpolation algorithm to get them. First we cut the car image into 8 8 blocks equably; and then compute out the IW i;j and rW i;j values at the vertexes of blocks, where i = 36m, j = 48n,m,n = 0,1,2, . . . ,8; finally compute out every IW i;j and rW i;j by the bilinear interpolation Eqs. (2) and (3) (Fig. 2), where 36m 6 i 36(m + 1), 48n 6 j 0) Mi,j = maxMi1,j1,Mi1,j,Mi1,j+1, Mi,j1 + 1; else Mi,j = maxMi2,j1,Mi2,j,Mi2,j+1, Mi1,j2,Mi1,j+2,Mi,j2 + 1; end end end end3. for each row i from bottom-to-top do for each column j from right-to-left do if (Ei,j= =1) if (Ei+1,j1 + Ei+1,j + Ei+1,j+1+Ei,j+1 0) Ni,j = maxNi+1,j1,Ni+1,j,Ni+1,j+1, Ni,j+1 + 1; else Ni,j = maxNi+2,j1,Ni+2,j,Ni+2,j+1, Ni+1,j2,Ni+1,j+2,Ni,j+2 + 1; end end endend4. for each row i from top-to-bottom do for each column j from left-to-right do if (Ei,j= =1) if (Mi,j + Ni,j TlongkMi,j + Ni,j Tshort) Ei,j = 0; end end endendIn the above algorithm, we accumulate the edge lengths through observing the concerned neighborhood pixels (CNP) of the current pixel Pi,j. Fig. 7 shows the CNP in shadow grids.The result (Fig. 8) shows that most of the background and noise edges have been eliminated, but the license plate edges are almost fully saved.2.4. License plate search and segmentationAfter non-plate edges have been heavily removed, license plate location becomes much easier.We can shift a rectangle window whose size is just bigger than that of the license plate (forexample 80 32) from left-to-right and top-to-bottom in the edge image. Count the total number of the edge points in the window. If the number is above a certain percentage of the area of the window, there may be a license plate in the corresponding window.In order to expedite the search process, we let the window shifted by some Xstep and Ystep (for example Xstep = 8,Ystep = 8) instead of by pixel.And the following four steps tell how to locate the license plate: Cut the 384 288 edge image into many 8 8 blocks equably, and count the number of edge points in each little block, and form a 48 36 block image B. Use a (80/8) (32/8) = 10 4 matrix W (each element is equal to 1) to denote the window.Convolve the image B with the window W,and export the image B0. If is above the threshold and is the local maximum, then record position as one of the plate candidates. Search all the candidates in their local regions,sort them by their B values and segment them out from the original car image.The convolution result is shown in Fig. 9(a). The response in the plate center is far higher than the other areas, so only one candidate will be searched in general. The plate segmented from the car image in Fig. 1 is shown in Fig.9(b). The rest tasks are plate distortion correction, characters cutting and characters recognition, but they are not discussed in this paper.3. Experimental resultsIn this section we compare the performance ofthe proposed method against some other used methods: line sensitive filters (Luis et al.,1999), row-wise and column-wise DFTs (Parisi et al., 1998), and edge image improvement(Ming et al., 1996). The vector quantization(Rodolfo and Stefano, 2000) is mainly used for imagecoding; and color feature (Wei et al., 2001; Zhu et al., 2002) is not robust enough for weather conditions, extra lights or dirty plates; and fuzzy logic approach (Zimic et al., 1997) works well under the assumption that the majority of plates are white with black characters, while most of Chinese license plates are blue with white characters. Therefore, these three methods were not employed in our comparative experiments.The line sensitive filters method consists of three steps: subsampling image, applying line sensitive filters, and looking for rectangle regions containing maxima of response. The row-wise and column-wise DFTs method involves four steps: decomposing expected harmonics by using horizontal DFT on the image, averaging the harmonics in the spatial frequency domain, finding the horizontal stripe of the image containing the plate by maximizing the energy, and finding the vertical position of the plate in the same way by using vertical DFT on the candidate stripes. And the edge image improvement method contains five steps: extracting the edge image using Sobel operators, computing the horizontal projections of the edge image, calculating the medium range of the edge density level, eliminating the highest and lowestportion of the horizontal projections to simplify the whole image, and finding the candidates of license plates.Three sets of Chinese vehicle images were used in our experiments. The first set has 163 images, and they were captured on a gate of our campus.The second set has 218 images, and they were captured in the shadow of strong sunlight near a road. The third set has 784 images, in which there are many complex backgrounds such as trees, parked bicycles and so on, and these images were taken from morning till night.We performed all the four methods on the three sets. The Table 1 shows the experimental results. For each image, we located 1 3 plate candidates, and the numbers of license plates hit by the first, the second and the third candidates are listed in Table 1, respectively. From this table we can see that the proposed method outperforms much over the other three methods: most of the license plates are found by the first candidates, and the location rates are almost all 100% (The two missing plates in the third set are too small). And the high location rates on the three sets reveal the robustness and efficiency of our method in license plate location.For the other three methods, most mislocated plates happened with the images containing some special objects (brands, radiators, bumpers) or complex backgrounds (trees, bicycles), and the images captured against the strong sunlight or under the gloomy light.The computational times of the four methods are shown in Table 2, when they run on a Pentium-4 2.4 GHz, 256 MB RAM PC. The proposed method is the slowest one among the four methods.The average processing times for the four stages of the proposed method are listed in Table 3. A lot of the time is consumed on the first stage image enhancement. The total time of processing one 384 288 image is 47.9 ms, and it meets the requirement of real time processing.4. ConclusionThe proposed method of license plate location makes use of the rich edge information in the plate area. In Section 2.1, we enhance the local areas in the original car image, but it is an alternative to enhance the gradient image to intensify the texture of the plate region. To avoid the interference factors around the plate, only vertical edges are extracted in Section 2.2. If the vertical edges, the left diagonal edges and the right diagonal edges are all extracted, a better continuity in edge curves can be attained at the expense of more computation time. The survival isolated short edges in Fig. 8 remain to be eliminated but not necessary.The method has still some drawbacks. In Section 2.1, the IW i;j and rW i;j calculated by bilinear interpolation algorithm are not the actual values at the point Pij. The integral image algorithm can solve this problem, but it takes much computation time too. Some numbers in this paper are relative to the estimated size of the license plate.So if all the license plates in the images have the same size, the method will work better.A great effec
收藏