码迷,mamicode.com
首页 > 其他好文 > 详细

OpenCV之特征检测器(Feature Detector),描述子提取器(Descriptor Extractor)和描述子匹配器(Descriptor Matcher)

时间:2016-05-12 20:30:02      阅读:815      评论:0      收藏:0      [点我收藏+]

标签:

1.特征检测子

    -Harris

cv::cornerHarris(image,strength,3,3,0.01);

    -Fast

cv::Ptr<cv::FastFeatureDetector> fast = cv::FastFeatureDetector::create();
//或
cv::FAST(InputArray image, std::vector<KeyPoint> &keypoints, int threshold)
//或
cv::FAST(InputArray image, std::vector<KeyPoint> &keypoints, int threshold, bool nonmaxSuppression, int type)

    -SIFT

cv::Ptr<cv::xfeatures2d::SIFT> sift = cv::xfeatures2d::SIFT::create();
//或
<pre name="code" class="cpp">cv::Ptr<cv::xfeatures2d::SiftFeatureDetector> sift = cv::xfeatures2d::SiftFeatureDetector::create();


    -SURF

cv::Ptr<cv::xfeatures2d::SURF> surf = cv::xfeatures2d::SURF::create();
//或
cv::Ptr<cv::xfeatures2d::SurfFeatureDetector> surf = cv::xfeatures2d::SurfFeatureDetector::create();

    -ORB

cv::Ptr<cv::ORB> orb = cv::ORB::create();

    -MSER

cv::Ptr<cv::MSER> mser = cv::MSER::create();

    -GFTT

cv::Ptr<cv::GFTTDetector> gftt = cv::GFTTDetector::create();

或者直接用goodFeaturesToTrack function;

    -AGAST

cv::AGAST(InputArray image, std::vector<KeyPoint> &keypoints, int threshold)
//或
cv::AGAST(InputArray image, std::vector<KeyPoint> &keypoints, int threshold, bool nonmaxSuppression, int type)
//或
cv::Ptr<cv::AgastFeatureDetector> agast = cv::AgastFeatureDetector::create();

    -BRISK

cv::Ptr<cv::BRISK> brisk = cv::BRISK::create();


    -SimpleBlob

cv::Ptr<cv::SimpleBlobDetector> blob = cv::SimpleBlobDetector::create();

    -KAZE

cv::Ptr<cv::KAZE> kaze = cv::KAZE::create();

    -AKAZE

cv::Ptr<cv::AKAZE> akaze = cv::AKAZE::create();

2.描述子提取器

    -SIFT

<span style="font-weight: normal;"><span style="font-size:12px;">cv::Ptr<cv::xfeatures2d::SIFT> sift = cv::xfeatures2d::SIFT::create();
//或
cv::Ptr<cv::xfeatures2d::SiftDescriptorExtractor> sift = cv::xfeatures2d::SiftDescriptorExtractor::create();</span></span>

    -SURF

<span style="font-weight: normal;"><span style="font-size:12px;">cv::Ptr<cv::xfeatures2d::SURF> surf = cv::xfeatures2d::SURF::create();
//或
cv::Ptr<cv::xfeatures2d::SurfDescriptorExtractor> surf = cv::xfeatures2d::SurfDescriptorExtractor::create();</span></span>

    -BRIEF

Opencv中没有单独将BRIEF用来提取描述子,因为它是被用于ORB中的;

    -BRISK

<span style="font-weight: normal;"><span style="font-size:12px;">cv::Ptr<cv::BRISK> brisk = cv::BRISK::create();</span></span>

    -ORB

<span style="font-size:12px;font-weight: normal;">cv::Ptr<cv::ORB> orb = cv::ORB::create();</span>
ORB是用fast特征; 

   -KAZE

<span style="font-size:12px;font-weight: normal;">cv::Ptr<cv::KAZE> kaze = cv::KAZE::create();</span>

注:KAZE描述子只能使用KAZE或AKAZE特征点;

    -AKAZE

<span style="font-size:12px;font-weight: normal;">cv::Ptr<cv::AKAZE> akaze = cv::AKAZE::create();</span>

同样,AKAZE描述子也只能使用KAZE或AKAZE特征点;

3.描述子匹配器

   -BruteForce-BFMatcher

cv::Ptr<cv::BFMatcher> bf = cv::BFMatcher::create("BruteForce");

其中,匹配类型还可以是“BruteForce-L1”,“BruteForce-L2”,“BruteForce-Hamming”;

   -FlannBased-FlannBasedMatcher

cv::Ptr<cv::FlannBasedMatcher> flann = cv::FlannBasedMatcher::create("FlannBased");



OpenCV之特征检测器(Feature Detector),描述子提取器(Descriptor Extractor)和描述子匹配器(Descriptor Matcher)

标签:

原文地址:http://blog.csdn.net/eternity1118_/article/details/51333364

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!