OpenCV IS Report No Report Medical Information System Labratry

Similar documents
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


28 TCG SURF Card recognition using SURF in TCG play video

21 e-learning Development of Real-time Learner Detection System for e-learning

2 ColorSpace DepthSpace CameraSpace Kinect V2 Kinect V2 BOdyIndex 3. NtKinect Kinect V2 C++ NtKinect [4] NtKinect = Kinect SDK + + STL(C++) + OpenCV +

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

新・明解C言語 実践編

& Vol.5 No (Oct. 2015) TV 1,2,a) , Augmented TV TV AR Augmented Reality 3DCG TV Estimation of TV Screen Position and Ro

新版明解C言語 実践編


ActionScript Flash Player 8 ActionScript3.0 ActionScript Flash Video ActionScript.swf swf FlashPlayer AVM(Actionscript Virtual Machine) Windows

™¼fi⁄CTPŠp

™¼fi⁄10„”Šp


™¼fi⁄CTPŠp

™¼fi⁄PDFŠp

スライド 1

,,,,,,,,,,,,,,,,,,, 976%, i

258 5) GPS 1 GPS 6) GPS DP 7) 8) 10) GPS GPS ) GPS Global Positioning System

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

1.3 ( ) ( ) C

SICE東北支部研究集会資料(2013年)

1 Table 1: Identification by color of voxel Voxel Mode of expression Nothing Other 1 Orange 2 Blue 3 Yellow 4 SSL Humanoid SSL-Vision 3 3 [, 21] 8 325

の 3 つのファイルに #include <functional> を加える 場所は以下の通り diff --git a/modules/calib3d/test/test_affine3d_estimator.cpp b/modules/calib3d/test/test_affine3d_est

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

Input image Initialize variables Loop for period of oscillation Update height map Make shade image Change property of image Output image Change time L

For_Beginners_CAPL.indd

1 Fig. 1 Extraction of motion,.,,, 4,,, 3., 1, 2. 2.,. CHLAC,. 2.1,. (256 ).,., CHLAC. CHLAC, HLAC. 2.3 (HLAC ) r,.,. HLAC. N. 2 HLAC Fig. 2

,,.,.,,.,.,.,.,,.,..,,,, i

r07.dvi

ohp07.dvi

Informatics 2014

2.2 6).,.,.,. Yang, 7).,,.,,. 2.3 SIFT SIFT (Scale-Invariant Feature Transform) 8).,. SIFT,,. SIFT, Mean-Shift 9)., SIFT,., SIFT,. 3.,.,,,,,.,,,., 1,

Condition DAQ condition condition 2 3 XML key value

tuat1.dvi

SystemC 2.0を用いた簡易CPUバスモデルの設計

情報処理学会研究報告 IPSJ SIG Technical Report Vol.2017-CG-166 No /3/ HUNTEXHUNTER1 NARUTO44 Dr.SLUMP1,,, Jito Hiroki Satoru MORITA The

1 CUI CUI CUI 1.1 cout cin redirect.cpp #i n c l u d e <s t r i n g > 3 using namespace std ; 5 6 i n t main ( void ) 7 { 8 s t r i n g s ; 10 c

2017 (413812)

GPGPU

1 1.1 (JCPRG) 30 Nuclear Reaction Data File (NRDF) PC GSYS2.4 JCPRG GSYS2.4 Java Windows, Linux, Max OS X, FreeBSD GUI PNG, GIF, JPEG X Y GSYS2

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

2) TA Hercules CAA 5 [6], [7] CAA BOSS [8] 2. C II C. ( 1 ) C. ( 2 ). ( 3 ) 100. ( 4 ) () HTML NFS Hercules ( )

listings-ext

Abstract Kinect for Windows RGB Kinect for Windows v Kinect for Windows v2

画像ファイルを扱う これまでに学んだ条件分岐, 繰り返し, 配列, ファイル入出力を使って, 画像を扱うプログラムにチャレンジしてみよう

