Generic Descriptor Matcher function OPENCV
I would like to have a simple question for you but it was too hard to get for me so far. My question is:
There is a function in opencv svn called GenericDescriptorMatcher();
Ptr<GenericDescriptorMatcher> gdm = new VectorDescriptorMatcher( descriptorExtractor, descriptorMatcher );
I want to get an explanation about it but in a simple way, What it s开发者_JS百科hould be the
descriptorExtractor
and What it should be
descriptorMatcher
For God sake, for many days i'm working on this function and still don't know how to use it, so please if you have an experience with it, try to explain it in very simple way.
Thank you
Here is an example
// 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);
精彩评论