SELAMAT DATANG DI COYO BLOG. SEMOGA BERMANFAAT. JANGAN LUPA YA ISI KOMENTAR. MATUR TENGKYU ........ c o y o: opencv 2.3 di lubuntu 11.10

Rabu, 11 Januari 2012

opencv 2.3 di lubuntu 11.10

install opencv2.2 cah gawe nguprek2 TA....
make........
[2%] ERROR......
UASEMMM......
tibak e eror....... wes install opencv2.3 wae....
make.....
[100%] succesfull...

pas compile :
g++ -g -lopencv_core -lopencv_highgui -lopencv_legacy \
-lopencv_objdetect -lopencv_imgproc \
-I/usr/local/include \
-o ../bin/hog_detect main.cpp

ehhhh.... eror....
no such file or directory...

garai hontok2 wae... huh.... opo strukture bedo?????

takon mbah guugle maneng.... " mbah carane compile opencv2.3 nang lubuntu piye mbah???

"iki lho le, tk wenehi ling uakeh.... wes pilihen dewe... " injeh mbah, matur tengkyu... tk pilih seng iki wae mbah, kabehe gk cocok, http://thebitbangtheory.wordpress.com/2011/10/23/how-to-install-opencv-2-3-1-in-ubuntu-11-10-oneiric-ocelot-with-python-support/

eh ternyata cocok, hehehe...... ternyata gk jauh beda sama install opencv 2.2..

1. pertama install dependensinya
$sudo apt-get install build-essential libgtk2.0-dev libjpeg62-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev

2. trus install ffmpeg didapet dari  http://ffmpeg.org/releases/ffmpeg-0.7-rc1.tar.gz

$cd ~
$wget http://ffmpeg.org/releases/ffmpeg-0.7-rc1.tar.gz
$tar -xvzf ffmpeg-0.7-rc1.tar.gz
$cd ffmpeg-0.7-rc1
$./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libxvid --enable-x11grab --enable-swscale --enable-shared
$make
$sudo make install

3. install Opencv2.3 didapatkan dari http://sourceforge.net/projects/opencvlibrary/ trus dieksekusi :D


$mkdir release
$cd release
$cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
$make
$sudo make install

4. edit file .bashrc yang ada di direktori home, /home/coyo/.bashrc dan tambahkan baris ini ke baris terakhir
export LD_LIBRARY_PATH=/usr/local/lib

5. edit file /etc/bash.bashrc dan tambahkan baris ini ke baris terakhir
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

6. reboot 

7. biar dapat makek sample dari opencv maka dibuild dulu
$cd /home/coyo/Opencv2.3.1/sample/c/
$chmod +x build_all.sh
$./build_all.sh

untuk perintah compilenya
g++ `pkg-config --cflags opencv` my_code.cpp -o my_code `pkg-config --libs opencv`

Alhamdulillah kenek...... :D !!!

2 komentar:

cah bagoes mengatakan...

2 dino q mumet ga iso2. Alhamdulillah, mari moco iki nggonku yo kenek.
matur nuwun coy....

Nuzul Romadona mengatakan...

Matur nuwun,Coy..setelah aku coba2 dan aku gabungin tutorialnya Mas Jendral..alhamdulillah beres.. :D

Posting Komentar