openalpr的训练与测试

86 篇文章 2 订阅
40 篇文章 1 订阅

训练: 

git clone https://github.com/openalpr/train-detector.git

1、 opencv

安装cmake及一些依赖库

sudo apt-get install cmake
sudo apt-get install build-essential libgtk2.0-dev libavcodec-dev 
libavformat-dev libjpeg.dev libtiff4.dev libswscale-dev libjasper-dev

  2、安装OpenCV

    从官网下载opencv并解压,cd命令进入opencv的目录

cmake .
sudo make
sudo makeinstall

sudo updatedb #更新database

Once you are ready to start training, enter the following commands:

  • rm ./out/* (clear the out folder in case it has data from previous runs)
  • ./prep.py neg
  • ./prep.py pos
  • ./prep.py train
  • Copy the output from the above command onto the command line. You should adjust the numStages to a smaller value (usually 12 stages works well, but it will depend on your input images). You may also need to adjust the numPos value to a smaller number in order to complete the training.

Copy the out/cascade.xml file to your OpenALPR runtime directory (runtime_data/region/[countrycode].xml). You should now be able to use the region for plate detection.

进入openalpr/openalpr

# 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

# Clone the latest code from GitHub
git clone https://github.com/openalpr/openalpr.git

# 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

# Test the library
wget http://plates.openalpr.com/h786poj.jpg -O lp.jpg
alpr lp.jpg

http://blog.csdn.net/lanbing510/article/details/41698517


 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值