2 Eclipse 2.1 Eclipse 1. Eclipse 2. 3 ( 4) E:Yworkspace OK 3 Eclipse 4 3. Eclipse 5 5 Eclipse Eclipse 2. 7 C 2

Similar documents
1 1. Program 1 OpenCV (OpenCV Sample001) 1 /* 2 - > - > - >VC++ 3 ( ) 4 C:\opencv\build\include 5 ( ) 6 C:\opencv\build\x86\vc10\lib 7 - > - > - > - >

OpenCV IS Report No Report Medical Information System Labratry

5 ISMS 5 4 PC PC USB PDA 2

TA TA TA abcdefgh abcdefgh C PC Wii bluetooth 2.2 Bluetooth USB Princeton PTM-UBT3S 1 1

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * *

untitled


C言語によるアルゴリズムとデータ構造

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡


opencv-linux Linux 1.1pre1 % tar zxvf opencv-1.1pre1.tar.gz % cd opencv %./configure --with-apps % make % su # make install 2.2 Windows Windows

1-4 int a; std::cin >> a; std::cout << "a = " << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >>

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç

オンラインによる 「電子申告・納税等開始(変更等)届出書」 提出方法

導入基礎演習.ppt

Flash Player ローカル設定マネージャー

3.1 stdio.h iostream List.2 using namespace std C printf ( ) %d %f %s %d C++ cout cout List.2 Hello World! cout << float a = 1.2f; int b = 3; cout <<

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

講習案内パンフレット2000.PDF


[1] #include<stdio.h> main() { printf("hello, world."); return 0; } (G1) int long int float ± ±

tuat1.dvi

表1-4.ai

/* sansu1.c */ #include <stdio.h> main() { int a, b, c; /* a, b, c */ a = 200; b = 1300; /* a 200 */ /* b 200 */ c = a + b; /* a b c */ }

Word ›žŠpŁÒ-flO“Z

C

2 2 2 OpenGL Linux Linux Video for Linux(Video4Linux, v4l ) API Video4Linux USB IEEE1394 API Linux Video for Linux 2(Video4Linux2, v4l2 ) OpenCV API U

1 1.1 PC PC PC PC PC workstation PC hardsoft PC PC CPU 1 Gustavb, Wikimedia Commons.

2 2 Gtk+ GUI (widget ) GUI Gtk+ GUI Gtk+ GUI 2.2 Gtk GUI sample1.c Web ( tani/class/mech enshu/) enshu2009gui1.tar.gz

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡

山梨県ホームページ作成ガイドライン

ソフトウェア Capture NX 2 クイックスタートガイド

11042 計算機言語7回目 サポートページ:

