features2d: fix BFMatcher.radiusMatch with HAMMING2
authorberak <px1704@web.de>
Thu, 31 Aug 2017 15:24:02 +0000 (17:24 +0200)
committerberak <px1704@web.de>
Thu, 31 Aug 2017 15:24:02 +0000 (17:24 +0200)
modules/features2d/src/matchers.cpp

index 4e9a7b4..7600323 100644 (file)
@@ -958,7 +958,7 @@ void BFMatcher::radiusMatchImpl( InputArray _queryDescriptors, std::vector<std::
     Mat dist, distf;
 
     int iIdx, imgCount = (int)trainDescCollection.size();
-    int dtype = normType == NORM_HAMMING ||
+    int dtype = normType == NORM_HAMMING || normType == NORM_HAMMING2 ||
         (normType == NORM_L1 && queryDescriptors.type() == CV_8U) ? CV_32S : CV_32F;
 
     for( iIdx = 0; iIdx < imgCount; iIdx++ )