具有 OpenCV 和 FFmpeg 的自动车牌识别库的基础图像
Go to file
Cedric Verstraeten 58cb8b3498 add workflow
2023-04-13 14:22:12 +02:00
.github/workflows add workflow 2023-04-13 14:22:12 +02:00
config Added analysis_threads to default config file 2017-12-01 00:19:03 -06:00
distros Fixed some Lintian issues 2018-05-01 15:56:18 -04:00
doc Show how to add multiple country codes in manpage. 2020-04-06 20:31:47 +10:00
runtime_data Revert "Revert "Added all Brazil patterns"" 2018-09-18 09:51:04 -04:00
src tesseract crash fix 2020-07-23 08:44:23 +02:00
.dockerignore Improve docker support 2015-03-11 11:41:00 +01:00
.gitattributes Added gitattributes. Export ignores certain files 2014-05-11 14:19:47 -05:00
.gitignore Added multi-threaded frame analysis to daemon 2017-11-18 23:09:25 -06:00
.travis.yml Fix travis CI build 2017-12-04 16:24:47 -05:00
cla.txt Updated CLA 2015-08-15 12:13:39 -04:00
CONTRIBUTING.md Using new CLA website 2015-08-15 12:31:41 -04:00
Dockerfile use gocv base image instead 2023-04-13 12:30:51 +02:00
LICENSE Added Affero GPLv3 license 2013-11-09 10:25:48 -06:00
README.md update readme mentioning it's a fork 2023-04-13 09:41:12 +02:00

OpenALPR

This is a fork of the original OpenALPR repository. Within this fork we have added latest FFMpeg and OpenCV build.

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