First of all I suggest to create a working directory where extract all the files needed for the installation using these commands:
Then you have to install some dependenciesmkdir OpenCVcd OpenCV
Now you are ready to download and install the latest OpenCv packagesudo apt-get -y remove ffmpeg x264 libx264-devsudo apt-get -y install libopencv-devsudo apt-get -y install build-essential checkinstall cmake pkg-config yasmsudo apt-get -y install libtiff4-dev libjpeg-dev libjasper-devsudo apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-devsudo apt-get -y install python-dev python-numpysudo apt-get -y install libtbb-devsudo apt-get -y install libqt4-dev libgtk2.0-devsudo apt-get -y install libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-devsudo apt-get -y install x264 v4l-utils ffmpegsudo apt-get -y install libgtk2.0-dev
NOTE: Building OpenCv will need some time depending on your hardwarewget -O OpenCV-2.4.9.zip http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/downloadunzip OpenCV-2.4.9.zipcd opencv-2.4.9mkdir buildcmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
cd buildmake -j4sudo make installsudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'sudo ldconfig
Commenti
Posta un commento