From 6b46b3215a436984d80366acfc4a02b8f48527c4 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Sun, 8 Nov 2015 21:02:49 -0500 Subject: [PATCH] StageIndex bug fix --- openbr/plugins/classification/cascade.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbr/plugins/classification/cascade.cpp b/openbr/plugins/classification/cascade.cpp index b4f32c4..5620c3b 100644 --- a/openbr/plugins/classification/cascade.cpp +++ b/openbr/plugins/classification/cascade.cpp @@ -238,7 +238,7 @@ class CascadeClassifier : public Classifier const int stopStage = maxStage == -1 ? numStages : maxStage; int stageIndex = 0; foreach (const Classifier *stage, stages) { - if (stageIndex == stopStage) + if (stageIndex++ == stopStage) break; float result = stage->classify(src, process, &stageConf); if (confidence) -- libgit2 0.21.4