From ecc070663208f02010a2d343cd7c3aa1eed79da2 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Sun, 8 Nov 2015 17:57:29 -0500 Subject: [PATCH] Indentation fixes --- openbr/plugins/classification/cascade.cpp | 10 +++++----- openbr/plugins/imgproc/slidingwindow.cpp | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/openbr/plugins/classification/cascade.cpp b/openbr/plugins/classification/cascade.cpp index 55aa32b..b4f32c4 100644 --- a/openbr/plugins/classification/cascade.cpp +++ b/openbr/plugins/classification/cascade.cpp @@ -235,11 +235,11 @@ class CascadeClassifier : public Classifier float classify(const Template &src, bool process, float *confidence) const { float stageConf = 0.0f; - const int stopStage = maxStage == -1 ? numStages : maxStage; - int stageIndex = 0; - foreach (const Classifier *stage, stages) { - if (stageIndex == stopStage) - break; + const int stopStage = maxStage == -1 ? numStages : maxStage; + int stageIndex = 0; + foreach (const Classifier *stage, stages) { + if (stageIndex == stopStage) + break; float result = stage->classify(src, process, &stageConf); if (confidence) *confidence += stageConf; diff --git a/openbr/plugins/imgproc/slidingwindow.cpp b/openbr/plugins/imgproc/slidingwindow.cpp index 1e6c3f9..636dfd2 100644 --- a/openbr/plugins/imgproc/slidingwindow.cpp +++ b/openbr/plugins/imgproc/slidingwindow.cpp @@ -106,18 +106,18 @@ class SlidingWindowTransform : public MetaTransform const Size classifierSize = classifier->windowSize(&dx, &dy); for (double factor = 1; ; factor *= scaleFactor) { - // TODO: This should support non-square sizes - // Compute the size of the window in which we will detect faces - const Size detectionSize(cvRound(minSize*factor),cvRound(minSize*factor)); + // TODO: This should support non-square sizes + // Compute the size of the window in which we will detect faces + const Size detectionSize(cvRound(minSize*factor),cvRound(minSize*factor)); - // Stop if detection size is bigger than the image itself - if (detectionSize.width > imageSize.width || detectionSize.height > imageSize.height) - break; + // Stop if detection size is bigger than the image itself + if (detectionSize.width > imageSize.width || detectionSize.height > imageSize.height) + break; - const float widthScale = (float)classifierSize.width/detectionSize.width; - const float heightScale = (float)classifierSize.height/detectionSize.height; - - // Scale the image such that the detection size within the image corresponds to the respresentation size + const float widthScale = (float)classifierSize.width/detectionSize.width; + const float heightScale = (float)classifierSize.height/detectionSize.height; + + // Scale the image such that the detection size within the image corresponds to the respresentation size const Size scaledImageSize(cvRound(imageSize.width*widthScale), cvRound(imageSize.height*heightScale)); Template rep(t.file); -- libgit2 0.21.4