DescriptorExtractor: added defaultNorm() to return default norm type.
Added the defaultNorm() method to the DescriptorExtractor class. This method returns the default norm type for each descriptor type. The tests and C/C++ samples were updated to get the norm type directly from the DescriptorExtractor inherited classes. This was reported in feature report #2182 (http://code.opencv.org/issues/2182). It will make it possible to get the norm type usually applied matching method for each descriptor, instead of passing it manually.
This commit is contained in:
@@ -1124,7 +1124,7 @@ protected:
|
||||
CV_Assert(kpt2[i].response > 0 );
|
||||
|
||||
vector<DMatch> matches;
|
||||
BFMatcher(NORM_L2, true).match(d1, d2, matches);
|
||||
BFMatcher(f->defaultNorm(), true).match(d1, d2, matches);
|
||||
|
||||
vector<Point2f> pt1, pt2;
|
||||
for( size_t i = 0; i < matches.size(); i++ ) {
|
||||
|
Reference in New Issue
Block a user