搭建环境
VWware Workstation Pro12
CentOS6.5
opencv-3.1.0
1.安装依赖包
yum install cmake gcc gcc-c++ gtk+-devel gimp-develgimp-devel-tools gimp-help-browser zlib-devel libtiff-devel libjpeg-devellibpng-devel gstreamer-devel libavc1394-devel libraw1394-devel libdc1394-develjasper-devel jasper-utils swig python libtool nasm
2.安装opencv
下载opencv,解压,然后运行
cmake CMakeLists.txt
make
make install
3.配置环境
cd /etc/ld.so.conf.d/
vim opencv.conf
ldconfig
4.测试
cd /home/kinghero/Downloads/opencv-3.1.0/samples/cpp
gcc -I/usr/local/include/opencv -L/usr/local/lib/ -lopencv_highgui -lstdc++ drawing.cpp -o drawing
. /drawing
参考资料
http://www.linuxidc.com/Linux/2015-02/112942.htm