Pages

Subscribe:

Labels

Minggu, 30 Desember 2012

OpenCV 2.3 dengan C++ Visual studio 2010

Pada pembahasan ini, aku mau share pengalaman menggunakan library OpenCV 2.3 di C++ Visual studio 2010. OpenCV itu merupakan sebuah library yang berisi fungsi-fungsi untuk pengolahan citra (image processing). sebenarnya masih banyak sih tools buat pengolahan citra yang lain. tapi karena tugas akhir ku menggunakan OpenCV jadi aku pilih library yang satu ini.

At this topic, I want to share about my experience using OpenCV 2.3 library with visual studio 2010 environment. OpenCV is a library that contain of image processing functions. Actually there are many tools in image processing activity. I choose OpenCV library because I have used this library on my thesis.

oke langsung aja ya....
download dulu

Ok, here we go...
you can download OpenCV library by click link below

 OpenCV-2.3.0-win-superpack.exe

kemudian execute dan extract semua file ke folder dengan nama OpenCV2.3. untuk lokasi extractnya sebenarnya bebas sih, namun dalam hal ini aku menggunakan lokasi ini C:\Program Files\OpenCV2.3. 
Buka visual studio, kemudian new project-->visual C++-->Win32 Console Application . setelah itu new window akan muncul, klik tab Application Setting dan pastikan Empty Project telah dicentang. Kemudian klik finish.

After finish download, please execute and extract all of files into folder which is given name OpenCV 2.3 before. the location of this folder is up to you, but my project use C:\Program Files\OpenCV2.3.    
Open visual studio, then go to new project-->visual C++-->Win32 Console Application. after that, a new window will appear, click application setting tab and make sure Empty project box has been checked. and then click finish.



Selanjutnya masuk ke project properties (ALT+F7). dan window baru akan muncul. lakukan beberapa langkah seperti berikut :

-- Pada kotak Configuration pilih All Configuration.
-- Buka Configuration Properties > C/C++ > General, dan tambahkan 3 buah path dibawah ini (untuk header file)  kedalam Additional Include. 

C:\OpenCV2.3\build\include\opencv
C:\OpenCV2.3\build\include\opencv2
C:\OpenCV2.3\build\include

Untuk lokasi diatas disesuaikan dengan lokasi yang temen-temen buat.

Go to the project properties (ALT+F7). then a new window will appear. please follow the steps below :

--On Configuration box, choose All configuration.
--Open Configuration Properties > C/C++ > General, please add 3 path below into additional include  

C:\OpenCV2.3\build\include\opencv
C:\OpenCV2.3\build\include\opencv2
C:\OpenCV2.3\build\include

 





 -- Selanjutnya, masukan path dari libraries pada Configuration Properties > Linker > General
dan pada Additional Library Directories tambahkan lokasi tempat folder "lib" berada.

C:\OpenCV2.3\build\x86\vc9\lib

--go to  Configuration Properties > Linker > General, Pleas add the location of folder "lib" on Additional Library Directories.

C:\OpenCV2.3\build\x86\vc9\lib


 
-- Dan Terakhir ialah memasukan libraries opencv_core230.lib dan opencv_highgui230.lib ke Configuration Properties > Linker > Input :

-- And the last is go to  Configuration Properties > Linker > Input, please add opencv_core230.lib and opencv_highgui230.lib


untuk aplikasi yang lebih komplek dimungkinkan untuk menggunakan libraries yang lebih dari yang dicontohkan diatas.

It is probably using many more libraries for more complex application.


sumber : http://stackoverflow.com/questions/7011238/opencv-2-3-c-visual-studio-2010



0 komentar:

Posting Komentar