Commit 26b3b3c1 authored by Alexander Alekhin's avatar Alexander Alekhin

xobjdetect: apply CV_OVERRIDE/CV_FINAL

parent 64d58861
...@@ -111,8 +111,8 @@ public: ...@@ -111,8 +111,8 @@ public:
enum { HAAR = 0, LBP = 1, HOG = 2 }; enum { HAAR = 0, LBP = 1, HOG = 2 };
CvFeatureParams(); CvFeatureParams();
virtual void init( const CvFeatureParams& fp ); virtual void init( const CvFeatureParams& fp );
virtual void write( cv::FileStorage &fs ) const; virtual void write( cv::FileStorage &fs ) const CV_OVERRIDE;
virtual bool read( const cv::FileNode &node ); virtual bool read( const cv::FileNode &node ) CV_OVERRIDE;
static cv::Ptr<CvFeatureParams> create(); static cv::Ptr<CvFeatureParams> create();
int maxCatCount; // 0 in case of numerical features int maxCatCount; // 0 in case of numerical features
int featSize; // 1 in case of simple features (HAAR, LBP) and N_BINS(9)*N_CELLS(4) in case of Dalal's HOG features int featSize; // 1 in case of simple features (HAAR, LBP) and N_BINS(9)*N_CELLS(4) in case of Dalal's HOG features
......
...@@ -64,15 +64,15 @@ class CvLBPEvaluator : public CvFeatureEvaluator ...@@ -64,15 +64,15 @@ class CvLBPEvaluator : public CvFeatureEvaluator
public: public:
virtual ~CvLBPEvaluator() {} virtual ~CvLBPEvaluator() {}
virtual void init(const CvFeatureParams *_featureParams, virtual void init(const CvFeatureParams *_featureParams,
int _maxSampleCount, cv::Size _winSize ); int _maxSampleCount, cv::Size _winSize ) CV_OVERRIDE;
virtual void setImage(const cv::Mat& img, uchar clsLabel, int idx, const std::vector<int> &feature_ind); virtual void setImage(const cv::Mat& img, uchar clsLabel, int idx, const std::vector<int> &feature_ind) CV_OVERRIDE;
virtual void setWindow(const cv::Point& p) virtual void setWindow(const cv::Point& p) CV_OVERRIDE
{ cur_sum = sum.rowRange(p.y, p.y + winSize.height).colRange(p.x, p.x + winSize.width); } { cur_sum = sum.rowRange(p.y, p.y + winSize.height).colRange(p.x, p.x + winSize.width); }
virtual float operator()(int featureIdx) virtual float operator()(int featureIdx) CV_OVERRIDE
{ return (float)features[featureIdx].calc( cur_sum ); } { return (float)features[featureIdx].calc( cur_sum ); }
virtual void writeFeatures( cv::FileStorage &fs, const cv::Mat& featureMap ) const; virtual void writeFeatures( cv::FileStorage &fs, const cv::Mat& featureMap ) const CV_OVERRIDE;
protected: protected:
virtual void generateFeatures(); virtual void generateFeatures() CV_OVERRIDE;
class Feature class Feature
{ {
......
...@@ -52,19 +52,19 @@ namespace cv ...@@ -52,19 +52,19 @@ namespace cv
namespace xobjdetect namespace xobjdetect
{ {
class WBDetectorImpl : public WBDetector { class WBDetectorImpl CV_FINAL : public WBDetector {
public: public:
virtual void read(const FileNode &node); virtual void read(const FileNode &node) CV_OVERRIDE;
virtual void write(FileStorage &fs) const; virtual void write(FileStorage &fs) const CV_OVERRIDE;
virtual void train( virtual void train(
const std::string& pos_samples, const std::string& pos_samples,
const std::string& neg_imgs); const std::string& neg_imgs) CV_OVERRIDE;
virtual void detect( virtual void detect(
const Mat& img, const Mat& img,
std::vector<Rect> &bboxes, std::vector<Rect> &bboxes,
std::vector<double> &confidences); std::vector<double> &confidences) CV_OVERRIDE;
private: private:
WaldBoost boost_; WaldBoost boost_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment