mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
Fix: error in the dimension used for computeMinMax
Instead of using the current dimension for which we just got a big span, we were computing Min and Max for the previous dimension stored in cutfeat (and using 0 instead of the dimension indice for the very first dimension with "span > (1-eps)max_span")
This commit is contained in:
parent
7fae2e834c
commit
06b4292534
@ -461,7 +461,7 @@ private:
|
|||||||
DistanceType span = bbox[i].high-bbox[i].low;
|
DistanceType span = bbox[i].high-bbox[i].low;
|
||||||
if (span>(DistanceType)((1-EPS)*max_span)) {
|
if (span>(DistanceType)((1-EPS)*max_span)) {
|
||||||
ElementType min_elem, max_elem;
|
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);
|
DistanceType spread = (DistanceType)(max_elem-min_elem);
|
||||||
if (spread>max_spread) {
|
if (spread>max_spread) {
|
||||||
cutfeat = (int)i;
|
cutfeat = (int)i;
|
||||||
|
Loading…
Reference in New Issue
Block a user