OpenCV之特征检测器和描述子提取器和描述子匹配器
1.特征检测子(Feature Detector)
-Harris
[cpp] view plain copy print?cv::cornerHarris(image,strength,3,3,0.01);
-Fas
t[cpp] view plain copy print?
cv::Ptrcv::FastFeatureDetector fast = cv::FastFeatureDetector::create();
[cpp] view plain copy print?
//或
[cpp] view plain copy print?
cv::FAST(InputArray image, std::vector &keypoints, int threshold)
[cpp] view plain copy print?
//或
[cpp] view plain copy print?
cv::FAST(InputArray image, std::vector &keypoints, int threshold, bool nonmaxSuppression, int type)
-SIFT
[cpp] view plain copy print?
cv::Ptrcv::xfeatures2d::SIFT sift = cv::xfeatures2d::SIFT::create();
[cpp] view plain copy print?
//或
[cpp] view plain copy print?<pre name=“code” class="cpp">
cv::Ptrcv::xfeatures2d::SiftFeatureDetector sift = cv::xfeatures2d::SiftFeatureDetector::create();
-SURF
[cpp] view plain copy print?
cv::Ptrcv::xfeatures2d::SURF surf = cv::xfeatures2d::SURF::create();
[cpp] view plain copy print?
//或
[cpp] view plain copy print?
cv::Ptrcv::xfeatures2d::SurfFeatureDetector surf = cv::xfeatures2d::SurfFeatureDetector::create();
-ORB
[cpp] view plain copy print?
cv::Ptrcv::ORB orb = cv::ORB::create();
-MSER
[cpp] view plain copy print?
cv::Ptrcv::MSER mser = cv::MSER::create();
-GFTT
[cpp] view plain copy print?
cv::Ptrcv::GFTTDetector gftt = cv::GFTTDetector::create();
或者直接用goodFeaturesToTrack function;
-AGAST
[cpp] view plain copy print?
cv::AGAST(InputArray image, std::vector &keypoints, int threshold)
//或
cv::AGAST(InputArray image, std::vector &keypoints, int threshold, bool nonmaxSuppression, int type)
//或
cv::Ptrcv::AgastFeatureDetector agast = cv::AgastFeatureDetector::create();
-BRISK[cpp] view plain copy print?
cv::Ptrcv::BRISK brisk = cv::BRISK::create();
-SimpleBlob
[cpp] view plain copy print?
cv::Ptrcv::SimpleBlobDetector blob = cv::SimpleBlobDetector::create();
-KAZE
[cpp] view plain copy print?
cv::Ptrcv::KAZE kaze = cv::KAZE::create();
-AKAZE
[cpp] view plain copy print?
cv::Ptrcv::AKAZE akaze = cv::AKAZE::create();
2.描述子提取器(Descriptor Extractor)
-SIFT
[cpp] view plain copy print?cv::Ptrcv::xfeatures2d::SIFT sift = cv::xfeatures2d::SIFT::create(); //或 cv::Ptrcv::xfeatures2d::SiftDescriptorExtractor sift = cv::xfeatures2d::SiftDescriptorExtractor::create();
-SURF
[cpp] view plain copy print?cv::Ptrcv::xfeatures2d::SURF surf = cv::xfeatures2d::SURF::create(); //或 cv::Ptrcv::xfeatures2d::SurfDescriptorExtractor surf = cv::xfeatures2d::SurfDescriptorExtractor::create();
-BRIEF
Opencv中没有单独将BRIEF用来提取描述子,因为它是被用于ORB中的;
-BRISK
[cpp] view plain copy print?cv::Ptrcv::BRISK brisk = cv::BRISK::create();
-ORB
[cpp] view plain copy print?cv::Ptrcv::ORB orb = cv::ORB::create(); ORB是用fast特征;
-KAZE
[cpp] view plain copy print?cv::Ptrcv::KAZE kaze = cv::KAZE::create();
注:KAZE描述子只能使用KAZE或AKAZE特征点;
-AKAZE
[cpp] view plain copy print?cv::Ptrcv::AKAZE akaze = cv::AKAZE::create();
同样,AKAZE描述子也只能使用KAZE或AKAZE特征点;
3.描述子匹配器(Descriptor Matcher)
-BruteForce-BFMatcher
[cpp] view plain copy print?cv::Ptrcv::BFMatcher bf = cv::BFMatcher::create(“BruteForce”);
其中,匹配类型还可以是“BruteForce-L1”,“BruteForce-L2”,“BruteForce-Hamming”;
-FlannBased-FlannBasedMatcher
[cpp] view plain copy print?cv::Ptrcv::FlannBasedMatcher flann = cv::FlannBasedMatcher::create(“FlannBased”);