diff --git a/openbr/plugins/classification/boostedforest.cpp b/openbr/plugins/classification/boostedforest.cpp index bb1c7f5..d8894d9 100644 --- a/openbr/plugins/classification/boostedforest.cpp +++ b/openbr/plugins/classification/boostedforest.cpp @@ -107,10 +107,11 @@ class BoostedForestClassifier : public Classifier Q_PROPERTY(int maxDepth READ get_maxDepth WRITE set_maxDepth RESET reset_maxDepth STORED false) Q_PROPERTY(int maxWeakCount READ get_maxWeakCount WRITE set_maxWeakCount RESET reset_maxWeakCount STORED false) Q_PROPERTY(Type type READ get_type WRITE set_type RESET reset_type STORED false) - Q_PROPERTY(QList classifiers READ get_classifiers WRITE set_classifiers RESET reset_classifiers STORED false) Q_PROPERTY(float threshold READ get_threshold WRITE set_threshold RESET reset_threshold STORED false) public: + QList classifiers; + enum Type { Discrete = CvBoost::DISCRETE, Real = CvBoost::REAL, Logit = CvBoost::LOGIT, @@ -123,7 +124,6 @@ private: BR_PROPERTY(int, maxDepth, 1) BR_PROPERTY(int, maxWeakCount, 100) BR_PROPERTY(Type, type, Gentle) - BR_PROPERTY(QList, classifiers, QList()) BR_PROPERTY(float, threshold, 0) void train(const TemplateList &data) @@ -221,6 +221,12 @@ private: } }; +QList getClassifers(Classifier *classifier) +{ + BoostedForestClassifier *boostedForest = static_cast(classifier); + return boostedForest->classifiers; +} + BR_REGISTER(Classifier, BoostedForestClassifier) } // namespace br diff --git a/openbr/plugins/classification/cascade_classifier.cpp b/openbr/plugins/classification/cascade_classifier.cpp index 8467694..f518848 100644 --- a/openbr/plugins/classification/cascade_classifier.cpp +++ b/openbr/plugins/classification/cascade_classifier.cpp @@ -110,7 +110,7 @@ class CascadeClassifier : public Classifier Q_PROPERTY(float maxFAR READ get_maxFAR WRITE set_maxFAR RESET reset_maxFAR STORED false) Q_PROPERTY(bool requireAllStages READ get_requireAllStages WRITE set_requireAllStages RESET reset_requireAllStages STORED false) Q_PROPERTY(int maxStage READ get_maxStage WRITE set_maxStage RESET reset_maxStage STORED false) - Q_PROPERTY(QList stages READ get_stages WRITE set_stages RESET reset_stages STORED false) + Q_PROPERTY(QList stages READ get_stages WRITE set_stages RESET reset_stages STORED false) BR_PROPERTY(QString, stageDescription, "") BR_PROPERTY(int, numStages, 20) @@ -119,7 +119,7 @@ class CascadeClassifier : public Classifier BR_PROPERTY(float, maxFAR, pow(0.5, numStages)) BR_PROPERTY(bool, requireAllStages, false) BR_PROPERTY(int, maxStage, -1) - BR_PROPERTY(QList, stages, QList()) + BR_PROPERTY(QList, stages, QList()) TemplateList posImages, negImages; TemplateList posSamples, negSamples;