CentOS 6.5 EasyPR环境搭建
EasyPR是一款开源的中文车牌识别系统,项目地址。
在搭建的过程中,主要的问题是注意版本的兼容性,这里面的版本包括:opencv版本,g++版本以及cmake版本。
我使用的EasyPr版本信息如下:
commit 569e7642c2342a31e4358831597f1bedf23258bc
Merge: b88966b eb54c4c
Author: liuruoze <liuruoze@163.com>
Date: Thu Jan 14 21:59:19 2016 +0800 Merge branch 'micooz-master'
使用的Cmake版本为,
[root@localhost EasyPR]# cmake --version
cmake version 3.5.2 CMake suite maintained and supported by Kitware (kitware.com/cmake).
opencv的版本为:
[root@localhost EasyPR]# ll /usr/opt/opencv-3.0.0
total 480
drwxr-xr-x. 15 root root 4096 Jun 4 2015 3rdparty
drwxr-xr-x. 6 root root 4096 May 24 11:16 apps
drwxr-xr-x. 2 root root 4096 May 24 12:39 bin
drwxr-xr-x. 5 root root 4096 Jun 4 2015 cmake
-rw-r--r--. 1 root root 165737 May 24 11:16 CMakeCache.txt
drwxr-xr-x. 10 root root 4096 May 24 12:39 CMakeFiles
-rw-r--r--. 1 root root 4858 May 24 11:16 cmake_install.cmake
-rw-r--r--. 1 root root 55335 Jun 4 2015 CMakeLists.txt
-rw-r--r--. 1 root root 1144 May 24 11:16 cmake_uninstall.cmake
-rw-r--r--. 1 root root 6472 May 24 11:16 CPackConfig.cmake
-rw-r--r--. 1 root root 6821 May 24 11:16 CPackSourceConfig.cmake
-rw-r--r--. 1 root root 3710 May 24 11:16 cvconfig.h
drwxr-xr-x. 8 root root 4096 May 24 11:16 data
drwxr-xr-x. 6 root root 4096 May 24 11:16 doc
drwxr-xr-x. 5 root root 4096 May 24 11:16 include
-rw-r--r--. 1 root root 12909 May 24 12:39 install_manifest.txt
drwxr-xr-x. 2 root root 4096 May 24 10:56 junk
drwxr-xr-x. 2 root root 4096 May 24 12:38 lib
-rw-r--r--. 1 root root 2224 Jun 4 2015 LICENSE
-rw-r--r--. 1 root root 101350 May 24 11:16 Makefile
drwxr-xr-x. 38 root root 4096 May 24 11:16 modules
drwxr-xr-x. 2 root root 4096 May 24 11:16 opencv2
-rw-r--r--. 1 root root 16391 May 24 11:16 OpenCVConfig.cmake
-rw-r--r--. 1 root root 376 May 24 11:16 OpenCVConfig-version.cmake
-rw-r--r--. 1 root root 11454 May 24 11:16 OpenCVModules.cmake
drwxr-xr-x. 8 root root 4096 Jun 4 2015 platforms
-rw-r--r--. 1 root root 636 Jun 4 2015 README.md
drwxr-xr-x. 13 root root 4096 Jun 4 2015 samples
drwxr-xr-x. 2 root root 4096 May 24 11:16 unix-install
-rw-r--r--. 1 root root 6961 May 24 11:16 version_string.tmp
g++版本为:
[root@localhost EasyPR]# g++ --version
g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
二. 与版本相关的问题
2.1 GCC版本问题
在centos 6.5上,Gcc的版本为
[root@n122 ~]# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
这个版本不能够完整的支持C++11的标准,所以需要对其进行升级,使用如下命令:
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
sudo yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
执行完这两条命令后,会在/opt/rh目录下有GCC 4.8.2的新版本,这个时候系统的gcc仍然是老版本的,需要将系统的gcc进行替换,首先将/usr/bin下老版本的gcc都备份一下,

