Merge pull request #17641 from pemmanuelviel:pev--fix-middleSplit-for-kdtree-single

pull/17663/head
Alexander Alekhin 5 years ago
commit 6259ba1bfd
  1. 2
      modules/flann/include/opencv2/flann/kdtree_single_index.h

@ -461,7 +461,7 @@ private:
DistanceType span = bbox[i].high-bbox[i].low;
if (span>(DistanceType)((1-EPS)*max_span)) {
ElementType min_elem, max_elem;
computeMinMax(ind, count, cutfeat, min_elem, max_elem);
computeMinMax(ind, count, (int)i, min_elem, max_elem);
DistanceType spread = (DistanceType)(max_elem-min_elem);
if (spread>max_spread) {
cutfeat = (int)i;

Loading…
Cancel
Save