openalpr编译

前提已安装opencv,默认安装目录,资源存放目录/usr/local/src,for mark

资源版本:

opencv3.3.0;log4cplus2.0;tesseract 4.00.00;leptonica-1.74.4;openalpr2.3。

资源网站:

https://github.com/opencv

https://sourceforge.net/projects/log4cplus/files/log4cplus-stable/2.0.0/
https://github.com/tesseract-ocr/tesseract
http://www.leptonica.org/
https://github.com/openalpr/openalpr
1.编译log4cplus新版1.2-3.1以后,不要从网页clone,缺少头文件
./configure CXXFLAGS="-std=c++0x"
make
make install
2.安装依赖库
sudo apt-get install g++ # or clang++ (presumably)
sudo apt-get install autoconf automake libtool
sudo apt-get install autoconf-archive
sudo apt-get install pkg-config
sudo apt-get install libpng-dev
sudo apt-get install libjpeg8-dev
sudo apt-get install libtiff5-dev
sudo apt-get install zlib1g-dev
//训练
sudo apt-get install libicu-dev
sudo apt-get install libpango1.0-dev
sudo apt-get install libcairo2-dev
3.编译安装leptonica需要前面那些库安装完整,否则后面问题一堆
./configure --prefix=/usr/local
make
make install
4.编译安装tesseract
//修改ccutil/unichar.h 增加using std::string;
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
5.编译安装openalpr
gedit CMakeLists.txt &
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
SET(OpenCV_DIR "/usr/local/lib")
SET(Tesseract_DIR "/usr/local/src/tesseract-ocr")
cmake ./
//修改alprd.dir buid.make alprd: /usr/local/lib/liblog4cplus.so
make
make install
6.copy tessdata字体集到$TESSDATA_PREFIX(/usr/local/share/)


7.验证tesseract
root@ubuntu:/work/OCR/photo# tesseract -v
tesseract 4.00.00alpha
 leptonica-1.74.4
  libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.8
 Found AVX2
 Found AVX
 Found SSE

8.验证alpr
root@ubuntu:/work/OCR/photo# alpr --version
alpr  version: 2.3.0


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值