OpenCV

From Wiki
Jump to navigationJump to search


Overview

Instructions for building opencv-2.4.10 with Qt4 under Linux.

Resources

Install opencv 2.4.10

 cd
 wget https://github.com/Itseez/opencv/archive/2.4.zip
 unzip opencv-2.4.zip
 cd opencv-2.4
 mkdir build
 cd build
 cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local  -D WITH_CUBLAS=ON -D WITH_CUFFT=ON -D WITH_EIGEN=ON -D WITH_OPENGL=ON -D WITH_QT=4 -D WITH_TBB=ON -D BUILD_DOCS=ON -D BUILD_EXAMPLES=ON -D BUILD_TESTS=ON ..
 make -j5
 sudo make install
 sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
 sudo ldconfig
 cd /usr/local/share/OpenCV/samples/c
 sudo chmod +x build_all.sh
 sudo ./build_all.sh
 ./facedetect "/usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml" lena.jpg

Install find_object

 cd
 svn checkout http://find-object.googlecode.com/svn/trunk/find_object
 cd Find-Object-0.5.0-Source
 mkdir build
 cd build
 cmake ..
 make -j5
 cd ../bin
 sudo ./find_object --Camera/4imageRate 30 --General/threads 0 --Feature2D/SURF_gpu true --Feature2D/Fast_gpu true --Feature2D/ORB_gpu true