CentOS 6.5 EASYPR Environment Building

Source: Internet
Author: User

EASYPR is an open-source Chinese car license plate recognition system, project address.

In the construction process, the main problem is to note the compatibility of the version, which includes: OpenCV version, g++ version and CMake version.

The EASYPR version information I used is as follows:

commit 569E7642C2342A31E4358831597F1BEDF23258BC<[email protected]163.com>  Date:   £ º:+0800       'micooz-master'

The CMake version used is,

[Email protected] easypr]# CMake-3.5. 2 CMake Suite maintained and supported by Kitware (kitware.com/cmake).

The OPENCV version is:

[Email protected] easypr]# ll/usr/opt/opencv-3.0.0 Total480drwxr-xr-x. theRoot root4096June4   -3RDPARTYDRWXR-xr-x.6Root root4096May -  One: -APPSDRWXR-xr-x.2Root root4096May -  A: theBINDRWXR-xr-x.5Root root4096June4   -CMake-rw-r--r--.1Root root165737May -  One: -CMAKECACHE.TXTDRWXR-xr-x.TenRoot root4096May -  A: theCmakefiles-rw-r--r--.1Root root4858May -  One: -Cmake_install.cmake-rw-r--r--.1Root root55335June4   -CMakeLists.txt-rw-r--r--.1Root root1144May -  One: -Cmake_uninstall.cmake-rw-r--r--.1Root root6472May -  One: -Cpackconfig.cmake-rw-r--r--.1Root root6821May -  One: -Cpacksourceconfig.cmake-rw-r--r--.1Root root3710May -  One: -CVCONFIG.HDRWXR-xr-x.8Root root4096May -  One: -DATADRWXR-xr-x.6Root root4096May -  One: -DOCDRWXR-xr-x.5Root root4096May -  One: -include-rw-r--r--.1Root root12909May -  A: theINSTALL_MANIFEST.TXTDRWXR-xr-x.2Root root4096May - Ten: AboutJUNKDRWXR-xr-x.2Root root4096May -  A: -Lib-rw-r--r--.1Root root2224June4   -LICENSE-rw-r--r--.1Root root101350May -  One: -MAKEFILEDRWXR-xr-x. -Root root4096May -  One: -MODULESDRWXR-xr-x.2Root root4096May -  One: -Opencv2-rw-r--r--.1Root root16391May -  One: -Opencvconfig.cmake-rw-r--r--.1Root root376May -  One: -opencvconfig-Version.cmake-rw-r--r--.1Root root11454May -  One: -OPENCVMODULES.CMAKEDRWXR-xr-x.8Root root4096June4   -Platforms-rw-r--r--.1Root root636June4   -README.MDDRWXR-xr-x. -Root root4096June4   -SAMPLESDRWXR-xr-x.2Root root4096May -  One: -unix-Install-rw-r--r--.1Root root6961May -  One: -Version_string.tmp

The g++ version is:

[Email protected] easypr]# g++--versiong4.8. 2 20140120 4.8. 2-free for  copying conditions.     for merchantability or FITNESS for A particular PURPOSE.

Two. Version-related issues

2.1 GCC version issue

On CentOS 6.5, the GCC version is

GCC -versiongcc4.4. 7 20120313 4.4. 7- free for copying conditions.    for merchantability or FITNESS for A particular PURPOSE.

This version does not fully support the C++11 standard, so it needs to be upgraded, using the following command:

wget http://people.centos.org/tru/devtools-2/devtools-2.repo-o/etc/yum.repos.d/ Devtools-2.reposudoyuminstall devtoolset-2-gcc devtoolset-  2-binutils devtoolset-2-gcc-c++

After executing these two commands, there will be a new version of GCC 4.8.2 in the/OPT/RH directory, this time the system's GCC is still the old version, need to replace the system's GCC, first of all, the old version of the/usr/bin to back up the GCC,

Then use the Ln–s command for symbolic links (such as gcc:ln–s/opt/rh/devtoolset-2/root/usr/bin/gcc/usr/bin/gcc , others, etc.)

lrwxrwxrwx.1Root rootPanax NotoginsengMay -  -: ,/usr/bin/c++-/opt/rh/devtoolset-2/root/usr/bin/c++lrwxrwxrwx.1Root rootPanax NotoginsengMay -  -: the/usr/bin/CPP/opt/rh/devtoolset-2/root/usr/bin/CPPlrwxrwxrwx.1Root rootPanax NotoginsengMay -  -: -/usr/bin/GCC/opt/rh/devtoolset-2/root/usr/bin/GCC

For ease of use,/etc/profile also made the following modifications:

Export cc=/opt/rh/devtoolset-2/root/usr/bin/gcc  export CPP=/opt/rh/devtoolset- 2/root/usr/bin/cppexport CXX=/opt/rh/devtoolset-2/root/usr/bin/c++

2.2 CMake Version Issue

Similarly, the CMake version on CentOS 6.5 is too old to be used directly to compile easypr and needs to be updated.

To the official website of Camke to download, address . This is a script that, after downloading, executes directly on the line and then adds it to the/etc/profile as follows:

export path= $PATH:/data/zjc/soft_bk/cmake-3.5.2-linux-x86_64/bin

2.3 OpenCV Version Issue

Opecv I was using the 3.0.0 version because I saw the following link:

https://github.com/liuruoze/EasyPR/issues/102

From the official website down Opencv3.0.0.zip file, you need to compile, install opencv3.0.0, the specific method is:

Switch to the opencv3.0.0 directory, perform the CMake CMakeLists.txt, and then perform the make–j && make install. Installation is complete.

In the process of make, there may be cases where the ippicv_linux_20141027.tar.gz MD5 value is inconsistent

opencv-3.0. 0/3rdparty/ippicv/downloads/linux-8b449a536a2157bcad08a2b9f266828b/ippicv_linux_20141027.tgz]      expected hash: [8b449a536a2157bcad08a2b9f266828b]        actual hash: [0103b909e19ca9c6497a7ae696c16480]

This time, you can directly Baidu, the package download down, and then put in the downloads path is OK.

Three. Compilation of EASYPR

The build.sh file provided by EASYPR itself cannot be used directly and needs to be compiled manually.

First, modify the CmakeLists.txt

pwd/data/zjc/cvs/easypr[[email protected] easypr]# emacs CMakeLists.txt

Then, delete the_build and cmakefiles two folders under the/data/zjc/cvs/easypr Path (RM–FR)

Then execute, cmake CmakeLists.txt

Then execute, make–j 12

Finally, a demo file is generated in the upper-level directory of EASYPR, note that the demo file is not generated in the EASYPR directory, and then the demo file is copied to the EASYPR path, and the test command is as follows:

./demo recognize -p resources/image/plate_recognize.jpg --svm resources/model/svm.xml --ann resources/model/ann.xml

CentOS 6.5 EASYPR Environment Building

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.