Fork me on GitHub

3/31/2011

Ubuntu 10.10 下 OpenCV2.2 開發環境建置

0. 安裝 openjdk-6-jdk
1. 在 compile OpenCV 之前需要安裝的 package,以下 command 可以存成 script 執行

apt-get install build-essential
apt-get install cmake
apt-get install pkg-config
apt-get install libpng12-0 libpng12-dev libpng++-dev libpng3
apt-get install libpnglite-dev libpngwriter0-dev libpngwriter0c2
apt-get install zlib1g-dbg zlib1g zlib1g-dev
apt-get install libjasper-dev libjasper-runtime libjasper1
apt-get install pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools
apt-get install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-prog
apt-get install ffmpeg libavcodec-dev libavcodec52 libavformat52 libavformat-dev
apt-get install libgstreamer0.10-0-dbg libgstreamer0.10-0  libgstreamer0.10-dev
apt-get install libxine1-ffmpeg  libxine-dev libxine1-bin
apt-get install libunicap2 libunicap2-dev
apt-get install libdc1394-22-dev libdc1394-22 libdc1394-utils
apt-get install swig
apt-get install libv4l-0 libv4l-dev
apt-get install python-numpy
apt-get install libpython2.6 python-dev python2.6-dev

2. 下載 OpenCV2.2: http://sourceforge.net/projects/opencvlibrary/
3. 解壓縮 opencv source code, 切換到該目錄下,使用 command "cmake ." 建立 Makefile
4. 有 Makefile 之後就可以下 "make" 然後 "make install" 就完成啦!
5. 安裝完以後,header 和 lib 檔案會在 /usr/local/ 路徑之下,謹慎的設定到 eclipse 專案即可!

...

No comments:

Post a Comment