Commit 6b46b3215a436984d80366acfc4a02b8f48527c4

Authored by Scott Klum
1 parent ecc07066

StageIndex bug fix

openbr/plugins/classification/cascade.cpp
... ... @@ -238,7 +238,7 @@ class CascadeClassifier : public Classifier
238 238 const int stopStage = maxStage == -1 ? numStages : maxStage;
239 239 int stageIndex = 0;
240 240 foreach (const Classifier *stage, stages) {
241   - if (stageIndex == stopStage)
  241 + if (stageIndex++ == stopStage)
242 242 break;
243 243 float result = stage->classify(src, process, &stageConf);
244 244 if (confidence)
... ...