OpenALPR

自动车牌识别库。(Automatic License Plate Recognition library.)

Github星跟蹤圖

openalpr

OpenALPR 是一个用 c++ 编写的开源自动车牌识别库,使用c#、Java、Node.js、Go 和 Python 绑定。该库通过分析图像和视频流来识别车牌,输出是任何车牌字符的文本表示。

请点击此处查看在线演示: http://www.openalpr.com/demo-image.html

使用者指南

OpenALPR 包含一个命令行工具。只需输入“alpr [图像文件路径]”即可开始识别车牌图像。

例如,下面的输出是通过分析这个图像创建的: Plate Image

user@linux:~/openalpr$ alpr ./samplecar.png
plate0: top 10 results -- Processing Time = 58.1879ms.
    - PE3R2X     confidence: 88.9371
    - PE32X      confidence: 78.1385
    - PE3R2      confidence: 77.5444
    - PE3R2Y     confidence: 76.1448
    - P63R2X     confidence: 72.9016
    - FE3R2X     confidence: 72.1147
    - PE32       confidence: 66.7458
    - PE32Y      confidence: 65.3462
    - P632X      confidence: 62.1031
    - P63R2      confidence: 61.5089

详细的命令行用法:

<code>user@linux:~/openalpr$ alpr --help
用法: 
   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>
     国家代码标识(美国代表美国,欧盟代表欧洲)。 
     Default=us
   --config <config_file>
     openalpr.conf 文件的路径
   -n <topN>,  --topn <topN>
     可能返回的车牌号码的最大数目。Default=10
   --seek <integer_ms>
     在视频文件中查找指定的毫秒。 Default=0
   -p <pattern code>,  --pattern <pattern code>
     尝试将车牌号码与车牌图案(如 md 为马里兰州,ca 为加利福尼亚州)匹配。
   --clock
     测量/打印处理图像和所有车牌的总时间。 
     Default=off
   -d,  --detect_region
     尝试检测车牌图像的区域。[实验]
     Default=off
   -j,  --json
    输出识别结果为JSON格式。 Default=off
   --,  --ignore_rest
     忽略此标志后面标记的其他参数。
   --version
     显示版本信息并退出。
   -h,  --help
     显示使用信息和退出。
   <image_file_path>
     含牌照图像。
   OpenAlpr 命令行工具

二进制文件

预编译的 Windows 二进制文件可以从可以在发布页面上下载。

使用以下命令在 Ubuntu 16.04 上安装 OpenALPR:

sudo apt-get update && sudo apt-get install -y openalpr openalpr-daemon openalpr-utils libopenalpr-dev

文档

详细文档参见: doc.openalpr.com

集成库

OpenALPR 是用 C++ 编写的,并且在 C#、Python、Node.js、Go 和 Java 中都有绑定。有关如何在应用程序中运行 OpenALPR 的示例,请参阅本指南: http://doc.openalpr.com/bindings.html

编译

OpenALPR 在 Linux、Mac OSX 和 Windows 上编译和运行。

OpenALPR 需要以下额外的库:

