install opencv3 on centos - wanghaisheng/awesome-ocr GitHub Wiki

https://github.com/yingkai-liao/awsdf-game-testing/blob/91b0a0c330c91496064f032aaafcdc63734669de/README.md


Dependencies
=======================================

- Java JDK 7 or newer
- Apache Maven
- OpenCV 3.0.0 (compiled java libs can be found at project_root/opencv-3.0.0)

Build OpenCV Libraries (if want/need)
=======================================

To build OpenCV3.0.0 on CentOS7:

Install Dependencies:

yum groupinstall "Development Tools" yum install epel-release yum install cmake yum install java-1.7.0-openjdk-devel.x86_64 yum install maven yum install ant

Build OpenCV:  

wget https://github.com/Itseez/opencv/archive/3.1.0.zip unzip 3.1.0.zip cd opencv-3.1.0 mkdir build cd build cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_PRECOMPILED_HEADERS=OFF .. make sudo make install

After make install done, check tow points:

Cat /etc/profile

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH


then run command

[wanghs@db2 mxnet]$ pkg-config --libs opencv -L/usr/local/lib -lopencv_calib3d -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_video -lopencv_videoio -lopencv_videostab