Commit 2d65a14c authored by Vitaly Tuzov's avatar Vitaly Tuzov

Fixed segmentation fault during search for nearest neighbor if provided descriptors are too far

parent 670acd99
......@@ -758,9 +758,8 @@ BinaryDescriptorMatcher::Mihasher::Mihasher( int B_val, int _m )
m = _m;
b = (int) ceil( (double) B / m );
/* assuming that B/2 is large enough radius to include
all of the k nearest neighbors */
D = (int) ceil( B / 2.0 );
/* set radius to search for nearest neighbors to size of descriptor */
D = (int) ceil( B );
d = (int) ceil( (double) D / m );
/* mplus is the number of chunks with b bits
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment