下载 opencv for linux
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.4/OpenCV-2.4.4-beta.tar.bz2?r=http%3A%2F%2Fopencv.org%2F&ts=1361784367&use_mirror=jaist
sudo mkdir /home/q/opencv
把OpenCV-2.4.4-beta.tar.bz2 拷到 /home/q/opencv 下
tar -xvf OpenCV-2.4.4-beta.tar.bz2
cd /home/q/opencv/OpenCv-2.4.4
sudo yum install cmake
sudo yum install gcc-c++
sudo cmake .
sudo make
sudo make install
cd /etc/ld.so.conf.d/
vim opencv.conf
将/usr/local/lib写入文件并保存
sudo /sbin/ldconfig
vi /etc/profile
加入 /usr/local/lib
yum install *gtk+*
./facedetect --cascade="/usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_alt.xml" --scale=1.5 http://img1.qunarzz.com/wugc/p206/201302/18/dea1ee573519ffd193835fbb.jpg_r_625x500x90_e5799539.jpg
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.4/OpenCV-2.4.4-beta.tar.bz2?r=http%3A%2F%2Fopencv.org%2F&ts=1361784367&use_mirror=jaist
sudo mkdir /home/q/opencv
把OpenCV-2.4.4-beta.tar.bz2 拷到 /home/q/opencv 下
tar -xvf OpenCV-2.4.4-beta.tar.bz2
cd /home/q/opencv/OpenCv-2.4.4
sudo yum install cmake
sudo yum install gcc-c++
sudo cmake .
sudo make
sudo make install
cd /etc/ld.so.conf.d/
vim opencv.conf
将/usr/local/lib写入文件并保存
sudo /sbin/ldconfig
vi /etc/profile
加入 /usr/local/lib
yum install *gtk+*
./facedetect --cascade="/usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_alt.xml" --scale=1.5 http://img1.qunarzz.com/wugc/p206/201302/18/dea1ee573519ffd193835fbb.jpg_r_625x500x90_e5799539.jpg