fix for negative confidence

This commit is contained in:
marina.kolpakova
2012-11-13 23:08:19 +04:00
parent bd9ca48fab
commit 1edab12068
2 changed files with 7 additions and 6 deletions

View File

@@ -232,7 +232,7 @@ struct cv::SCascade::Fields
float detectionScore = 0.f;
const Octave& octave = *(level.octave);
int stBegin = octave.index * octave.stages, stEnd = stBegin + 1024;//octave.stages;
int stBegin = octave.index * octave.stages, stEnd = stBegin + octave.stages;
int st = stBegin;
for(; st < stEnd; ++st)
@@ -270,7 +270,8 @@ struct cv::SCascade::Fields
if (detectionScore <= stage.threshold) return;
}
level.addDetection(dx, dy, detectionScore, detections);
if (detectionScore > 0)
level.addDetection(dx, dy, detectionScore, detections);
}
octIt_t fitOctave(const float& logFactor)