diff --git a/modules/objdetect/include/opencv2/objdetect/objdetect.hpp b/modules/objdetect/include/opencv2/objdetect/objdetect.hpp index c9f740764d..fbcc6ba5c8 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 //////////////