1 Star 1 Fork 1

zhuzhengxiong / License-Plate-Recognition-1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

License-Plate-Recognition

License Plate Recognition For Car With Python And OpenCV

用python3+opencv3做的中国车牌识别,包括算法和客户端界面,只有2个文件,surface.py是界面代码,predict.py是算法代码,界面不是重点所以用tkinter写得很简单。

使用方法:

版本:python3.4.4,opencv3.4和numpy1.14和PIL5
下载源码,并安装python、numpy、opencv的python版、PIL,运行surface.py即可

算法实现:

算法思想来自于网上资源,先使用图像边缘和车牌颜色定位车牌,再识别字符。车牌定位在predict方法中,为说明清楚,完成代码和测试后,加了很多注释,请参看源码。车牌字符识别也在predict方法中,请参看源码中的注释,需要说明的是,车牌字符识别使用的算法是opencv的SVM, opencv的SVM使用代码来自于opencv附带的sample,StatModel类和SVM类都是sample中的代码。SVM训练使用的训练样本来自于github上的EasyPR的c++版本。由于训练样本有限,你测试时会发现,车牌字符识别,可能存在误差,尤其是第一个中文字符出现的误差概率较大。源码中,我上传了EasyPR中的训练样本,在train\目录下,如果要重新训练请解压在当前目录下,并删除原始训练数据文件svm.dat和svmchinese.dat。

额外说明:算法代码只有500行,测试中发现,车牌定位算法的参数受图像分辨率、色偏、车距影响(test目录下的车牌的像素都比较小,其他图片很可能因为像素等问题识别不了,识别其他像素的车牌需要修改config文件里面的参数,此项目仅是抛砖引玉,提供一个思路)。
有任何疑问请邮件至 wzh191920@sina.com
界面效果:

MIT License Copyright (c) 2018 wzh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

License Plate Recognition For Car With Python And OpenCV 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/zzxspace/License-Plate-Recognition-1.git
git@gitee.com:zzxspace/License-Plate-Recognition-1.git
zzxspace
License-Plate-Recognition-1
License-Plate-Recognition-1
master

搜索帮助