openCV1.0を入れる(ソースから)
環境はdebian - sarge
参考URL
http://www.imlab.sie.dendai.ac.jp/wiki/index.php?OpenCV%A4%CE%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB
ソースのダウンロード
http://sourceforge.net/projects/opencvlibrary/
wget <ソース>
tar xvzf <ダウンロードしてきたソース>
ライブラリを探す
apt-cache search libjpeg
apt-cache search libtiff
apt-cache search libpng
ライブラリのインストール
sudo apt-get install libjpeg62
sudo apt-get install libjpeg62-dev
sudo apt-get install libtiff4 libtiff4-dev
sudo apt-get install libpng3 libpng3-dev
# sudo apt-get install libgtk2.0-0 libgtk2.0-dev
# sudo apt-get install ffmpeg
cd opencv-1.0.0$
./configure
echo: write error: No space left on device
( `酈´)ムキー
ディスク容量を確保して再チャレンジ
configure: error: You have to install pkg-config to compile OpenCV with GTK+
( `酈´)ムキー
助けてapt先生!
apt-cache search pkg-config
libextutils-pkgconfig-perl - simplistic perl interface to pkg-config
libgift-dev - helper library for various giFT components [development files]
pkg-config - manage compile and link flags for libraries
xserver-xorg-dev - X.Org X server -- development files
debian:/tmp/opencv-1.0.0$ sudo apt-get install pkg-config
も一度再チャレンジ
./configure
こんなんでた
config.status: executing depfiles commands
General configuration ================================================
Compiler: g++
CXXFLAGS: -Wall -fno-rtti -pipe -O3 -g -march=i686 -ffast-math -fomit-frame-pointerInstall path: /usr/local
HighGUI configuration ================================================
Windowing system --------------
Use Carbon / Mac OS X: no
Use gtk+ 2.x: no
Use gthread: noImage I/O ---------------------
Use libjpeg: yes
Use zlib: yes
Use libpng: yes
Use libtiff: yes
Use libjasper: no
Use libIlmImf: noVideo I/O ---------------------
Use QuickTime / Mac OS X: no
Use xine: no
Use ffmpeg: no
Use dc1394 & raw1394: no
Use v4l: yes
Use v4l2: yesWrappers for other languages =========================================
SWIG
Python noAdditional build settings ============================================
Build demo apps yesNow run make ...
make
設定の編集
sudo vim /etc/profile
この行を追加:export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
sudo vim /etc/ld.so.conf
この行を追加:/usr/local/lib