From 48aec2e87b85999d7e3affae477fa186adf32f34 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Thu, 25 Jul 2013 21:15:09 -0400 Subject: [PATCH] Fixed example stream algorithms --- openbr/plugins/algorithms.cpp | 4 ++-- openbr/plugins/regions.cpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/openbr/plugins/algorithms.cpp b/openbr/plugins/algorithms.cpp index a72b396..12754a7 100644 --- a/openbr/plugins/algorithms.cpp +++ b/openbr/plugins/algorithms.cpp @@ -46,8 +46,8 @@ class AlgorithmsInitializer : public Initializer Globals->abbreviations.insert("CropFace", "Open+Cvt(Gray)+Cascade(FrontalFace)+ASEFEyes+Affine(128,128,0.25,0.35)"); // Video - Globals->abbreviations.insert("DisplayVideo", "Stream([Show(false)+Discard])"); - Globals->abbreviations.insert("PerFrameDetection", "Stream([SaveMat(original)+Cvt(Gray)+Cascade(FrontalFace)+ASEFEyes+RestoreMat(original)+Draw(inPlace=true),Show(false)+Discard])"); + Globals->abbreviations.insert("DisplayVideo", "Stream([Show(false,[FrameNumber])+Discard])"); + Globals->abbreviations.insert("PerFrameDetection", "Stream([SaveMat(original)+Cvt(Gray)+Cascade(FrontalFace)+ASEFEyes+RestoreMat(original)+Draw(inPlace=true),Show(false,[FrameNumber])+Discard])"); Globals->abbreviations.insert("AgeGenderDemo", "Stream([SaveMat(original)+Cvt(Gray)+Cascade(FrontalFace)+Expand+++(+Rename(Subject,Age)+Discard)/(+Rename(Subject,Gender)+Discard)+RestoreMat(original)+Draw(inPlace=true)+DrawPropertiesPoint([Age,Gender],Affine_0,inPlace=true)+SaveMat(original)+Discard+Contract,RestoreMat(original)+FPSCalc+Show(false,[AvgFPS,Age,Gender])+Discard])"); // Generic Image Processing diff --git a/openbr/plugins/regions.cpp b/openbr/plugins/regions.cpp index 5ccc96b..57cbf6f 100644 --- a/openbr/plugins/regions.cpp +++ b/openbr/plugins/regions.cpp @@ -239,7 +239,6 @@ BR_REGISTER(Transform, ExpandRectTransform) * \ingroup transforms * \brief Crops the width and height of a template's rects by input width and height factors. * \author Scott Klum \cite sklum - * \todo Error checking */ class CropRectTransform : public UntrainableTransform { @@ -257,7 +256,6 @@ class CropRectTransform : public UntrainableTransform for (int i=0;i < rects.size(); i++) { QRectF rect = rects[i]; - // Do a bit of error checking rect.setX(rect.x() + rect.width() * QtUtils::toPoint(widthCrop).x()); rect.setY(rect.y() + rect.height() * QtUtils::toPoint(heightCrop).x()); rect.setWidth(rect.width() * (1-QtUtils::toPoint(widthCrop).y())); -- libgit2 0.21.4