通用描述符匹配器功能OPENCV

时间:2011-07-20 03:04:26

标签: opencv

我想为你提一个简单的问题,但到目前为止我很难找到。 我的问题是:

opencv svn中有一个名为GenericDescriptorMatcher()的函数;

Ptr<GenericDescriptorMatcher> gdm = new VectorDescriptorMatcher( descriptorExtractor, descriptorMatcher );

我想得到一个关于它的解释,但是以一种简单的方式,它应该是什么

  

descriptorExtractor

它应该是什么

  

descriptorMatcher

为了上帝的缘故,很多天我一直在研究这个功能,但仍然不知道如何使用它,所以如果你有经验,请尝试用非常简单的方式解释它。

谢谢

1 个答案:

答案 0 :(得分:7)

这是一个例子

// Detect features
Ptr<FeatureDetector>     detector = new SurfFeatureDetector(400);
vector<KeyPoint> features;
detector->detect(image,   features); 

// Extract features
Mat descriptors;
Ptr<DescriptorExtractor> extractor = new SurfDescriptorExtractor();
extractor->compute(image,     features, descriptors);

// Matcher of features
Ptr<DescriptorMatcher> matcher = new BruteForceMatcher<L2<float>>();

// Now you can match the features using matcher or use gdm
Ptr<GenericDescriptorMatcher> gdm = new VectorDescriptorMatcher( extractor, matcher);
相关问题