Added test to fix backwards compatibility with the way LSH was handled before comit...
authorMarius Muja <mariusm@cs.ubc.ca>
Fri, 28 Sep 2012 17:40:38 +0000 (10:40 -0700)
committerMarius Muja <mariusm@cs.ubc.ca>
Fri, 28 Sep 2012 17:40:38 +0000 (10:40 -0700)
modules/flann/src/miniflann.cpp

index 972ae72..d8ae2b0 100644 (file)
@@ -365,6 +365,11 @@ void Index::build(InputArray _data, const IndexParams& params, flann_distance_t
     index = 0;
     featureType = data.type();
     distType = _distType;
+    
+    if ( algo == FLANN_INDEX_LSH) 
+    {
+        distType = FLANN_DIST_HAMMING;
+    }
 
     switch( distType )
     {