Skip to content

Commit 6259ba1

Browse files
committed
Merge pull request opencv#17641 from pemmanuelviel:pev--fix-middleSplit-for-kdtree-single
2 parents cd8262e + 06b4292 commit 6259ba1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/flann/include/opencv2/flann/kdtree_single_index.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ class KDTreeSingleIndex : public NNIndex<Distance>
461461
DistanceType span = bbox[i].high-bbox[i].low;
462462
if (span>(DistanceType)((1-EPS)*max_span)) {
463463
ElementType min_elem, max_elem;
464-
computeMinMax(ind, count, cutfeat, min_elem, max_elem);
464+
computeMinMax(ind, count, (int)i, min_elem, max_elem);
465465
DistanceType spread = (DistanceType)(max_elem-min_elem);
466466
if (spread>max_spread) {
467467
cutfeat = (int)i;

0 commit comments

Comments
 (0)