- Tesseract OCR v3.0.4 (https://github.com/tesseract-ocr/tesseract)
- OpenCV v2.4.8+ (http://opencv.org/)

克隆这个 GitHub 仓库后,你应该下载并提取 Tesseract 和 OpenCV 源代码到他们自己的目录中。编译这两个库。

请按照各自操作系统的详细编译指南进行操作:

如果一切顺利,应该有一个名为 alpr 的可执行文件以及 libopenalpr-static.a libopenalpr.so ,它们可以是链接到您的项目中。

Docker

# Build docker image
docker build -t openalpr https://github.com/openalpr/openalpr.git
# Download test image
wget http://plates.openalpr.com/h786poj.jpg
# Run alpr on image
docker run -it --rm -v $(pwd):/data:ro openalpr -c eu h786poj.jpg

问题

请将问题或评论发布到 Google 群组列表中:https://groups.google.com/forum/#!forum/openalpr

贡献

OpenALPR 库的改进总是受欢迎的。请查看 OpenALPR 设计说明并开始使用。

代码贡献并不是唯一帮助的方法。你有一个大型的车牌图像库吗?如果是这样,请将您的数据上传到位于 upload.openalpr.com 的匿名FTP。您是否有时间在输入图像中“标记”车牌图像或以其他方式提供帮助?请通过在论坛发帖来告诉每个人。

许可证

Affero GPLv3 http://www.gnu.org/licenses/agpl-3.0.html

可用的商业友好许可。联系方式:info@openalpr.com

(First Version: vz 2019/08/07)

概覽

名稱與所有者openalpr/openalpr
主編程語言C++
編程語言Shell (語言數: 11)
平台Android, Docker, iOS, Linux, Mac, Windows
許可證GNU Affero General Public License v3.0
發布數8
最新版本名稱v2.3.0 (發布於 2016-07-17 16:14:45)
第一版名稱v1.0.0 (發布於 )
創建於2013-11-09 15:26:01
推送於2024-01-11 02:23:51
最后一次提交2020-07-30 16:47:33
星數10.9k
關注者數521
派生數2.5k
提交數1.4k
已啟用問題?
問題數791
打開的問題數490
拉請求數124
打開的拉請求數27
關閉的拉請求數38
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

openalpr

OpenALPR is an open source Automatic License Plate Recognition library written in C++ with bindings in C#, Java, Node.js, Go, and Python. The library analyzes images and video streams to identify license plates. The output is the text representation of any license plate characters.

Check out a live online demo here: http://www.openalpr.com/demo-image.html

User Guide

OpenALPR includes a command line utility. Simply typing "alpr [image file path]" is enough to get started recognizing license plate images.

For example, the following output is created by analyzing this image:
Plate Image

user@linux:~/openalpr$ alpr ./samplecar.png

plate0: top 10 results -- Processing Time = 58.1879ms.
    - PE3R2X     confidence: 88.9371
    - PE32X      confidence: 78.1385
    - PE3R2      confidence: 77.5444
    - PE3R2Y     confidence: 76.1448
    - P63R2X     confidence: 72.9016
    - FE3R2X     confidence: 72.1147
    - PE32       confidence: 66.7458
    - PE32Y      confidence: 65.3462
    - P632X      confidence: 62.1031
    - P63R2      confidence: 61.5089

Detailed command line usage:

user@linux:~/openalpr$ alpr --help

USAGE: 

   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

Binaries

Pre-compiled Windows binaries can be downloaded on the releases page

Install OpenALPR on Ubuntu 16.04 with the following commands:

sudo apt-get update && sudo apt-get install -y openalpr openalpr-daemon openalpr-utils libopenalpr-dev

Documentation

Detailed documentation is available at doc.openalpr.com

Integrating the Library

OpenALPR is written in C++ and has bindings in C#, Python, Node.js, Go, and Java. Please see this guide for examples showing how to run OpenALPR in your application: http://doc.openalpr.com/bindings.html

Compiling

Build Status

OpenALPR compiles and runs on Linux, Mac OSX and Windows.

OpenALPR requires the following additional libraries:

- Tesseract OCR v3.0.4 (https://github.com/tesseract-ocr/tesseract)
- OpenCV v2.4.8+ (http://opencv.org/)

After cloning this GitHub repository, you should download and extract Tesseract and OpenCV source code into their own directories. Compile both libraries.

Please follow these detailed compilation guides for your respective operating system:

If all went well, there should be an executable named alpr along with libopenalpr-static.a and libopenalpr.so that can be linked into your project.

Docker

# Build docker image
docker build -t openalpr https://github.com/openalpr/openalpr.git
# Download test image
wget http://plates.openalpr.com/h786poj.jpg
# Run alpr on image
docker run -it --rm -v $(pwd):/data:ro openalpr -c eu h786poj.jpg

Questions

Please post questions or comments to the Google group list: https://groups.google.com/forum/#!forum/openalpr

Contributions

Improvements to the OpenALPR library are always welcome. Please review the OpenALPR design description and get started.

Code contributions are not the only way to help out. Do you have a large library of license plate images? If so, please upload your data to the anonymous FTP located at upload.openalpr.com. Do you have time to "tag" plate images in an input image or help in other ways? Please let everyone know by posting a note in the forum.

License

Affero GPLv3
http://www.gnu.org/licenses/agpl-3.0.html

Commercial-friendly licensing available. Contact: info@openalpr.com

去到頂部