opencv object detection_takmin

Download Opencv object detection_takmin

Post on 05-Dec-2014

28.261 views

Category:

Technology

0 download

Embed Size (px)

DESCRIPTION

第10回CV勉強会 発表資料

TRANSCRIPT

  • 1. CV OpenCV takmin
  • 2. OpenCV
  • 3.
  • 4.
  • 5. Viola & Johns 2.0 opencv_createsamples opencv_traincascade
  • 6.
  • 7. Viola & Johns OpenCV Rainer Lienhart and Jochen Maydt, "An Extended Set of Haar-like Features for Rapid Object Detection", IEEE ICIP 2002,Vol. 1, pp. 900-903, Sep. 2002. Ojala and M. Pietikainen, Multiresolution Gray-Scale and Rotation Invariant Texture Classification with Local Binary Patterns, IEEE Trans on PAMI,Vol. 24. No.7, July, 2002. (LBP) Paul Viola and Michael J. Jones, "Rapid Object Detection using a Boosted Cascade of Simple Features", IEEE CVPR, 2001.
  • 8.
  • 9. Haar-Like AdaBoost
  • 10.
  • 11. AdaBoost
  • 12. AdaBoost1. 2. 0.53. 1. 2. 3. 4. 4.
  • 13. Haar-Like =
  • 14. Haar-Like Haar-Like Haar-Like Haar-Like
  • 15. AdaBoost AdaBoost P.Viola and M.J. Jones, "Rapid Object Detection using a Boosted Cascade of Simple Features", IEEE CVPR, 2001.
  • 16. 1. Haar-Like 2. Attentional Cascade
  • 17. - P1 = A P2 = A+B P3 = A+C P4 = A+B+C+D P2 A B B P1 P2 C D A P1 D P4 P4 P3 C P3 D = P4 P2 P3 + P1 D = P4 P2 P3 + P1
  • 18. Attentional Cascade - TRUE TRUE TRUE FALSE FALSE FALSE
  • 19. Haar-Like Haar-Like
  • 20. OpenCV
  • 21. OpenCVOpenCV 2.0 CascadeClassifier CCvHaarClassifierCascade FeatureEvaluator HaarLBP
  • 22. Local Binary Pattern (LBP) Jo Chang-yeon, Face Detection using LBP features, CS 229 Final Project Report
  • 23. Local Binary Pattern (LBP) M 256M Jo Chang-yeon, Face Detection using LBP features, CS 229 Final Project Report
  • 24. /* */cv::CascadeClassifier cascade( "haarcascade_frontalface_alt.xml" );std::vector faces;std::vector::iterator face_itr;/* */fcascade.detectMultiScale( image, faces);/* */for( face_itr = faces.begin(); face_itr != face_itr.end(); face_itr++ ){ cv::rectangle( image, *face_itr, CV_RGB(255,0,0), 3 );}/* () */
  • 25. 1. CascadeClassifier (XML) load() HaarLBP 2. CascadeClassifier::detectMultiScale () std::vector
  • 26. OpenCV_HOME/data/ haarcascades/ : Haar lbpcascades/ : LBP
  • 27.
  • 28. 1. 2. 3. opencv_createsamples 4. opencv_traincascade XML
  • 29. ver2.0ver1.1 /doc/haartraining.htm http://lab.cntl.kyutech.ac.jp/~kobalab/nishida/opencv/haa rtraining_jp.htm http://robotik.inflomatik.info/other/opencv/OpenCV_O bjectDetection_HowTo.pdf
  • 30. 30007000 Google Image http://images.google.co.jp/ Flickr http://www.flickr.com/ Pascal VOC http://pascallin.ecs.soton.ac.uk/challenges/VOC/ MIT http://cbcl.mit.edu/software-datasets/FaceData2.html http://www.vision.caltech.edu/Image_Datasets/Caltech101/Caltech101.html http://www.vision.caltech.edu/Image_Datasets/Caltech256/ etc
  • 31. NG.txt NGimage_0001.jpg NG.txt NGimage_0002.jpg OK.txt NGimage_0003.jpg NGimage_0004.jpg NG NGimage_0005.jpg image_0001.jpg . image_0002.jpg . . image_0003.jpg . OK image_0001.jpg image_0002.jpg image_0003.jpg
  • 32. OK.txt OKimage_0001.jpg 1 120 100 45 45 NG.txt OKimage_0002.jpg 2 100 200 50 50 50 30 25 25 OK.txt OKimage_0003.jpg 1 40 55 60 60 OKimage_0004.jpg 1 104 98 40 40 NG OKimage_0005.jpg 2 62 70 50 50 120 162 30 30 image_0001.jpg . image_0002.jpg . image_0003.jpg . . OK image_0001.jpg image_0002.jpg (x,y,width,height) image_0003.jpg