Ubuntu12.04安裝OpenCV 2.4.1

sudo apt-get update sudo apt-get upgradepython

2.只需在終端裏粘貼一下,很簡單,此步驟安裝的是必備的包文件: sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-devbash

3.下載OpenCV2.4.1源碼包: cd ~ wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.1/OpenCV-2.4.1.tar.bz2 tar -xvf OpenCV-2.4.1.tar.bz2 cd OpenCV-2.4.1ui

4.使用cmake生成makefile文件 mkdir build cd build cmake -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 ...net

5.編譯安裝 make sudo make installunix

6.配置OpenCV sudo gedit /etc/ld.so.conf.d/opencv.conf 打開後輸入/usr/local/lib sudo ldconfig sudo gedit /etc/bash.bashrc 將PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH加在末尾code

7.重啓或註銷一下orm

相關文章
相關標籤/搜索