å±æç¹å¾´éã¨ã¯ / SIFT, SURF ç¹å¾´é
ãã®ã¹ã©ã¤ããè¶ ããããããã£ãã§ãã
ã§ãSIFT (Scale-invariant feature transform)ãSURF (Speed-Upped Robust Feature) ã¨ããã®ã¯ãæ¡å¤§ç¸®å°ã»å転ã»ç §æå¤åã«å¼·ãããã¹ããªç¹å¾´éãã¨ãã¦ããç¥ããã¦ããããã§ãã
SURF ã®æ¹ã軽éã§ããã®ä»£ããèªè精度㯠SIFT ã®æ¹ãè¯ããã¨ã®ãã¨ã
ç¹å¾´éã®ç¨é
- è¤æ°åçããã®ããã©ãåçåæ
ï¼ä¸ã«è¼ããã¹ã©ã¤ãããï¼
- AR ã®ãã¼ã«ã¼èªè
ä¸è¨ç»åã¯ARã®ãã¼ã«ã¼èªèã¨ã¯éãã¾ããããããã使ãæ¹ãã§ãããã ãã¨ãããã¨ã¯æ±²ãã§ããã ãããã¨ãã
ï¼http://docs.opencv.org/3.0-rc1/d7/dff/tutorial_feature_homography.html ããï¼
- ç©ä½èªè
ï¼ä¸ã«è¼ããã¹ã©ã¤ãããï¼
ORBï¼Oriented-BRIEFï¼ç¹å¾´é
SIFT, SURF åæ§ã«å転ãæ¡å¤§ç¸®å°ã«ããã¹ãã§ãããªãããé«éï¼SURFã®10åãSIFTã®100åï¼ããã¤ã©ã¤ã»ã³ã¹çã«ã使ããããç¹å¾´éã
- åèï¼ORB使ってみた - Puku's Laboratory
ã¡ãªã¿ã«ä¸è¨è¨äºã®ã³ã¡ã³ãæ¬ã§æãã¦ããã ãã¾ããã
AKAZE ç¹å¾´é
OpenCV 3.0 ã«æ°ãã«çµã¿è¾¼ã¾ããç¹å¾´ç¹æ½åºã¢ã«ã´ãªãºã ã
AKAZE 㯠Accelerated KAZE ã®ç¥ã§ãKAZE ã¨ãã SIFT ã SURF ã®æ¬ ç¹ã解決ããææ³ããã¨ã«ãããã«ãã®ããã¹ãæ§ã®åä¸ã¨é«éåãå³ã£ããã®ãã¨ã®ãã¨ã
- åèï¼AKAZE特徴量の紹介と他特徴量との比較 - 遥かへのスピードランナー
ä¸è¨è¨äºã§ã¯ä»ææ³ã¨æ¯è¼ãããã³ããã¼ã¯ãã¨ã£ã¦ãã¦ã
ç»åå¤åã®ããã¹ãæ§ã«ã¤ãã¦ã¯ãã¹ã±ã¼ã«ã»å転ã»è¼åº¦ã»Blurå ¨ã¦ã«ããã¦ãAKAZEãæãè¯ãæ°å¤ã示ãã¦ãããã¨ãåããã¾ããå®é使ã£ã¦ã¿ãæãã§ããããªãæ£ç¢ºã«ãã©ããã³ã°ãã¦ããæãããã¾ãã
ã¹ãã¼ãã«é¢ãã¦ããSIFTãSURFã«æ¯ã¹ã¦åç¨åº¦ããããã¯ãã以ä¸ã§ãã
ã¨ã®ãã¨ã§ãããªãããããã¨ãåããªæãã§ãã
ããã«ããããªã¨ããã§è¨ããã¦ããã¨ã§ãããSIFT ã SURF ã¯ã©ã¤ã»ã³ã¹çã«åç¨å©ç¨ãã¥ãããã®ããããä¸æ¹ã§ãã® AKAZE ã¯ã©ã¤ã»ã³ã¹çã«ã使ãããããªã£ã¦ããã¨ã®ãã¨ã*1
AKAZE vs ORB
OpenCV å ¬å¼ã®こちらのページã«ã¦ãAKAZE 㨠ORB ã«ãã planar trackingï¼å¹³é¢ãã©ããã³ã°ï¼ã®æ¯è¼ãè¡ããã¦ãã¾ãã
AKAZEã®æ¹ãããå¼·åã«ãã©ããã³ã°ãã¦ããããã§ãã
iOSã«ãããå®è£
ã¨ããããã§ãããããæ¬é¡ã§ãããiOS 㧠SURF, SIFT, ORB, AKAZE ãç¨ãã¦ç¹å¾´ç¹æ¤åºãè¡ã£ã¦ã¿ã¾ãã
contrib ã®å©ç¨
SIFT, SURF ã¯ï¼ã©ã¤ã»ã³ã¹ã®é½åä¸ï¼ï¼contrib ã¨ããå¥æ ã§ç®¡çããã¦ãã¾ãã詳ããã¯ä¸è¨è¨äºã«ã¾ã¨ããã®ã§ãåç §ãã ããã
ã³ã¼ã
ãããªæãã§å®è£ ãã¾ããã
typedef NS_ENUM(NSUInteger, CVFeatureDetectorType) { CVFeatureDetectorTypeSURF, CVFeatureDetectorTypeSIFT, CVFeatureDetectorTypeORB, CVFeatureDetectorTypeAKAZE, };
+ (UIImage *)detectKeypoints:(UIImage *)srcImage withFeatureDetector:(CVFeatureDetectorType)detectorType { cv::Mat srcMat = [OpenCVHelper cvMatFromUIImage:srcImage]; // FeatureDetector çæ Ptr<Feature2D> detector; switch (detectorType) { case CVFeatureDetectorTypeSURF: default: detector = SURF::create(); break; case CVFeatureDetectorTypeSIFT: detector = SIFT::create(); break; case CVFeatureDetectorTypeORB: detector = ORB::create(); break; case CVFeatureDetectorTypeAKAZE: detector = AKAZE::create(); break; } // ç¹å¾´ç¹æ½åº std::vector<KeyPoint> keypoints; detector->detect(srcMat, keypoints); printf("%lu keypoints are detected.\n", keypoints.size()); // ç¹å¾´ç¹ãæç» cv::Mat dstMat; dstMat = srcMat.clone(); for(int i = 0; i < keypoints.size(); i++) { KeyPoint *point = &(keypoints[i]); cv::Point center; int radius; center.x = cvRound(point->pt.x); center.y = cvRound(point->pt.y); radius = cvRound(point->size*0.25); cv::circle(dstMat, center, radius, Scalar(255,255,0)); } return [OpenCVHelper UIImageFromCVMat:dstMat]; }
å¼ã³åºãå´ã¯ãããªæãã
- (IBAction)segmentChanged:(UISegmentedControl *)sender { UIImage *srcImage = [UIImage imageNamed:@"image_filename"]; self.imageView.image = [OpenCVHelper detectKeypoints:srcImage withFeatureDetector:(CVFeatureDetectorType)sender.selectedSegmentIndex]; }
å®è¡çµæ
å®è¡æé㯠iPhone 6 ã§è¨æ¸¬ãï¼ç¹å¾´ç¹ã®æç»ãå«ãï¼
ææï¼ä»å¾ã®å±æ
ãããAKAZEãæå¤ã¨é ãããå¦çæéã®è¨æ¸¬ç¯å²ã«ã¯ç¹å¾´ç¹ã®æç»ã¾ã§å«ããã®ã§ãã®å½±é¿ããªãã¨ãæãã¾ãããSURFã¯åããããã®ç¹å¾´ç¹æ°ãªã®ã«éãã®ã§ããã§ã¯ãªãããã§ãã
ä¸ã§ãåç §ããこちらの記事ã«ããã¨ã
AKAZE/KAZEã®ã³ã¼ãã¯OpenMPã§ã®ä¸¦ååã«å¯¾å¿ãã¦ããã®ã§ããããã®ãã³ããã¼ã¯ã§ã¯OpenMPãå©ç¨ãã¦ãã¾ãããPabloæ°ããã®ææã«ããã°ãAKAZEã®ãã¸ãã¯ã¯ä¸¦ååã«åãã¦ãããããOpenMPã®å©ç¨ã«ããå¤§å¹ ãªã¹ãã¼ãã¢ãããè¦è¾¼ããã¨ã®ãã¨ã§ããOpenCVã®SIFTã¨SURFã®ã³ã¼ããè¦ãã¨ãããSIFTã®ã³ã¼ãã¯ä¸¦ååãã¦ãã¾ããããSURFã®ã³ã¼ãã¯ä¸¦ååãã¦ãã¾ããä¸è¨ãã³ããã¼ã¯ã®SURFã®éãã¯ããããèµ·å ãã¦ããã¨æããã¾ãã
ã¨ã®ãã¨ãSURFã®ä¸¦ååãiOSã§ãå¹ãã¦ããã®ãã©ãããAKAZE ã® OpenCV ã®å®è£ ãã©ããªã£ã¦ãã®ãã¾ã§ã¯ç解ãã¦ãã£ã¦ããªãã®ã§ãä¸è¨çµæã¯ã»ãã®åèç¨åº¦ã«ã©ãããã
ã¾ããå¦çé度以åã«ãæ¤åºãããç¹å¾´ç¹ãææ³ã«ãã£ã¦å ¨ç¶éããã¨ããã®ãä¸ã®çµæããè¦ã¦åãã¾ããã¢ã«ã´ãªãºã ã®ä¸èº«ãç解ãã¦ãç¨éã«å¿ãã¦é©åãªãã®ãé¸ã¶å¿ è¦ããããããä»å使ç¨ããç»åã¯ãã¯ã¿ã¼çãªãªãã¸ã§ã¯ãã®éåä½ã§ãããåççãªç»åã«é©ç¨ãããã©ããªã®ããã¨ãã
次ã¹ãããã¨ãã¦ã¯ DescriptorExtractor, DescriptorMatcher ã使ã£ã¦ç¹å¾´ç¹ã®ãããã³ã°ã¾ã§ãã£ã¦ã¿ããã¨æã£ã¦ãã¾ãã
ãã¾ãï¼OpenCV 3.0 ã§ä½¿ãã FeatureDetector
- FASTï¼ORBï¼BRISKï¼MSERï¼GFTTï¼HARRISï¼SimpleBlobï¼KAZEï¼AKAZE
- è¦contribï¼ STARï¼SIFTï¼SURF
ï¼åèï¼OpenCV3.0.0-alphaの特徴抽出・マッチングまとめ - whoopsidaisies's diaryï¼
ãã®ä»åèãã¼ã¸
å ¬å¼
- Feature Detection and Description — OpenCV 3.0.0-dev documentationã»ã»ã»ãªãã¡ã¬ã³ã¹
- OpenCV: 2D Features framework (feature2d module)ã»ã»ã»ãã¥ã¼ããªã¢ã«
- http://opencv.jp/opencv2-x-samples/surf_extraction ï¼å¤ãï¼
*1:èªåã¯ã¾ã å人ã§ã試ãå©ç¨ä¸ãªã®ã§è©³ç´°æªç¢ºèª