Merge pull request #1881 from pentschev:defaultNorm_master
This commit is contained in:
@@ -106,7 +106,7 @@ int main(int argc, const char ** argv)
|
||||
|
||||
//Do matching using features2d
|
||||
cout << "matching with BruteForceMatcher<Hamming>" << endl;
|
||||
BFMatcher matcher_popcount(NORM_HAMMING);
|
||||
BFMatcher matcher_popcount(extractor.defaultNorm());
|
||||
vector<DMatch> matches_popcount;
|
||||
double pop_time = match(kpts_1, kpts_2, matcher_popcount, desc_1, desc_2, matches_popcount);
|
||||
cout << "done BruteForceMatcher<Hamming> matching. took " << pop_time << " seconds" << endl;
|
||||
|
@@ -881,9 +881,10 @@ public:
|
||||
virtual void readAlgorithm( )
|
||||
{
|
||||
string classifierFile = data_path + "/features2d/calonder_classifier.rtc";
|
||||
Ptr<DescriptorExtractor> extractor = makePtr<CalonderDescriptorExtractor<float> >( classifierFile );
|
||||
defaultDescMatcher = makePtr<VectorDescriptorMatch>(
|
||||
makePtr<CalonderDescriptorExtractor<float> >( classifierFile ),
|
||||
makePtr<BFMatcher>(int(NORM_L2)));
|
||||
extractor,
|
||||
makePtr<BFMatcher>(extractor->defaultNorm()));
|
||||
specificDescMatcher = defaultDescMatcher;
|
||||
}
|
||||
};
|
||||
|
@@ -96,7 +96,7 @@ int main( int argc, char** argv ) {
|
||||
// The standard Hamming distance can be used such as
|
||||
// BFMatcher matcher(NORM_HAMMING);
|
||||
// or the proposed cascade of hamming distance using SSSE3
|
||||
BFMatcher matcher(NORM_HAMMING);
|
||||
BFMatcher matcher(extractor.defaultNorm());
|
||||
|
||||
// detect
|
||||
double t = (double)getTickCount();
|
||||
|
@@ -44,7 +44,7 @@ int main(int argc, char** argv)
|
||||
extractor.compute(img2, keypoints2, descriptors2);
|
||||
|
||||
// matching descriptors
|
||||
BFMatcher matcher(NORM_L2);
|
||||
BFMatcher matcher(extractor.defaultNorm());
|
||||
vector<DMatch> matches;
|
||||
matcher.match(descriptors1, descriptors2, matches);
|
||||
|
||||
|
@@ -45,7 +45,7 @@ int main(int argc, char** argv)
|
||||
extractor.compute(img2, keypoints2, descriptors2);
|
||||
|
||||
// matching descriptors
|
||||
BFMatcher matcher(NORM_L2);
|
||||
BFMatcher matcher(extractor.defaultNorm());
|
||||
vector<DMatch> matches;
|
||||
matcher.match(descriptors1, descriptors2, matches);
|
||||
|
||||
|
@@ -49,7 +49,7 @@ int main( int argc, char** argv )
|
||||
extractor.compute( img_2, keypoints_2, descriptors_2 );
|
||||
|
||||
//-- Step 3: Matching descriptor vectors with a brute force matcher
|
||||
BFMatcher matcher(NORM_L2);
|
||||
BFMatcher matcher(extractor.defaultNorm());
|
||||
std::vector< DMatch > matches;
|
||||
matcher.match( descriptors_1, descriptors_2, matches );
|
||||
|
||||
|
@@ -140,7 +140,7 @@ int main(int ac, char ** av)
|
||||
|
||||
vector<DMatch> matches;
|
||||
|
||||
BFMatcher desc_matcher(NORM_HAMMING);
|
||||
BFMatcher desc_matcher(brief.defaultNorm());
|
||||
|
||||
vector<Point2f> train_pts, query_pts;
|
||||
vector<KeyPoint> train_kpts, query_kpts;
|
||||
|
Reference in New Issue
Block a user