: Shift-Return evaluate 2.3 Sage? Shift-Return abs 2 abs? 2: abs 3: fac

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

Microsoft Word - C.....u.K...doc

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

Informatics 2015

1 Web [2] Web [3] [4] [5], [6] [7] [8] S.W. [9] 3. MeetingShelf Web MeetingShelf MeetingShelf (1) (2) (3) (4) (5) Web MeetingShelf

1 3DCG [2] 3DCG CG 3DCG [3] 3DCG 3 3 API 2 3DCG 3 (1) Saito [4] (a) 1920x1080 (b) 1280x720 (c) 640x360 (d) 320x G-Buffer Decaudin[5] G-Buffer D

IPSJ SIG Technical Report Vol.2009-CVIM-167 No /6/10 Real AdaBoost HOG 1 1 1, 2 1 Real AdaBoost HOG HOG Real AdaBoost HOG A Method for Reducing

main

P05.ppt

1 (PCA) 3 2 P.Viola 2) Viola AdaBoost 1 Viola OpenCV 3) Web OpenCV T.L.Berg PCA kpca LDA k-means 4) Berg 95% Berg Web k-means k-means

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

グラフ数値読み取りシステム (GSYS2.4) 利用の手引

Microsoft PowerPoint - CV03.ppt [互換モード]


新版 明解C++入門編

(1/2) 2/45 HPC top runner application programmer PC-9801F N88-BASIC Quick BASIC + DOS ( ) BCB Windows Percolation, Event-driven MD ActionScript Flash

ex14.dvi

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l

PowerPoint プレゼンテーション - 物理学情報処理演習

VRSJ-SIG-MR_okada_79dce8c8.pdf

(3.6 ) (4.6 ) 2. [3], [6], [12] [7] [2], [5], [11] [14] [9] [8] [10] (1) Voodoo 3 : 3 Voodoo[1] 3 ( 3D ) (2) : Voodoo 3D (3) : 3D (Welc

programmingII2019-v01

ex01.dvi

Abstract Bitcoin P2P (Pear To Pear)

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

Python C/C++ IPMU IRAF

Table 1 Table 2

: CR (0x0d) LF (0x0a) line separator CR Mac LF UNIX CR+LF MS-DOS WINDOWS Japan Advanced Institute of Science and Technology

¥Ñ¥Ã¥±¡¼¥¸ Rhpc ¤Î¾õ¶·

2). 3) 4) 1.2 NICTNICT DCRA Dihedral Corner Reflector micro-arraysdcra DCRA DCRA DCRA 3D DCRA PC USB PC PC ON / OFF Velleman K8055 K8055 K8055

Sobel Canny i

r03.dvi

Python Speed Learning

Java (5) 1 Lesson 3: x 2 +4x +5 f(x) =x 2 +4x +5 x f(10) x Java , 3.0,..., 10.0, 1.0, 2.0,... flow rate (m**3/s) "flow

ohp03.dvi

Quartus II ハンドブック Volume 5、セクションIV. マルチプロセッサの調整

untitled

2

IPSJ SIG Technical Report Vol.2012-IS-119 No /3/ Web A Multi-story e-picture Book with the Degree-of-interest Extraction Function

2 Fig D human model. 1 Fig. 1 The flow of proposed method )9)10) 2.2 3)4)7) 5)11)12)13)14) TOF 1 3 TOF 3 2 c 2011 Information

SystemC言語概論

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1


xx/xx Vol. Jxx A No. xx 1 Fig. 1 PAL(Panoramic Annular Lens) PAL(Panoramic Annular Lens) PAL (2) PAL PAL 2 PAL 3 2 PAL 1 PAL 3 PAL PAL 2. 1 PAL

Arduino UNO IS Report No. Report Medical Information System Laboratory

2008chom.pdf

