From f58c9b502c269dd5ba4b393ee61a6ed4b78c9e37 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sat, 20 Jul 2013 19:21:43 -0400 Subject: [PATCH] Add an outputVariable scheme to LargestConvexArea --- openbr/plugins/mask.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openbr/plugins/mask.cpp b/openbr/plugins/mask.cpp index 8b86221..81fa8fb 100644 --- a/openbr/plugins/mask.cpp +++ b/openbr/plugins/mask.cpp @@ -158,6 +158,9 @@ class LargestConvexAreaTransform : public UntrainableTransform { Q_OBJECT + Q_PROPERTY(QString outputVariable READ get_outputVariable WRITE set_outputVariable RESET reset_outputVariable STORED false) + BR_PROPERTY(QString, outputVariable, "Label") + void project(const Template &src, Template &dst) const { std::vector< std::vector > contours; @@ -171,7 +174,7 @@ class LargestConvexAreaTransform : public UntrainableTransform if (area / hullArea > 0.98) maxArea = std::max(maxArea, area); } - dst.file.set("Label", maxArea); + dst.file.set(outputVariable, maxArea); } }; -- libgit2 0.21.4