基于Python的车牌识别系统的实现
摘要
随着我国经济的飞速发展,越来越多的家庭拥有私家车,甚至一个家庭有多台私家车,这也为我国的交通增添了许多压力。车牌识别系统在我国有着十分广泛的应用。在我国交警部门,车牌识别技术的使用尤为广泛,各个路口和高速公路上的探头不仅仅是简单的监控探头还有很多的测速探头,而一旦发现违章就要通过车牌识别技术来对违章车辆的车牌进行捕捉,这大大降低了交警的工作量。而目前我国在车牌识别系统方面还存在一些缺陷。例如,在一些恶劣天气下会使得车牌识别不准确。并且,由于我国车牌有汉字的部分,而汉字一些文字较为繁琐,例如:赣字车牌;在对其进行二值化处理后容易造成笔画模糊。因此,本文将会进一步对基于Python的车牌识别系统的实现做进一步的研究。
本文基于Python 语言设计了一套车牌识别系统,在本系统中充分利用了计算机视觉类库Opencv对图像的处理功能。在本文中按照对车牌图像的预处理、车牌定位、字符分割以及字符识别的顺序进行处理。在图像预处理方面采用了图像灰度化,在对图像进行边缘检测采用了Sobel算子,使用了图像二值化对图像进行分割,并采用了高斯模糊方法对图像进行模糊处理。同时使用水平分割,垂直分割和车牌大小归一化技术对预处理后的图像进行定位。最后,本文对已经完成的车牌识别系统进行了实验,实验结果表明该系统可以正确对车牌号码进行识别。
关键词:灰度化 Sobel算子 二值化
Abstract
With the rapid development of China's economy, more and more families own private cars, and even a family has multiple private cars, which also adds a lot of pressure to China's transportation. License plate recognition system has a very wide range of applications in China. In China's traffic police department, the use of license plate recognition technology is particularly extensive, the probes on each intersection and highway are not only simple monitoring probes and many speed probes, and once the violation is found, it is necessary to capture the license plate of the illegal vehicle through the license plate recognition technology, which greatly reduces the workload of the traffic police. At present, there are still some defects in China's license plate recognition system. For example, in some bad weather conditions, the license plate recognition will be inaccurate. Moreover, because China's license plate has a part of Chinese characters, and some Chinese characters are more cumbersome, such as: Ganzi license plate; it is easy to cause blurred strokes after binary processing. Therefore, this paper will further study the implementation of Python-based license plate recognition system.
In this paper, a license plate recognition system is designed based on Python language, and the image processing function of the computer vision library Opencv is fully utilized in this system. In this paper, the process of license plate image preprocessing, license plate location, character segmentation and character recognition is carried out. In the aspect of image preprocessing, the image grayscale is used, the edge detection of the image is performed by the Sobel operator, the image binarization is used to segment the image, and the Gaussian blur method is used to blur the image. The preprocessed images are localized using horizontal segmentation, vertical segmentation and license plate size normalization techniques simultaneously. Finally, this paper conducts experiments on the completed license plate recognition system, and the experimental results show that the system can correctly recognize the license plate number.
Keywords: Grayscale Sobel operator binarization
目录
第1章 绪论
1.1研究背景与意义
1.2课题研究现状
1.3研究目标
1.4研究内容与论文组织结构
第2章 相关理论与关键技术
2.1计算机视觉概述
2.2 Opencv计算机视觉函数库
2.3车牌规律
2.4车牌识别技术概要
2.5车牌识别系统流程
2.5.1车牌图像采集
2.5.2图像预处理
2.5.3车牌定位
2.5.4字符分割
2.5.5字符识别
第3章 系统的概要设计
3.1概要设计
3.2软件总体功能设计
3.2.1具体功能简介
3.3车牌识别的工作流程
第4章 详细设计与实现
4.1图像预处理
4.2车牌定位
4.3截图识别
4.4摄像头实时识别
4.5路径批量识别
4.6来自车牌图片信息识别
第5章 测试和结果分析
5.1系统测试方法
5.2功能测试
第6章 总结与展望
6.1项目不足
6.2研究展望
6.3总结语
参考文献
致谢