IPSJ SIG Technical Report iphone iphone,,., OpenGl ES 2.0 GLSL(OpenGL Shading Language), iphone GPGPU(General-Purpose Computing on Graphics Proc

ex12.dvi

解きながら学ぶC++入門編

slide5.pptx

,,,,., C Java,,.,,.,., ,,.,, i

JavaScript の使い方

Transcription:

OpenCV 2014 8 25 IS Report No. 2014090201 Report Medical Information System Labratry

Abstract OpenCV OpenCV

1............................ 2 1.1 OpenCV.......................... 2 1.2...................... 2 2......................... 3 3............................ 5 3.1.......................... 5 3.2.......................... 5 3.3........................... 5 3.4........................... 6 3.4.1....................... 7 3.4.2...................... 7 3.5......................... 9 3.6 ( ).......................... 9 3.7............................. 11

1 1.1 OpenCV OpenCV Intel C C++ Python Java Windows Linux BSD (OSS) C++ OpenCV GUI( ( ) ) 4 imgproc( ) highgui( ) objdetect( ) core( ) 1.2 0 2 (pixel) 0 255 0 255 3 0 255 3 R( )G( )B( ) (255, 0, 0) (0, 0, 255) (255, 255, 255) RGB 4 1) 2

2 while 1 #include "opencv2/objdetect/objdetect.hpp" 2 #include "opencv2/highgui/highgui.hpp" 3 #include "opencv2/imgproc/imgproc.hpp" 4 #include "opencv2/core/core.hpp" 5 6 using namespace std; 7 using namespace cv; 8 9 // @function main 10 int main( int argc, const char** argv ) 11 { 12 // -- 1. Definition 13 CvCapture* capture; 14 Mat frame; 15 16 // -- 2. Load the cascades (Only for face detection) 17 if(!face_cascade.load(face_cascade_name)) 18 { 19 printf("error loading1\n"); 20 return -1; 21 }; 22 23 // -- 3. Capture from camera and set size 24 capture = cvcapturefromcam( -1 ); 25 cvsetcaptureproperty( capture, CV_CAP_PROP_FRAME_WIDTH, 640 ); 26 cvsetcaptureproperty( capture, CV_CAP_PROP_FRAME_HEIGHT, 480 ); 27 28 // -- 4. Processing the video and show it 29 if( capture ) 30 { 31 while( true ) 32 { 33 Mat dst, gray_img; 34 Mat dst2(frame.rows*0.5, frame.cols*2.0, frame.type()); 35 vector <Rect > faces; 36 37 frame = cvqueryframe( capture ); 38 //Processing functions ----------------- 3

2 39 40 // --------------------------------------------- 41 char c = cvwaitkey( 50 ); 42 if( c == 27 ) break; 43 imshow( "output_window", frame ); 44 } 45 } 46 return 0; 47 } highgui.hpp 2. Load the cascades 4. Processing the video and show it std::vector<rect> faces; 1. cvcapturefromcam(-1) 0-1 2. cvsetcaptureproperty 3. cvqueryframe cvcapturefromcam while 4. cvwatikey ms () frame page per second fps 5. if( c == 27 ) break; char c = cvwaitkey( 50 ); esc while 4

3 2 Processing 3.1 RGB R G B NOT 1 dst = frame; Fig. 3.1.1 (a) (b) Fig. 3.1.1 ( ) 3.2 3 0 1-1 1 flip(frame, dst, 0); Fig. 3.2.1 3.3 5

3.4 3 (a) (b) (c) (d) Fig. 3.2.1 ( ) 1 resize(frame, dst2, dst2.size(), 0.5, 2, cv::inter_cubic); Fig. 3.3.1 (a) (b) Fig. 3.3.1 ( ) 3.4 6

3.4 3 3.4.1 1 GaussianBlur(frame, dst, Size(5, 5), 10, 10); Fig. 3.4.1 (a) (b) 5 (c) 11 Fig. 3.4.1 ( ) (3.1) f(x, y) = 1 2πσ 2 exp( x2 + y 2 2σ 2 ) (3.1) (3.1) σ Fig. 3.4.2 3 4 Y σ 5 X σ 3.4.2 1 bilateralfilter(frame, dst, 5, 50, 100); Fig. 3.4.3 f(i, j) g(i, j) (3.2) 7

