Skip to content

Custom install opencv on centos

Install cmake and Dependent libraries

sudo yum install cmake gcc gcc-c++ gtk+-devel gimp-devel \
gimp-devel-tools gimp-help-browser zlib-devel libtiff-devel \
libjpeg-devel libpng-devel gstreamer-devel libavc1394-devel \
libraw1394-devel libdc1394-devel jasper-devel jasper-utils swig \
python libtool nasm ant python -y
sudo yum groupinstall "Development Tools" -y

Download source package

DOWNLOADS

Uncompress & build soft

unzip opencv-2.4.13.zip
cd opencv-2.4.13
mkdir build
cd build/
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/opt/soft/opencv -DBUILD_TESTS=OFF ..
make -j8            # -j option means use n(number) thread make.
make install

Last config env

vim  /etc/ld.so.conf.d/opencv.conf
/opt/soft/opencv/lib
ldconfig

 

Published in其它

Be First to Comment

发表评论

电子邮件地址不会被公开。 必填项已用*标注