From 108fd169f7e253de7435437293c726f4ae195c5f Mon Sep 17 00:00:00 2001 From: "marina.kolpakova" Date: Tue, 28 Aug 2012 17:42:15 +0400 Subject: [PATCH] dummy soft cascade --- .../include/opencv2/objdetect/objdetect.hpp | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/modules/objdetect/include/opencv2/objdetect/objdetect.hpp b/modules/objdetect/include/opencv2/objdetect/objdetect.hpp index c9f7407..fbcc6ba 100644 --- a/modules/objdetect/include/opencv2/objdetect/objdetect.hpp +++ b/modules/objdetect/include/opencv2/objdetect/objdetect.hpp @@ -411,7 +411,7 @@ protected: enum { DO_CANNY_PRUNING = 1, SCALE_IMAGE = 2, FIND_BIGGEST_OBJECT = 4, DO_ROUGH_SEARCH = 8 }; - friend class CascadeClassifierInvoker; + friend struct CascadeClassifierInvoker; template friend int predictOrdered( CascadeClassifier& cascade, Ptr &featureEvaluator, double& weight); @@ -488,6 +488,28 @@ protected: Ptr maskGenerator; }; +// ======================== soft cascade version ===================== // + +class CV_EXPORTS SoftCascade +{ +public: + SoftCascade(); + SoftCascade( const string& filename ); + virtual ~SoftCascade(); + bool load( const string& filename ); + + virtual void detectMultiScale(const Mat& image, const std::vector& rois, std::vector& objects, double factor = 1.05, int step = 4, int rejectfactor = 1); + +protected: + virtual void detectForOctave(int octave); + // virtual bool detectSingleScale( const Mat& image, int stripCount, Size processingRectSize, + // int stripSize, int yStep, double factor, vector& candidates, + // vector& rejectLevels, vector& levelWeights, bool outputRejectLevels=false); + enum { BOOST = 0 }; +private: + struct Filds; + Filds* filds; +}; //////////////// HOG (Histogram-of-Oriented-Gradients) Descriptor and Object Detector ////////////// -- 2.7.4