θ (t) ω cos θ(t) = ( : θ, θ. ( ) ( ) ( 5) l () θ (t) = ω sin θ(t). ω := g l.. () θ (t) θ (t)θ (t) + ω θ (t) sin θ(t) =. [ ] d dt θ (t) ω cos θ(t

‚æ2›ñ C„¾„ê‡Ìš|

:30 12:00 I. I VI II. III. IV. a d V. VI

FileMaker Pro 8.5 Tutorial

untitled

2004

Plano-POS Ver1

WinHPC ppt

PowerPoint Presentation

FileMaker Pro Tutorial

2 2 2 OpenGL (R,G,B,A) 2.1 OpenGL (x y) width height pixels void glreadpixels(glint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum t

Microsoft PowerPoint _秀英体の取組み素材(予稿集).ppt


alluniv

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

32

void hash1_init(int *array) int i; for (i = 0; i < HASHSIZE; i++) array[i] = EMPTY; /* i EMPTY */ void hash1_insert(int *array, int n) if (n < 0 n >=

Ms用.indd

情報処理概論(第二日目)

r07.dvi

untitled

ohp07.dvi

1.ppt

book

untitled

EndNoteオンライン クイック・レファレンス・ガイド

T554/67K

untitled

untitled

名刺ファイリングOCR ユーザーズガイド

For_Beginners_CAPL.indd

アセンブラ入門(CASL II) 第3版

1

1.4操作マニュアル+ユニット解説

0.3% 10% 4% 0.8% 5% 5% 23% 53%


r08.dvi


18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf("hello World\n"); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o

立ち読みページ

Transcription:

3: 1 1. PC 2. Phantasys 201209 ( 1) 1 PC 2 Windows 3. Windows ID ( 2) 4. Web (Firefox Internet Explorer) 5. A 6. http:// http://www.cv.ics.saitama-u.ac.jp/yosinori/lecture/seminar/ Web 1 7. USB PC USB ( ) 8. Web PC USB ( ) 9. E:Y USB USB 1. 2. USB USB USB 3. Web USB 4. USB Web 1 Not Found 1

2 Eclipse 2.1 Eclipse 1. Eclipse 2. 3 ( 4) E:Yworkspace OK 3 Eclipse 4 3. Eclipse 5 5 Eclipse 2.2 1. 6 Eclipse 2. 7 C 2

6 7 3. 8(a) test Hello World ANSI C MinGW GCC 8(b) (a) (b) 8 3

4. 9 9 2.3 9 2 1. Eclipse 10 test 10 2. Build complete for project test Time consumed: 406 ms. 3. 11!!!Hello World!!! 2 test src test.c 4

11 1. 9 3 1 #include <stdio.h> 2 3 int main(void) { 4 5 printf("hello World!\n"); 6 7 return 0; 8 } Program 1 2. 3. 10 4. Hello World! Eclipse 2.4 Hello World! 4 6 4 3 delete delete 4 5

Program 2 1 #include <stdio.h> 2 3 int main(void) { 4 5 int a, b, c; 6 7 a = 2; 8 b = 3; 9 10 c = a + b; 11 12 printf("total= %d\n", c); 13 14 return 0; 15 } 5 a,b,c 7 a 2 8 b 3 10 a+b(a b ) c c 12 ( %d ) 1 #include <stdio.h> 2 3 int main(void) { 4 5 int c, i; 6 7 c = 0; 8 9 for(i=0;i<10;i++){ 10 c = c + 2; 11 } 12 13 printf("total= %d\n", c); 14 15 return 0; 16 } Program 3 9 for(i=0; i<10; i++) { } i 0 i 1 i 10 5 5 c 0 for 10 c = c + 2; c = c + 2; c 2 c c 0 2 10 20 2.5 1 100 5 20 for(i=0; i<20; i++) i for(i=0; i<10; i++) 9 for(i=0; i<20; i++) 19 for(i=1; i<=10; i++) i 1 i 1 i 10 i 10 6

3 Web 3.1 Web 1. Eclipse 2. 12 12 3. 13 main1.zip 13 4. 14 main1.c 3.2 7

1 #include <stdio.h> 2 #include <cv.h> 3 #include <highgui.h> 4 14 Program 4 5 int main(void) 6 { 7 // cimageresult 8 IplImage *cimageresult = cvcreateimage(cvsize(640,480), IPL_DEPTH_8U, 3); 9 10 // p i c t u r e "sample.jpg" 11 IplImage *picture = cvloadimage("sample.jpg", CV_LOAD_IMAGE_COLOR); 12 13 // p i c t u r e c I m a g e R e s u l t 14 cvresize(picture, cimageresult, CV_INTER_LINEAR); 15 16 // "My Window1" 17 cvnamedwindow ("My Window1", CV_WINDOW_AUTOSIZE); 18 19 cvshowimage("my Window1", cimageresult); // cimageresult "My Window1" 20 21 cvwaitkey (0); // 22 23 cvdestroyallwindows (); // 24 25 return 0; 26 } OpenCV 8 cimageresult 11 picture 11 picture sample.jpg 14 picture cimage 17 19 21 3.3 q 1 #include <stdio.h> 2 #include <cv.h> 3 #include <highgui.h> 4 5 int main(void) 6 { Program 5 8

7 // cimage 8 IplImage *cimage = cvcreateimage(cvsize(640,480), IPL_DEPTH_8U, 3); 9 // gimage 10 IplImage *gimage = cvcreateimage(cvsize(640,480), IPL_DEPTH_8U, 1); 11 12 // "My Window1" " My Window2" 13 cvnamedwindow ("My Window1", CV_WINDOW_AUTOSIZE); 14 cvnamedwindow ("My Window2", CV_WINDOW_AUTOSIZE); 15 16 // 17 CvCapture *capture = cvcreatecameracapture (0); 18 // 19 cvsetcaptureproperty (capture, CV_CAP_PROP_FRAME_WIDTH, 640); 20 cvsetcaptureproperty (capture, CV_CAP_PROP_FRAME_HEIGHT,480); 21 22 // --- --- 23 for(;;){ 24 25 // c I m a g e 26 cimage = cvqueryframe (capture); 27 28 // c I m a g e g I m a g e 29 cvcvtcolor(cimage, gimage, CV_BGR2GRAY); 30 31 cvshowimage("my Window1", cimage); // cimage "My Window1" 32 cvshowimage("my Window2", gimage); // gimage "My Window2" 33 34 if (cvwaitkey (10) == q ) // q 35 break; 36 } 37 // --- --- 38 39 // 40 cvreleasecapture (&capture); 41 42 cvdestroyallwindows (); // 43 44 return 0; 45 } 8 10 13 14 2 17 19 20 22 37 26 cimage 29 1 cvcvtcolor(cimage, gimage, CV_BGR2GRAY); cvcvtcolor cimage gimage CV BGR2GRAY 31 My Window1 cimage 32 My Window2 gimage 3.4 My Window1 s My Window2 My Window3 p q 1 #include <stdio.h> 2 #include <cv.h> 3 #include <highgui.h> 4 5 int main(void) Program 6 9

6 { 7 // image 8 IplImage *image = cvcreateimage(cvsize(640,480), IPL_DEPTH_8U, 3); 9 10 // 11 IplImage *cimageresult = cvcreateimage(cvsize(640,480), IPL_DEPTH_8U, 3); 12 // 13 IplImage *gimagefg = cvcreateimage(cvsize(640,480), IPL_DEPTH_8U, 1); 14 IplImage *gimagebg = cvcreateimage(cvsize(640,480), IPL_DEPTH_8U, 1); 15 IplImage *gimagemask = cvcreateimage(cvsize(640,480), IPL_DEPTH_8U, 1); 16 17 // "My Window1" " My Window2" " My Window3" 18 cvnamedwindow ("My Window1", CV_WINDOW_AUTOSIZE); 19 cvnamedwindow ("My Window2", CV_WINDOW_AUTOSIZE); 20 cvnamedwindow ("My Window3", CV_WINDOW_AUTOSIZE); 21 22 // 23 CvCapture *capture = cvcreatecameracapture (0); 24 // 25 cvsetcaptureproperty (capture, CV_CAP_PROP_FRAME_WIDTH, 640); 26 cvsetcaptureproperty (capture, CV_CAP_PROP_FRAME_HEIGHT,480); 27 28 char inputkey = a ; 29 // --- --- 30 for(;;){ 31 32 // i m a g e 33 image = cvqueryframe (capture); 34 35 // image " My Window1" 36 cvshowimage ("My Window1", image); 37 38 // s 39 if ( s == inputkey){ 40 // i m a g e g I m a g e B G 41 cvcvtcolor(image, gimagebg, CV_BGR2GRAY); 42 // cimagebg " My Window2" 43 cvshowimage ("My Window2", gimagebg); 44 inputkey = a ; 45 } 46 47 // 48 49 // i m a g e g I m a g e F G 50 cvcvtcolor(image, gimagefg, CV_BGR2GRAY); 51 // gimagefg gimagebg gimagemask 52 cvabsdiff(gimagefg, gimagebg, gimagemask); 53 // gimagemask 2 54 cvthreshold(gimagemask, gimagemask, 20, 255, CV_THRESH_BINARY); 55 // c I m a g e R e s u l t 56 cvsetzero(cimageresult); 57 58 // g I m a g e M a s k i m a g e c I m a g e R e s u l t 59 cvcopy(image, cimageresult, gimagemask); 60 // cimageresult " My Window3" 61 cvshowimage ("My Window3", cimageresult); 62 63 // p 64 if ( p == inputkey){ 65 // c I m a g e R e s u l t 66 cvsaveimage("out.jpg", cimageresult); 67 inputkey = a ; 68 } 69 70 inputkey = cvwaitkey (10); 71 if ( q == inputkey) // q 72 break; 73 } 74 // --- --- 75 76 // 77 cvreleasecapture (&capture); 78 79 // 80 cvdestroyallwindows (); 81 82 return 0; 83 } 7 15 18 20 3 23 25 26 29 74 10

33 image 36 My Window1 38 45 s s gimagebg ( ) 49 50 gimagefg gimagefg gimagebg 52 1 cvabsdiff(gimagefg, gimagebg, gimagemask); cvabsdiff gimagefg gimagebg gimagemask 2 cvabsdiff 54 2 1 cvthreshold(gimagemask, gimagemask, 20, 255, CV_THRESH_BINARY); 2 2 OpenCV 0 255 2 2 20 255 255 20 0 2 59 1 cvcopy(image, cimageresult, gimagemask); cvcopy image cimageresult gimagemask 255 56 cvsetzero cimageresult 0 3.5 3.6 15 15 11

4 Word PDF 16 16 PDF 13 00 TA 12

PDF Word PDF 1. 2 3 2. Office Adobe PDF 3. 2012 10 15 C 12TM001 20121015- C-12TM001.pdf 2012 12 3 N 07TK030 20121203- N-07TK030.pdf 4. 5. 6..pdf Word PDF PC Web Web Web 1. Web 2. 3. [seminar2012rep] 3 4. 3 PDF ( ) @mail.saitama-u.ac.jp 13

5. PDF (a) (b).pdf 6. 7. yosinori@cv.ics.saitama-u.ac.jp Web http://www.itc.saitama-u.ac.jp/contents open/activemailmanual.pdf 0 502 Tel:048-858-3585 14