通用描述符匹配器功能OPENCV

Mar*_*rio 2 opencv

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

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

Ptr<GenericDescriptorMatcher> gdm = new VectorDescriptorMatcher( descriptorExtractor, descriptorMatcher );
Run Code Online (Sandbox Code Playgroud)

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

descriptorExtractor

它应该是什么

descriptorMatcher

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

谢谢

Dan*_*HsH 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);
Run Code Online (Sandbox Code Playgroud)