From 5cf6c5f0b273cf73be623c1df4ea2a01c3c4be8a Mon Sep 17 00:00:00 2001 From: Marius Muja Date: Fri, 28 Sep 2012 10:40:38 -0700 Subject: [PATCH] Added test to fix backwards compatibility with the way LSH was handled before comit 7236858b --- modules/flann/src/miniflann.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/flann/src/miniflann.cpp b/modules/flann/src/miniflann.cpp index 972ae72f84..d8ae2b07c5 100644 --- a/modules/flann/src/miniflann.cpp +++ b/modules/flann/src/miniflann.cpp @@ -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 ) {