日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

开源车牌识别项目,OpenALPR

發布時間:2025/3/21 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 开源车牌识别项目,OpenALPR 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

今天在github上看到了一個開源的車牌識別項目,OpenALPR。github鏈接
我以前自己在MATLAB上編寫了一個簡單的車牌識別的程序,使用的是傳統模板匹配法。只是有了初步的效果,還有很多需要完善的。
博文鏈接:數字圖像處理:基于MATLAB的車牌識別項目

簡介

OpenALPR是一種使用C ++編寫的開源自動車牌識別庫,還能支持:
C#,Java,Node.js,Go和Python。
該庫可以分析圖像和視頻流以識別車牌。
輸出的結果是車牌上的字符。

環境配置

OpenALPR需要這些依賴的庫:

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

1、安裝一些相關的庫。

# Install prerequisites sudo apt-get install libopencv-dev libtesseract-dev git cmake build-essential libleptonica-dev sudo apt-get install liblog4cplus-dev libcurl3-dev# If using the daemon, install beanstalkd sudo apt-get install beanstalkd

2、到github上下載源碼。

git clone https://github.com/openalpr/openalpr.git

3、編譯源碼并安裝。

# Setup the build directory cd openalpr/src mkdir build cd build# setup the compile environment cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc ..# compile the library make# Install the binaries/libraries to your local system (prefix is /usr) sudo make install

這里給出了有三種安裝方法:Compilation instructions (Ubuntu Linux)

測試

alpr支持命令行,直接在命令行輸入alpr [圖片文件路徑]即可。

下載幾幅圖片:

wget http://plates.openalpr.com/ea7the.jpg wget http://plates.openalpr.com/h786poj.jpg

識別車牌:

輸入指令:

alpr -c us ea7the.jpg

識別結果:

輸入指令:

alpr -c eu h786poj.jpg

識別結果:

這里兩幅圖片的車牌是不同國家的,一個是美國的,一個是歐洲的,-c 表示選擇車牌的國家,默認選擇美國的。

alpr指令說明:
輸入alpr --help查看指令說明:

xhb@xhb-GL552JX:~/Study/OpenALPR/pic$ alpr --helpUSAGE: alpr [-c <country_code>] [--config <config_file>] [-n <topN>] [--seek<integer_ms>] [-p <pattern code>] [--motion] [--clock] [-d][--debug] [-j] [--] [--version] [-h] <> ...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., mdfor Maryland, ca for California)--motionUse motion detection on video file or stream. Default=off--clockMeasure/print the total time to process image and all plates. Default=off-d, --detect_regionAttempt to detect the region of the plate image. [Experimental] Default=off--debugEnable debug output. Default=off-j, --jsonOutput recognition results in JSON format. Default=off--, --ignore_restIgnores the rest of the labeled arguments following this flag.--versionDisplays version information and exits.-h, --helpDisplays usage information and exits.<> (accepted multiple times)(required) Image containing license platesOpenAlpr Command Line Utility

接下來可以愉快地玩耍了,可以去閱讀源碼或是制作各種應用。
︿( ̄︶ ̄)︿

總結

以上是生活随笔為你收集整理的开源车牌识别项目,OpenALPR的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。