æçš¿è
ïŒLyudmila Dezhkinaãã·ãã¢ãã«ã¹ã¿ãã¯éçºè
OpenCVã¯ãæåãªãªãŒãã³ãœãŒã¹ã®æ±çšã³ã³ãã¥ãŒã¿ãŒããžã§ã³ã©ã€ãã©ãªã§ãã OpenCVã§ã§ããããšãã©ã€ãã©ãªã®ä»çµã¿ãRubyã§ã®äœ¿çšæ¹æ³ã説æããŸãã ç§ã¯ãããé©çšããã2ã€ã®ãããžã§ã¯ãã«åå ããããšãã§ããŸããã ã©ã¡ãã®å ŽåããæçµããŒãžã§ã³ã§ã¯Rubyã䜿çšããŸããã§ããããOpenCVãå¿
èŠãªã¿ã¹ã¯ãå®è¡ããæ¹æ³ã確èªããããã ãã«ãå°æ¥ã®ã·ã¹ãã ã®ãããã¿ã€ããäœæããå¿
èŠãããæåã®æ®µéã§ã¯éåžžã«äŸ¿å©ã§ãã ãã¹ãŠãé 調ã§ããã°ããã®åŸãã¢ããªã±ãŒã·ã§ã³ã¯å¥ã®èšèªã§åãã¢ã«ãŽãªãºã ã§èšè¿°ãããŸãã ãŸããç¹ã«Rubyã§OpenCVã䜿çšããã«ã¯ã察å¿ããgemããããŸãã
ã©ã€ãã©ãªã®äž»èŠéšåã¯ãç»å解éãšæ©æ¢°åŠç¿ã¢ã«ãŽãªãºã ã§ãã OpenCVãæäŸããæ©èœã®ãªã¹ãã¯éåžžã«åºç¯å²ã§ãã
- ç»å解é;
- æšæºã«åŸã£ãã«ã¡ã©ã®èŒæ£ã
- å
åŠæªã¿ã®é€å»;
- é¡äŒŒæ§ã®æ±ºå®;
- ãªããžã§ã¯ãã®åãã®åæ;
- ãªããžã§ã¯ãã®åœ¢ç¶ã決å®ãããªããžã§ã¯ãã远跡ããŸãã
- 3Dåæ§ç¯;
- ãªããžã§ã¯ãã®ã»ã°ã¡ã³ããŒã·ã§ã³ã
- ãžã§ã¹ãã£ãŒèªèã
çŸåšãOpenCVã¯å€ãã®åéã§äœ¿çšãããŠããŸãã 以äžã«èå³æ·±ãäŸã瀺ããŸãã
- GoogleïŒ
- Googleèªåé転è»-ç¡äººè»äž¡ã§Google OpenCVã䜿çšããŠãç°å¢ãèªèãããããã¿ã€ããéçºããŸãã
ïŒçŸåšãæ§ç¯ãããã·ã¹ãã ã¯äž»ã«LIDARã«åºã¥ããŠããŸã-æãå Žæã§ã®èªèãé£ããããïŒ - Google Glass-ãããã®ã¡ã¬ãã§ã¯ãç»åã®3Dåæ§æãOpenCVäžã«æ§ç¯ãããŠããŸãã
- Google Mobile
- ãããã£ã¯ã¹ãšArduinoã
- å·¥æ¥çç£-æã
ãå·¥å Žã¯OpenCVãŸãã¯ãã®ãããªãã®ã§éšåã«ãŠã³ãã·ã¹ãã ãäœæããŸãã
é£ããã§ãããé¢çœãã§ããïŒ
ã©ã®ããŒã¿ãçã«ã倧ããšèŠãªãããšãã§ããããèšãã®ã¯é£ããããšããããŸãããOpenCVã®å Žåã«ã¯ãã®ãããªçãã¯ãããŸãããããšãã°ãèªåé転è»ã¯å€§ãŸããªèŠç©ããã«åŸã£ãŠçŽ1 Gb / sãåŠçã§ããããã¯æ¬åœã«ããã°ããŒã¿ã§ãã æ¯èŒã®ããã«ã人éã®è³ã¯çŽ45 Mb-3 GB / sãåŠçããŸããããã¯ãç¹ã«éšå±ã®ç
§æã«äŸåããŸãã
å€æ°ã®OpenCVã¢ã«ãŽãªãºã ã«ã€ããŠã¯ããã®äžã«è€éã§åçŽãªãã®ããããŸãã ç¹ã«ããã£ã«ã¿ãªã³ã°ã®ã¢ã«ãŽãªãºã ããã³ãœã«ïŒå®éã«ã¯1次å
é
åïŒããããŸãã
OpenCVã¯ãèªèãéšåçã«ãã¥ãŒã©ã«ãããã¯ãŒã¯äžã«æ§ç¯ããããããæ©æ¢°åŠç¿ãšãã£ãŒãã©ãŒãã³ã°ãã¯ãããžãŒã䜿çšããŸãã ãã£ãŒãã©ãŒãã³ã°ãšæ©æ¢°åŠç¿ã¯éåžžã«èå³æ·±ããããã¯ã§ããã³ãŒã¹ã©ã§ã³ãŒã¹ãå匷ããããšããå§ãããŸãã äžè¬çãªã³ã³ãã¥ãŒã¿ãŒããžã§ã³ã®ãããã¯ã«é¢ããŠã¯ã次ã®æ¬ããå§ãããŸãã
OpenCVã®æ§æèŠçŽ ã¯äœã§ããïŒ
å¥åŠãªããšã«ã
CXCORE ïŒã³ã¢èªäœïŒã¯ããã°ã©ãã³ã°ã®ç¹ã§ã¯åºæ¬çã§ãã åºæ¬çãªããŒã¿æ§é ãšã¢ã«ãŽãªãºã ãå«ãŸããŠããŸãã
- å€æ¬¡å
æ°å€é
åã®åºæ¬æäœ-ããšãã°ãè¡åãšãã¯ãã«ã®ä¹ç®ã2ã€ã®è¡åã®ä¹ç®ãªã©ãå¯èœã§ãã
- è¡å代æ°ãæ°åŠé¢æ°ãä¹±æ°ãžã§ãã¬ãŒã¿ãŒ-ãããæäœããã«ã¯ãç®çã®é¢æ°ã®ååãç¥ãã ãã§ååã§ãã
- XMLãžã®ããŒã¿æ§é ã®æžã蟌ã¿/埩å
ã
- 2Dã°ã©ãã£ãã¯ã¹ã®åºæ¬æ©èœ-ããšãã°ããããæãããšãã§ããŸãã
CVã¯ç»ååŠçããã³ã³ã³ãã¥ãŒã¿ãŒããžã§ã³ã¢ãžã¥ãŒã«ã§ãã 以äžãå«ãŸããŸãã
- ç»åã®åºæ¬æäœïŒãã£ã«ã¿ãªã³ã°ã幟äœåŠçå€æãè²ç©ºéå€æãªã©ïŒ;
- ç»ååæïŒç¹åŸŽã®éžæã圢æ
ã茪éã®æ€çŽ¢ããã¹ãã°ã©ã ïŒ;
- ã¢ãŒã·ã§ã³åæããªããžã§ã¯ãã®è¿œè·¡ã
- ãªããžã§ã¯ããç¹ã«äººã®æ€åº;
- ã«ã¡ã©ãã£ãªãã¬ãŒã·ã§ã³ããã³ç©ºé埩å
èŠçŽ ã
ãšããã§ã幟äœåŠçå€æã¯ã©ã€ãã©ãªã®éåžžã«éèŠãªéšåã§ããäœããæ§ç¯ããããšãããšãã«ã¡ã©ã®å転ãšè§åºŠãèæ
®ããå¿
èŠãããããšãå€ãããã§ãã
HighGUI-ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ãäœæãããç»åãšãããªã®å
¥åºåã¢ãžã¥ãŒã«ã ã¢ãžã¥ãŒã«ã¯æ¬¡ã®æ©èœãå®è¡ããŸãã
- ã«ã¡ã©ããã³ãããªãã¡ã€ã«ãããããªããã£ããã£ããéçç»åãèªã¿æžãããŸãã
- ã·ã³ãã«ãªUIãæŽçããããã®é¢æ°ïŒãã¹ãŠã®ãã¢ã¢ããªã±ãŒã·ã§ã³ã¯HighGUIã䜿çšïŒã
MLã¯çµã¿èŸŒã¿ã®æ©æ¢°åŠç¿ã¢ã«ãŽãªãºã ã§ããããã®ãŸãŸäœ¿çšã§ããŸããã3çªç®ã®ããŒãžã§ã³ã§ã¯ãä»ç€Ÿãåªããæ©æ¢°åŠç¿ã¢ã«ãŽãªãºã ãéçºããŠãããããåŸã
ã«æŸæ£ãããŠããŸãïŒåŸã§èª¬æããŸãïŒã
CvCam-ãããªã§ã§ããããšïŒã«ã¡ã©ãã£ããã£ãæ€åºãã¹ã©ã€ã¹ãªã©ïŒ
Cvauxã¯å®éšçã§éæšå¥šã®æ©èœã§ãã
- 空éããžã§ã³ïŒã¹ãã¬ãªãã£ãªãã¬ãŒã·ã§ã³ãèªå·±ãã£ãªãã¬ãŒã·ã§ã³ã
- ã¹ãã¬ãªãããã³ã°ã®æ€çŽ¢ãã°ã©ãã®ã¯ãªãã¯ã
- é¡ã®ç¹åŸŽã®çºèŠãšèª¬æã
ç¹èš±ãŸãã¯ã¹ã¿ãŒãã¢ããã®äŸ
OpenCVã䜿çšããŠæåŸã«æåããã¹ã¿ãŒãã¢ããã®1ã€ã®è¯ãäŸã¯ã
Zugaraã®ä»®æ³è©Šç宀ã§ãã 圌女ã¯ã©ã®ããã«åããŠããŸããïŒ ã¢ã«ãŽãªãºã ã¯ããã次ã®ãšããã§ãã圌女ã¯ãŠãŒã¶ãŒãæ®åœ±ããé¡ãŸã§ã®è·é¢ãèšç®ããŸãã 次ã«ããŠãŒã¶ãŒã¯èªåã®ãµã€ãºãããã€ãå
¥åããè©Šç宀ã¯ãã€ã€ãŒãåŒãä»ããæããäœããèšç®ããŸãã ãã ãããã®ã·ã¹ãã ã«ã¯ãã1ã€ã®éèŠãªéšåããããŸããAutoCADã¢ãã«ã§ããè©Šçããåã«ããã¹ãŠã®ãã®ã3Dåæ§ç¯ãããŸãã
OpenCVã䜿çšãã2çªç®ã®è¯ãäŸã¯ãéè·¯äžã®ãã³ããŒãã¬ãŒãèªèã·ã¹ãã ã§ãã ãã ãããã®ãããªã·ã¹ãã ã®ç²ŸåºŠã¯æ倧90ïŒ
ã§ããããã¯ãæ®åœ±ã®å質ããã·ã³ã®é床ãæ°åã®æ±ãå
·åãªã©ã«å€§ããäŸåããããã§ãã
ãã¥ãŒã©ã«ãããã¯ãŒã¯ïŒåŠç¿ã¡ã«ããºã ïŒ
OpenCVã®2çªç®ã®éèŠãªéšåïŒç»ååŠçãæ
åœããéšåã«ç¶ãïŒã¯ãæ©æ¢°åŠç¿ã§ãã çµã¿èŸŒã¿ã®OpenCVã«å ããŠãçŸåšã
ããã€ãã®æ©æ¢°åŠç¿
ã¡ã«ããºã ããããŸãã
- Googleã®TensorFlow㯠ããã¹ãŠãã³ãœã«äžã«æ§ç¯ãããŠããŸãã
- Theano ã PyLearn 2 && EcoSystemã¯æ倧ã®éçºã®1ã€ã§ããã䜿çšãéåžžã«å°é£ã§ãã
- ããŒãã¯æ代é
ãã®ã¡ã«ããºã ã§ãã
- Caffeã¯ã䜿çšã«æé©ãªåå¿è
åãã·ã¹ãã ã§ãã ã¡ãªã¿ã«ãèªèã®ããã«ç¹å¥ã«äœ¿çšããå¿
èŠã¯ãããŸãã-ããšãã°ãéèã»ã¯ã¿ãŒã§äœ¿çšã§ããŸãã ãã®ãããCaffeã¯éè¡ååŒæäœã®ãããã¿ã€ãã®äœæã«ãã䜿çšãããŸãã ãã®äžã«æ§ç¯ãããçç©åŠçã·ã¹ãã ããããŸãã
ã·ã¹ãã æ§ç¯ã®é£ãã
ãã®ãããªã·ã¹ãã ãæ§ç¯ããå ŽåïŒåãä»®æ³è©Šç宀ãŸãã¯çªå·èªèã·ã¹ãã ã§ãã£ãŠãïŒãå°ãªããšã2ã€ã®ãžã¬ã³ãã«å¯ŸåŠããå¿
èŠããããŸãã
- ãœãããŠã§ã¢ãŸãã¯ããŒããŠã§ã¢ã
- ã¢ã«ãŽãªãºã ãŸãã¯ãã¥ãŒã©ã«ãããã¯ãŒã¯ã
ãœãããŠã§ã¢ãšãââãŒããŠã§ã¢ã®ãžã¬ã³ãã¯ãããŒããŠã§ã¢ãæªãã»ã©ãè³¢æãªçµæãåŸãããã«ãœãããŠã§ã¢éšåãéçºããããšãããè¯ããšããããšã§ãã 2çªç®ã®ãžã¬ã³ãã¯æ¬¡ã®ãšããã§ãããœãããŠã§ã¢éšåã§äœ¿çšããæ¹ãè¯ãã®ã¯ãã¢ã«ãŽãªãºã ãŸãã¯ãã¥ãŒã©ã«ãããã¯ãŒã¯ã§ããïŒ å®éããã¥ãŒã©ã«ãããã¯ãŒã¯ã§ã¯ã¢ã«ãŽãªãºã ã倱ãããããšããããŸãã 次ã®ããã«ã¢ã«ãŽãªãºã ãšãã¥ãŒã©ã«ãããã¯ãŒã¯ãéžæããŸãããã¥ãŒã©ã«ãããã¯ãŒã¯ãã¢ã«ãŽãªãºã ãããå€ãã®ã¹ããŒã¹ãå æããå Žåã¯ãã¢ã«ãŽãªãºã ãéžæããŸãã ã¢ã«ãŽãªãºã ã¯äžè¬ã«ä¿¡é Œæ§ãé«ããåçŽãªå Žåã«ã¯ãããéžæããŸãã ãŸãããã¥ãŒã©ã«ãããã¯ãŒã¯ã¯ãéåžžã«åçŽãªåé¡ã§ãã解決ã§ããªãå ŽåããããŸããããšãã°ãRosenblattããŒã»ãããã³ã¯ããã€ã³ããã©ã€ã³ã®äžãŸãã¯äžã«ãããã©ãããç解ã§ããŸããã
æåèªè
ããšãã°ããã³ããŒãã¬ãŒãèªèã·ã¹ãã ãäœæãããšãã«å¿
èŠã«ãªãå¯èœæ§ã®ããæåèªèã«ã€ããŠå°ã話ããŸãããã
Tesseract OCRã¯ã1ã€ã®æåãèªåçã«èªèããããã«ããã¹ããèªèãããªãŒãã³ãœãŒã¹ãœãããŠã§ã¢ã§ãã Tesseractã¯ãããããOSåãã§ãããå®å®ããŠåäœããç°¡åã«ãã¬ãŒãã³ã°ã§ãããšããç¹ã§äŸ¿å©ã§ãã ãã ããé倧ãªæ¬ ç¹ããããŸããããã¹ããè²ãããããç Žæããããæ±ããããå€åœ¢ããããããšãåäœãéåžžã«æªããªããŸãã ãããã£ãŠãTesseractã¯æ°åã®èªèã«ã¯é©ããŠããŸãããããã¬ãŒã³ããã¹ãã®èªèã«ã¯éåžžã«é©ããŠããŸãã T. hãTesseractã¯ãããšãã°ææžç®¡çã«å®å
šã«é©çšã§ããŸãã
K-nearestã¯éåžžã«ç解ããããæåèªèã¢ã«ãŽãªãºã ã§ããããã®åå§æ§ã«ããââãããããSVMãŸãã¯ãã¥ãŒã©ã«ãããã¯ãŒã¯ææ³ã®æãæåããå®è£
ãæã¡è² ããããšãã§ããŸãã
次ã®ããã«æ©èœããŸãã
- 以åã«æåã§ã¯ã©ã¹ã«åå²ãããå®éã®ãã£ã©ã¯ã¿ãŒã®ç»åãäºåã«èšé²ããŸãã
- æåéã®è·é¢ã®æž¬å®å€ãå
¥åããŸãïŒç»åã2å€åãããå ŽåãXORæäœãæé©ã«ãªããŸãïŒã
- 次ã«ãã·ã³ãã«ãèªèããããšãããšãããŒã¿ããŒã¹å
ã®ãã¹ãŠã®ã·ã³ãã«ãšã·ã³ãã«éã®è·é¢ã亀äºã«èšç®ããŸãã æãè¿ãé£äººã®äžã«ã¯ãããŸããŸãªã¯ã©ã¹ã®ä»£è¡šè
ãããå ŽåããããŸãã ã©ã®ã¯ã©ã¹ã®é£äººãããå€ãã®ä»£è¡šè
ã§ããããèªèå¯èœãªãã£ã©ã¯ã¿ãŒã¯ãã®ã¯ã©ã¹ã«åž°ãã¹ãã§ãã
OpenCVããŒã¿å
ããã§ã¯ãã¹ãŠãç°¡åã§ãã
CvPoint
ãã€ã³ãïŒ2ã€ã®å€æ°ïŒxãyïŒã®æ§é ïŒ
CvSize
ãµã€ãºïŒ2ã€ã®å€æ°ã®æ§é ïŒå¹
ãé«ãïŒïŒ
CvRect
é·æ¹åœ¢ïŒ4ã€ã®å€æ°ïŒxãyãå¹
ãé«ãïŒã®æ§é ïŒ
CvScalar
ã¹ã«ã©ãŒïŒdoubleåã®4ã€ã®æ°åïŒ
CvArr
ã¯é
åã§ã-CvMatããã³ããã«IplImageã®ãæœè±¡åºæ¬ã¯ã©ã¹ããšèŠãªãããšãã§ããŸãïŒCvArr-> CvMat-> IplImageïŒ
CvMat
ãããªãã¯ã¹
IplImage
ç»å
ãããOpenCVã®ãã¹ãŠã®ããŒã¿åã§ãã
åçãã¢ããããŒã
ãããRubyã§ã§ããããšã§ãã ã©ã€ãã©ãªãæ¥ç¶ããããåçãã¢ããããŒãã§ããŸãã ããªãããããèŠãããªããããªãã¯ãããçªã®å€ã«åºãããšãå¿ããŠã¯ãªããªãããšãéèŠã§ãã
cvLoadImage( filename, int iscolor=CV_LOAD_IMAGE_COLOR )
//
ãã¡ã€ã«åãšç»è³ªã¯ãã©ã¡ãŒã¿ãŒãšããŠåãå
¥ããããŸãã
filename
ãã¡ã€ã«åiscolor
ç»åã®è¡šç€ºæ¹æ³ãå®çŸ©ããŸãiscolor > 0
iscolor == 0
ç»åã¯GRAYSCALE圢åŒïŒã°ã¬ãŒã¹ã±ãŒã«ïŒã§ã¢ããããŒããããŸã
iscolor < 0
ç»åã¯ãã®ãŸãŸã¢ããããŒããããŸã
cvNamedWindow("original",CV_WINDOW_AUTOSIZE);
//
cvShowImage("original",image);
ããŠã³ããŒãåŸã«å©çšå¯èœãªæ
å ±
çŽ25ã®ã¡ãœããããããŸãããç§ã¯ãããã®ã¿ã䜿çšããŸãïŒ
image->nChannels // (RGB, OpenCV â BGR ) (1-4);
image->depth // ( , );
image->width // ;
image->height // ;
image->imageSize // , (==image->height*image->widthStep);
image->widthStep // ( ) â .
ãŽã£ãªã©ãžã§ãŒã³ãºã¡ãœãã
2005幎ã«çºæããããã®é¡èªèæ¹æ³ã¯ãHaarã®æ©èœã«åºã¥ããŠããŸãã ã»ãšãã©ãã¹ãŠã®ã«ã¡ã©ã§é¡ãæ€åºããããã«äœ¿çšãããŸãã ããããã®ä»çµã¿ã§ãã
åãã£ãŒãã£ã®å€ã¯ãçœãé·æ¹åœ¢ã®ãã¯ã»ã«ã®åèšãšããŠèšç®ãããããããé»ãé åã®ãã¯ã»ã«ã®åèšãå·®ãåŒãããŸãã é·æ¹åœ¢ã®ç¹åŸŽã¯æ瞊å¯èœãªãã£ã«ã¿ãŒãããåå§çã§ããã
ãããŠãç»åã®åçŽããã³æ°Žå¹³ã®ç¹åŸŽã«ææã§ãããšããäºå®ã«ããããããããããã®æ€çŽ¢ã®çµæã¯ããç²ãã§ãã
ãããŠã人éã®èšèã§è©±ããšãé¡ãæ®åœ±ããã2ã€ã®éšåã«åå²ãããŸãã 錻ã®è¿ããç®ã®äžã®é åã¯æããªããé ¬ã¯æãããªããŸããç»åã®åãã¯ã»ã«ã1ã€ã®ãã¯ãã«å€ã§ãããšæ³åããŠãã ãããããã䜿çšããŠãã°ã¬ãŒãšãã¯ã€ãã®ãã¯ã»ã«æ°ãèšç®ãããŸãã ããã«åºã¥ããŠãé¡ã®ããã«èŠãããã©ããã«ããããããçµè«ãå°ãåºãããŸãã
ãã¥ãŒã©ã«ãããã¯ãŒã¯
ãã¥ãŒã©ã«ãããã¯ãŒã¯ã¯çŸåš2ã€ã®ã¿ã€ãã«åããããŠããŸãã æåã®ã¿ã€ãã¯ãå€ã2ã¬ãã«ããã³3ã¬ãã«ã®ãããã¯ãŒã¯ã§ãã ãã®ãããªãããã¯ãŒã¯ã¯ã誀差ã®éäŒæã䌎ãåŸé
æ³ã«ãã£ãŠèšç·ŽãããŸãã ãããã䜿çšããå Žåããã¯ãã«ãåããé¢æ°ãæ瀺ããŸãããã®åŸãããšãã°ãããŒã»ãããã³ã®å±€ããããŸãã å
¥åæžã¿ïŒæ¢ã«åŠçãããŠããç»å-ããšãã°ãç®çã®éšåãæ®åœ±ãããæ°åã®å Žåã¯ãæ°åã®åæåããšã«é·æ¹åœ¢ã«ã«ãããããŸãïŒã ãã®åŸãåãã¯ã»ã«ãå解ãããŸã-ãã¯ãã«ãé·ç§»ãã«ãŠã³ãããŸãã å®éãããã¯åãªãé
åãã©ããŒãµã«ã§ãã ãã®æè¡ã¯ãã§ã«æ代é
ãã§ãã
2çªç®ã®ã¿ã€ãã®æ°ãããããã¯ãŒã¯ã¯ãç³ã¿èŸŒã¿æŒç®ã䜿çšããŠæ·±ããŠç³ã¿èŸŒã¿çã§ãã ç³ã¿èŸŒã¿æŒç®ã¯ãããé¢æ°ãšãå¥ã®é¢æ°ã®åå°ããã³ã·ãããããã³ããŒãšã®é¡äŒŒæ§ã瀺ããŸãã OpenCVã®ãã¹ãŠã®ç³ã¿èŸŒã¿ã¯2Dãã£ã«ã¿ãŒã§è¡ãããŸãã
cvFilter2D( src, dst, kernel, CvPoint anchor CV_DEFAULT(cvPoint(-1,-1)))
Canny Border Detector
é¡ãæ°åã®ç»åãåŠçããå Žåããããã®ç»åã®å¢çãèšç®ããå¿
èŠããããŸãã ãã®éåžžã«é£ããã¿ã¹ã¯ã¯ãéåžžã«å€ãçµã¿èŸŒã¿ã¢ã«ãŽãªãºã -Canny 1986ã䜿çšããŠOpenCVã§è§£æ±ºãããŸãã
ãšããžïŒå¢çïŒã¯ãèŒåºŠãŸãã¯ãã®ä»ã®çš®é¡ã®äžåäžæ§ãæ¥æ¿ã«å€åããç»åã®æ²ç·ã§ãã ç°¡åã«èšããšããšããžãšã¯ãèŒåºŠã®æ¥æ¿ãªå€åãŸãã¯å€åã§ãã
ãšããžã®åå ïŒ
- ç
§æã®å€å;
- è²ã®å€å;
- ã·ãŒã³ã®æ·±ãã®å€åïŒè¡šé¢ã®åãïŒã
ã¢ã«ãŽãªãºã ã䜿çšããã«ã¯ãç»åãšæµžé£ã®ãããå€ãæ¢ãå Žæãæå®ããå¿
èŠããããŸã-ããã¯ãããšãã°ãæãéè·¯ã§è»ãèŠã€ããããšãã§ããããã«ããããã«å¿
èŠã§ãã
cvCanny( image, edges, threshold1,
threshold2, CV_DEFAULT(3) );
image-åŠççšã®åäžãã£ãã«ç»åïŒã°ã¬ãŒã¹ã±ãŒã«ïŒ;
edges
-é¢æ°ã«ãã£ãŠæ€åºãããå¢çç·ãä¿åããããã®åäžãã£ãã«ç»åã
threshold1
æå°ãããå€ã
threshold2
æ倧ãããå€ã
aperture_size
-Sobelãªãã¬ãŒã¿ãŒã®ãµã€ãºã
Cannyã¢ã«ãŽãªãºã ã®ä»çµã¿ã¯æ¬¡ã®ãšããã§ãã
- ç»åãããã€ãºãšäžèŠãªè©³çŽ°ãåé€ããŸãã
- ç»åã®åŸé
ãèšç®ããŸãã
- ãšããžãèãããŸãã
- ãšããžã茪éã«æ¥ç¶ããŸãïŒãšããžãªã³ã¯ïŒã
ãããŸã§èªãã 人ãã¡ïŒãããŠããããã®åå以äžããããšä¿¡ãããïŒã«ãç§ã¯ãã®èšäºãäºå®çºèŠã®æ§æ Œã«éããªããšèšããããç§ã¯ãã ç§ã®çµè«ãå
±æãããã£ãã ç§ã¯æè¡çãªã³ã³ãã¥ãŒã¿ãŒæè²ãåããŠããªãã®ã§ãäžæ£ç¢ºãªç¹ããããããããŸãã-èšæ£ãã³ã¡ã³ããæè¿ããŸãã
ãããŠããã®ãããã¯ããããã£ã¯ã¹æ代ã®å°æ¥ã«é¢é£ããŠããããšãé¡ã£ãŠããŸãã