Install and configure OpenCV in CentOS6.0
OpenCV, an open-source image processing project, is undoubtedly an excellent product. It is very magical for professional developers or amateurs. Many tutorials on the Internet are configured under VS2008, and I have never touched any Windows development platform since I broke my hands with VC6.0. This article is the installation and configuration manual of OpenCV under CentOS6.0. Some time ago, instead of a long time ago, I spent N sleepless nights, finally solved all the problems, and finally ran the result for the moment, that mood cannot be described in words. This article describes the process to save some time for new users to build an environment. Okay. You don't have to talk about it.
1. Check the source code of openCV from SVN:
$ Cd ~
$ Mkdir openCV
$ Cd openCV
$ Svn co http://code.opencv.org/svn/opencv/trunk/opencv
Put all the files in the checkout ~ /OpenCV directory
2. Install cmake and cmake-gui
$ Sudo yum install cmake *
Install the latest cmake for the cmake-2.6.4 version.
3. Everything is ready.
$ Cd ~ /OpenCV
$ Mkdir release
$ Cmake-gui ~ /OpenCV
Just select. By default
The Library of opencv will be installed in the/usr/local/lib directory,
The header file is installed in the/usr/local/include/opencv and opencv2 directories,
The help document will be installed in the/usr/local/share/OpenCV/directory,
The sample code is installed in the/usr/local/share/opencv/directory.
$ Cd release
$ Make
$ Make install
So far, the success is achieved.
4. Switch to the root permission in/etc/ld. so. conf. d. Create a new file in the directory named opencv. conf, which contains only one line: "/usr/local/lib", and then run the ldconfig command to make the change take effect.
5. In the last step, test whether the openCV library is available.
$ Cd ~ /OpenCV/samples/cpp
$ Gcc-I/usr/local/include/opencv-L/usr/local/lib/-lopencv_highgui-lstdc ++ drawing. cpp-o drawing
$./Drawing execution successful.
Applaud, hear the robe, play music...
If the video file cannot be played, install ffmpeg first, then reconfigure opencv, and add -- without-quicktime -- with-ffmpeg.
Here we continue to use cmake-gui for configuration, click configure and generate, and finally enter ~ Run make, make install, and ldconfig again in the/openCV/release directory.
-------------------------------------- Split line --------------------------------------
Install the required OpenCV2.4.1 package in Ubuntu Linux
Install OpenCV2.4.2 on Ubuntu 12.04
OpenCV in CentOS cannot read Video Files
Summary of installing OpenCV 2.4.5 in Ubuntu 12.04
Install OpenCv2.1 in Ubuntu 10.04
Face Recognition System Based on QT and OpenCV
Install OpenCV 2.4.9 in Ubuntu 14.04 and 13.10
-------------------------------------- Split line --------------------------------------
OpenCV details: click here
OpenCV: click here