Commit ecc070663208f02010a2d343cd7c3aa1eed79da2
1 parent
fdda9f5c
Indentation fixes
Showing
2 changed files
with
15 additions
and
15 deletions
openbr/plugins/classification/cascade.cpp
| @@ -235,11 +235,11 @@ class CascadeClassifier : public Classifier | @@ -235,11 +235,11 @@ class CascadeClassifier : public Classifier | ||
| 235 | float classify(const Template &src, bool process, float *confidence) const | 235 | float classify(const Template &src, bool process, float *confidence) const |
| 236 | { | 236 | { |
| 237 | float stageConf = 0.0f; | 237 | float stageConf = 0.0f; |
| 238 | - const int stopStage = maxStage == -1 ? numStages : maxStage; | ||
| 239 | - int stageIndex = 0; | ||
| 240 | - foreach (const Classifier *stage, stages) { | ||
| 241 | - if (stageIndex == stopStage) | ||
| 242 | - break; | 238 | + const int stopStage = maxStage == -1 ? numStages : maxStage; |
| 239 | + int stageIndex = 0; | ||
| 240 | + foreach (const Classifier *stage, stages) { | ||
| 241 | + if (stageIndex == stopStage) | ||
| 242 | + break; | ||
| 243 | float result = stage->classify(src, process, &stageConf); | 243 | float result = stage->classify(src, process, &stageConf); |
| 244 | if (confidence) | 244 | if (confidence) |
| 245 | *confidence += stageConf; | 245 | *confidence += stageConf; |
openbr/plugins/imgproc/slidingwindow.cpp
| @@ -106,18 +106,18 @@ class SlidingWindowTransform : public MetaTransform | @@ -106,18 +106,18 @@ class SlidingWindowTransform : public MetaTransform | ||
| 106 | const Size classifierSize = classifier->windowSize(&dx, &dy); | 106 | const Size classifierSize = classifier->windowSize(&dx, &dy); |
| 107 | 107 | ||
| 108 | for (double factor = 1; ; factor *= scaleFactor) { | 108 | for (double factor = 1; ; factor *= scaleFactor) { |
| 109 | - // TODO: This should support non-square sizes | ||
| 110 | - // Compute the size of the window in which we will detect faces | ||
| 111 | - const Size detectionSize(cvRound(minSize*factor),cvRound(minSize*factor)); | 109 | + // TODO: This should support non-square sizes |
| 110 | + // Compute the size of the window in which we will detect faces | ||
| 111 | + const Size detectionSize(cvRound(minSize*factor),cvRound(minSize*factor)); | ||
| 112 | 112 | ||
| 113 | - // Stop if detection size is bigger than the image itself | ||
| 114 | - if (detectionSize.width > imageSize.width || detectionSize.height > imageSize.height) | ||
| 115 | - break; | 113 | + // Stop if detection size is bigger than the image itself |
| 114 | + if (detectionSize.width > imageSize.width || detectionSize.height > imageSize.height) | ||
| 115 | + break; | ||
| 116 | 116 | ||
| 117 | - const float widthScale = (float)classifierSize.width/detectionSize.width; | ||
| 118 | - const float heightScale = (float)classifierSize.height/detectionSize.height; | ||
| 119 | - | ||
| 120 | - // Scale the image such that the detection size within the image corresponds to the respresentation size | 117 | + const float widthScale = (float)classifierSize.width/detectionSize.width; |
| 118 | + const float heightScale = (float)classifierSize.height/detectionSize.height; | ||
| 119 | + | ||
| 120 | + // Scale the image such that the detection size within the image corresponds to the respresentation size | ||
| 121 | const Size scaledImageSize(cvRound(imageSize.width*widthScale), cvRound(imageSize.height*heightScale)); | 121 | const Size scaledImageSize(cvRound(imageSize.width*widthScale), cvRound(imageSize.height*heightScale)); |
| 122 | 122 | ||
| 123 | Template rep(t.file); | 123 | Template rep(t.file); |