3.4 3 1 2 1 16 16 16 2 4 16 16 2 16 1 2 1 16 16 16 6 4 24 6 1 4 1 256 256 256 256 256 4 16 24 16 4 256 256 256 256 256 36 24 6 256 256 256 256 256 4 16 24 16 256 256 256 256 6 4 4 256 1 4 1 256 256 256 256 256 (a) 3 3 (b) 5 5 Fig. 3.4.2 ( ) (a) (b) 5 (c) 11 Fig. 3.4.3 ( ) 8

3.5 3 g(x, y) = w w n= w n= w f(i + m, j + n) exp( m2 + n 2 ) exp( w w n= w n= w 2σ 2 1 exp( m2 + n 2 2σ1 2 ) exp( (f(i, j) f(i + m, j + n))2 2σ2 2 ) (f(i, j) f(i + m, j + n))2 2σ2 2 ) (3.2) w σ 1 σ 2 σ 2 3.5 1 cvtcolor(frame, dst, CV_BGR2GRAY); Fig. 3.5.1 (a) (b) Fig. 3.5.1 ( ) 2 RGB Y (3.3) Y = 0.299R + 0.587G + 0.114B (3.3) 3.6 ( ) 2 2 2 2 2 9

3.6 ( ) 3 3.5 gray img 2 1 threshold(gray_img, dst, 0, 255, cv::thresh_otsu); 2 Fig. 3.6.1 (a) (b) Fig. 3.6.1 2 ( ) t 2 n 1 m 1 σ 1 n 2 m 2 σ 2 n t m t σ t σw 2 σ 2 b σ 2 w = n 1 n 1 + n 2 σ 2 1 + n 2 n 1 + n 2 σ 2 2 (3.4) m t σ 2 b = n 1(m 1 m t ) 2 + n 2 (m 2 m t ) 2 n 1 + n 2 = n 1n 2 (m 1 m 2 ) 2 (n 1 + n 2 ) 2 (3.5) (3.5) m t = n 1m 1 + n 2 m 2 n 1 + n 2 (3.6) σ t σ 2 b = n 1n 2 (m 1 m 2 ) 2 (n 1 + n 2 ) 2 (3.7) σ 2 t = σ 2 b + σ2 w (3.8) 10

3.7 3 σb 2 σw 2 = σ2 b σ 2 t σ2 b (3.9) σ t σ b 2 n 1 n 2 (m 1 m 2 ) 2 (3.10) t n m (3.10) 3.7 OpenCV 2.5 gray img Haar-like 1 face_cascade.detectmultiscale(gray_img, faces, 1.1, 2, 0 CV_HAAR_SCALE_IMAGE, Size(200, 200)); 2 dst = frame; 3 for( size_t i = 0; i < faces.size(); i++ ) 4 { 5 Point center( faces[i].x + faces[i].width * 0.5, faces[i]. y + faces[i].height * 0.5 ); 6 ellipse( dst, center, Size(faces[i].width * 0.5, faces[i]. height * 0.5), 0, 0, 360, Scalar(255, 0, 255), 4, 8, 0 ); 7 } Fig. 3.7.1 (a) (b) Fig. 3.7.1 ( ) 11

3.7 3 OpenCV Fig. 3.7.2 Haar-like AdaBoost Learning images Input image Feature value Feature value Learning Recognition Result for learning Input image Fig. 3.7.2 ( 2) ) Fig. 3.7.3 Fig. 3.7.3 ( ) Fig. 3.7.4 Fig. 3.7.4 Haar-like 12 AdaBoost AdaBoost 12

3.7 3 Edge features Line features Center surround feature Fig. 3.7.4 Haar-like ( 2) ) 13

1),.., 2012. 2) slideshare 10 CV OpenCV. 14