然后使用ln –s命令进行符号链接(例如gcc: ln –s /opt/rh/devtoolset-2/root/usr/bin/gcc /usr/bin/gcc ,其他以此类推)
lrwxrwxrwx. 1 root root 37 May 24 14:08 /usr/bin/c++ -> /opt/rh/devtoolset-2/root/usr/bin/c++
lrwxrwxrwx. 1 root root 37 May 24 13:34 /usr/bin/cpp -> /opt/rh/devtoolset-2/root/usr/bin/cpp
lrwxrwxrwx. 1 root root 37 May 24 13:33 /usr/bin/gcc -> /opt/rh/devtoolset-2/root/usr/bin/gcc
为了使用的方便,/etc/profile下也做了如下修改:
export CC=/opt/rh/devtoolset-2/root/usr/bin/gcc
export CPP=/opt/rh/devtoolset-2/root/usr/bin/cpp
export CXX=/opt/rh/devtoolset-2/root/usr/bin/c++
2.2 Cmake版本问题
同样centos 6.5上的cmake版本也太过老旧,不能够直接用来编译EasyPR,需要进行更新。
到camke的官网上进行下载,地址。这是一个脚本,下载完后,直接执行就行,然后将其添加到/etc/profile中,如下:
export PATH=$PATH:/data/zjc/soft_bk/cmake-3.5.2-Linux-x86_64/bin
2.3 opencv的版本问题
opecv我是使用3.0.0的版本,因为看到了如下的链接:
https://github.com/liuruoze/EasyPR/issues/102

从官网down下来opencv3.0.0.zip文件后,需要将opencv3.0.0编译、安装好,具体做法是:
切换到opencv3.0.0的目录,执行cmake CMakeLists.txt, 然后执行make –j 12 && make install。 安装完成。
在make的过程中,可能出现,ippicv_linux_20141027.tar.gz md5值不一致的情况
opencv-3.0.0/3rdparty/ippicv/downloads/linux-8b449a536a2157bcad08a2b9f266828b/ippicv_linux_20141027.tgz]
expected hash: [8b449a536a2157bcad08a2b9f266828b]
actual hash: [0103b909e19ca9c6497a7ae696c16480]
这个时候,可以直接百度,将这个包下载下来,然后放到downloads路径下就OK了。
三. EasyPR的编译
EasyPR自身提供的build.sh文件不能够直接使用,需要手动进行编译。
首先,修改CmakeLists.txt
[root@localhost EasyPR]# pwd
/data/zjc/CVS/EasyPR
[root@localhost EasyPR]# emacs CMakeLists.txt

然后,将/data/zjc/CVS/EasyPR路径下的_build和CMakeFiles两个文件夹删掉(rm –fr)

然后执行,cmake CmakeLists.txt
然后执行,make –j 12

最后,在EasyPR的上层目录生成了demo文件,注意,不是在EasyPR目录下生成的demo文件,然后把demo文件拷贝到 EasyPR路径下,进行测试,测试命令如下:
./demo recognize -p resources/image/plate_recognize.jpg --svm resources/model/svm.xml --ann resources/model/ann.xml



