前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >一款开源的车牌号码识别系统OpenALPR

一款开源的车牌号码识别系统OpenALPR

作者头像
mythsman
发布2022-11-14 15:36:12
2.1K0
发布2022-11-14 15:36:12
举报
文章被收录于专栏:mythsman的个人博客

关于车牌号码的识别,其实研究也很多了。但是对于普通的开发者而言,本身不想去研究这些算法层面的东西,只是想能够直接应用来做我们自己需要的事情。虽然很多网站提供了Api接口,但是毫无疑问这是要money的。之前看到国人发的一片博客介绍他自己写的开源车牌识别系统叫Easypr,我自己也下载下来研究了一下。然而使用的时候发现错误有很多,而且没有正规的接口文档,做的也特别粗糙,显然不太适合直接使用。百度不到我就直接去google,果然还是发现了老外写的一款开源的识别软件--openalpr(Open Automatic License Plate Recognition 开源自动车牌识别),发布在github上。拿过来测试之后发现效果还挺好的,而且文档清楚,虽然不能识别中文,但是对字母和数字的识别准确性还是挺好的。不管怎么说,先记下来以防以后用到。

这个程序有很多版本,有各种语言的接口,也有Linux下的二进制文件。鉴于现在不需要用来开发,我们直接用他编译成的二进制命令即可。当然如果有需要,也可以去下载他的源码,调用他的函数库。如果有闲工夫的话也可以尝试这改一改。。。。让他能识别中文,造福国人。

安装:

使用github上提供的最简单的方法--

代码语言:javascript
复制
wget -O - http://deb.openalpr.com/openalpr.gpg.key | sudo apt-key add -
echo "deb http://deb.openalpr.com/master/ openalpr main" | sudo tee /etc/apt/sources.list.d/openalpr.list
sudo apt-get update
sudo apt-get install openalpr openalpr-daemon openalpr-utils libopenalpr-dev

帮助:

代码语言:javascript
复制
alpr  [-c <country_code>] [--config <config_file>] [-n <topN>] [--seek
         <integer_ms>] [-p <pattern code>] [--clock] [-d] [-j] [--]
         [--version] [-h] <image_file_path>

Where: 

   -c <country_code>,  --country <country_code>
     Country code to identify (either us for USA or eu for Europe). 
     Default=us

   --config <config_file>
     Path to the openalpr.conf file

   -n <topN>,  --topn <topN>
     Max number of possible plate numbers to return.  Default=10

   --seek <integer_ms>
     Seek to the specified millisecond in a video file. Default=0

   -p <pattern code>,  --pattern <pattern code>
     Attempt to match the plate number against a plate pattern (e.g., md
     for Maryland, ca for California)

   --clock
     Measure/print the total time to process image and all plates. 
     Default=off

   -d,  --detect_region
     Attempt to detect the region of the plate image.  [Experimental] 
     Default=off

   -j,  --json
     Output recognition results in JSON format.  Default=off

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.

   <image_file_path>
     Image containing license plates

   OpenAlpr Command Line Utility

效果:

代码语言:javascript
复制
myths@myths-X450LD:~/Download$ alpr a.jpg
plate0: 10 results
    - EHL5747	 confidence: 90.5541
    - EHL577	 confidence: 83.4746
    - EHLS747	 confidence: 82.0519
    - EH5747	 confidence: 80.6372
    - EHLB747	 confidence: 78.9456
    - EHE5747	 confidence: 78.337
    - EHC5747	 confidence: 77.903
    - EHL747	 confidence: 77.4477
    - EBL5747	 confidence: 76.8316
    - EL5747	 confidence: 75.6551

对于正面的牌照识别的效果还是很好的,但是对于中国的车牌来说识别的效果就很差了。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
汽车相关识别
汽车相关识别(Vehicle Optical Character Recognition,Vehicle OCR)基于行业前沿的深度学习技术,提供驾驶证识别、行驶证识别、车牌识别、车辆 VIN 码识别等多种服务,支持将图片上的文字内容,智能识别为结构化的文本,应用于车主身份认证、ETC 出行、违章识别、停车管理等多种场景,大幅提升信息处理效率。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档