Install OpenCV dengan CodeBlocks pada Windows
07.24
cah bagoes
, Posted in
CodeBlocks
,
image processing
,
install
,
OpenCV
,
Windows
,
0 Comments
OpenCV merupakan library yang digunakan untuk pengolahan citra (image processing). Untuk dapat menjalankannya ada beberapa yang perlu dimiliki :
- OpenCV
- IDE (Integrated Development Environment)
merupakan program komputer yang memiliki beberapa fasilitas dalam pembangunan perangkat lunak.Ada bebrapa macam IDE yang dapat digunakan untuk pengolahan citra dengan OpenCV
antara lain : Microsoft Visual C++, Eclipse, CodeBlocks, MATHLAB.
Kalau aku bandingkan, aku cenderung suka pake CodeBlocks, alasannya
- OpenSource (alias gratis tis tis)
- Mendukung beberapa jenis pemrograman seperti C, Java, AVR
- Terasa lebih ringan jalanin program
- Download OpenCV disini
install sampai selesai. - Download Code::Blocks disini
install seperti biasa sampai selesai. - Buka Code::Blocks 10.5
Pilih File -> New -> Project
Pilih Console Application -> Go - Klik Next -> Beri nama project -> Next -> Finish
- Klik Project -> Build Option -> Pilih Search directories
Pada bagian Compiler, klik Add -> brows file -> cari directory "OpenCV2.1/include/opencv"
Yes -> OK
- Pada bagian Linker, klik Add -> brows file -> cari direktory "OpenCV2.1/lib"
Yes -> OK
- Klik bagian Linker Settings, klik Add -> brows file -> menuju pada file library OpenCV
Klik lalu pilih semua (Ctrl+A) -> OK
OK
- Setting debug dan release
Klik Project -> Properties -> Build Targets
Isi Execution working dir sesuai Output filename
#include "iostream"#include "cv.h"#include "highgui.h"using namespace std;int main(){cvNamedWindow( "hello", 1 );IplImage *img = cvCreateImage( cvSize( 640, 480 ), IPL_DEPTH_8U, 1 );CvFont font;double hScale = 1.0;double vScale = 1.0;int lineWidth = 1;cvInitFont( &font, CV_FONT_HERSHEY_SIMPLEX,hScale, vScale, 0, lineWidth );cvPutText( img, "I'm EBIT", cvPoint( 250, 350 ), &font,cvScalar( 255, 255, 0 ) );cvPutText( img, "Hello OpenCV.....!", cvPoint( 200, 400 ), &font,cvScalar( 255, 255, 0 ) );cvShowImage( "hello", img );cvWaitKey();return 0;}
You can leave a response, or trackback from your own site.
0 Response to "Install OpenCV dengan CodeBlocks pada Windows"
:18 :19 :20 :21 :22 :23 :24 :25
:26 :27 :28 :29 :30 :31 :32 :33
:34 :35 :36 :37 :38 :39
Posting Komentar