CentOS 6.5 EasyPR环境搭建的更多相关文章
- CentOS下Web服务器环境搭建LNMP一键安装包
CentOS下Web服务器环境搭建LNMP一键安装包 时间:2014-09-04 00:50来源:osyunwei.com 作者:osyunwei.com 举报 点击:3797次 最新版本:lnmp- ...
- CentOS上javaweb开发环境搭建
CentOS上javaweb开发环境搭建 安装jdk yum list java* yum install java-1.7.0-openjdk* -y java -version 安装tomcat ...
- Linux学习之CentOS(一)--CentOS6.4环境搭建
Linux学习之CentOS(一)--CentOS6.4环境搭建http://www.cnblogs.com/xiaoluo501395377/archive/2013/03/31/CentOs.ht ...
- centos LNMP第一部分环境搭建 LAMP LNMP安装先后顺序 php安装 安装nginx 编写nginx启动脚本 懒汉模式 mv /usr/php/{p.conf.default,p.conf} php运行方式SAPI介绍 第二十三节课
centos LNMP第一部分环境搭建 LAMP安装先后顺序 LNMP安装先后顺序 php安装 安装nginx 编写nginx启动脚本 懒汉模式 mv /usr/local/php/{ ...
- centos LAMP第一部分-环境搭建 Linux软件删除方式,mysql安装,apache,PHP,apache和php结合,phpinfo页面,ldd命令 第十九节课
centos LAMP第一部分-环境搭建 Linux软件删除方式,mysql安装,apache,PHP,apache和php结合,phpinfo页面,ldd命令 第十九节课 打命令之后可以输入: e ...
- Cacti监控服务器配置教程(基于CentOS+Nginx+MySQL+PHP环境搭建)
Cacti监控服务器配置教程(基于CentOS+Nginx+MySQL+PHP环境搭建) 具体案例:局域网内有两台主机,一台Linux.一台Windows,现在需要配置一台Cacti监控服务器对这两台 ...
- centos 7.3 服务器环境搭建——MySQL 安装和配置
centos 7.3 服务器环境搭建——MySQL 安装和配置服务器信息如下:服务器:阿里云系统 centos 7.3 (阿里云该版本最新系统)mysql版本:5.7.18 (当前时间最新版本)连接服 ...
- centos下的lnmp环境搭建
1.配置centos的第三方yum源,因为原始的yum是无法安装nginx的 wget http://www.atomicorp.com/installers/atomic 下载atomic yum ...
- CentOS下JAVA WEB 环境搭建
首先介绍下我的软件环境.虚拟机Vmware9.0(已经汉化),CentOS6.4(选择安装语言为简体中文),xshell4.0(强大的安全终端模拟软件),xftp4.0(FTP工具). 方便大家环境搭 ...
随机推荐
- SpringMVC上传文件
SpringMVC中上传文件还是比较方便的,Spring内置了一些上传文件的支持类,不需要复杂的操作即可上传文件. 文件上传需要两个jar支持,一个是commons-fileupload.jar和co ...
- 正确理解DTO、值对象和POCO
今天推荐的文章比较技术化也比较简单,但是对于一些初学者而言,可能也是容易搞混的概念:就是如何理解DTO.值对象和POCO之间的区别. 所谓DTO就是数据传输对象(Data Transfer Objec ...
- berkeley db replica机制 - 主从同步
repmgr/repmgr_net.c, __repmgr_send(): 做send_broadcast, 然后根据policy 对DB_REP_PERMANENT的处理 __repmgr_send ...
- AngularJS-Controller的使用-读书笔记
最近在读<Angular JS权威教程>读到第9页,按着示例做,居然报错,说MyController undefined,初学者不懂啊,找了个官方的文档,按着改了一下,貌似成功了,有需要的 ...
- Eclipse 创建Maven项目的问题:a pom xml file already exists in the destination folder
创建过一个Maven项目,删除的时候只在Eclipse中删除了,但是磁盘上的这个项目没有删除,所以报错 方法:重新创建一个不同名称的Maven项目,右键项目,选择Properties,看你的项目目录( ...
- 从0开始学Swift笔记整理(五)
这是跟在上一篇博文后续内容: --Core Foundation框架 Core Foundation框架是苹果公司提供一套概念来源于Foundation框架,编程接口面向C语言风格的API.虽然在Sw ...
- Mac上远程桌面连接Windows Server 2012 R2
在将一台服务器的操作系统由Windows Server 2012升级为Windows Server 2012 R2之后,在Mac电脑上用微软的远程桌面软件怎么也连不上服务器,错误信息如下: Remot ...
- SQL Server转发记录指针的坏味道
什么是转发记录指针? 转发记录指针是堆表中特有的数据存储机制. 当你修改了某个数据页中的一行时,如果该行所在的数据页已经无法存放其修改后的行, SQL Server会把这行数据移动到一个新的数据页上面 ...
- 安卓-PC-Arduino3方通信实现
请仔细理解相关参数,如端口设置.IP设置.COM口设置......等等.....不要盲目COPY.....这涉及手机.电脑和一个单片机,其中一台电脑作为服务器并与单片机相连,负责通过网络与客户端通信( ...
- [stm32] 中断
#include "stm32f10x.h" #include "stm32f10x_tim.h" #include "misc.h" #i ...