Commit 3314966a authored by Alexander Alekhin's avatar Alexander Alekhin

objdetect: apply CV_OVERRIDE/CV_FINAL

parent 1060c0f4
...@@ -175,7 +175,7 @@ class CV_EXPORTS_W BaseCascadeClassifier : public Algorithm ...@@ -175,7 +175,7 @@ class CV_EXPORTS_W BaseCascadeClassifier : public Algorithm
{ {
public: public:
virtual ~BaseCascadeClassifier(); virtual ~BaseCascadeClassifier();
virtual bool empty() const = 0; virtual bool empty() const CV_OVERRIDE = 0;
virtual bool load( const String& filename ) = 0; virtual bool load( const String& filename ) = 0;
virtual void detectMultiScale( InputArray image, virtual void detectMultiScale( InputArray image,
CV_OUT std::vector<Rect>& objects, CV_OUT std::vector<Rect>& objects,
......
...@@ -997,7 +997,7 @@ public: ...@@ -997,7 +997,7 @@ public:
mtx = _mtx; mtx = _mtx;
} }
void operator()(const Range& range) const void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
......
...@@ -74,22 +74,22 @@ protected: ...@@ -74,22 +74,22 @@ protected:
}; };
class CascadeClassifierImpl : public BaseCascadeClassifier class CascadeClassifierImpl CV_FINAL : public BaseCascadeClassifier
{ {
public: public:
CascadeClassifierImpl(); CascadeClassifierImpl();
virtual ~CascadeClassifierImpl(); virtual ~CascadeClassifierImpl() CV_OVERRIDE;
bool empty() const; bool empty() const CV_OVERRIDE;
bool load( const String& filename ); bool load( const String& filename ) CV_OVERRIDE;
void read( const FileNode& node ); void read( const FileNode& node ) CV_OVERRIDE;
bool read_( const FileNode& node ); bool read_( const FileNode& node );
void detectMultiScale( InputArray image, void detectMultiScale( InputArray image,
CV_OUT std::vector<Rect>& objects, CV_OUT std::vector<Rect>& objects,
double scaleFactor = 1.1, double scaleFactor = 1.1,
int minNeighbors = 3, int flags = 0, int minNeighbors = 3, int flags = 0,
Size minSize = Size(), Size minSize = Size(),
Size maxSize = Size() ); Size maxSize = Size() ) CV_OVERRIDE;
void detectMultiScale( InputArray image, void detectMultiScale( InputArray image,
CV_OUT std::vector<Rect>& objects, CV_OUT std::vector<Rect>& objects,
...@@ -97,7 +97,7 @@ public: ...@@ -97,7 +97,7 @@ public:
double scaleFactor=1.1, double scaleFactor=1.1,
int minNeighbors=3, int flags=0, int minNeighbors=3, int flags=0,
Size minSize=Size(), Size minSize=Size(),
Size maxSize=Size() ); Size maxSize=Size() ) CV_OVERRIDE;
void detectMultiScale( InputArray image, void detectMultiScale( InputArray image,
CV_OUT std::vector<Rect>& objects, CV_OUT std::vector<Rect>& objects,
...@@ -107,16 +107,16 @@ public: ...@@ -107,16 +107,16 @@ public:
int minNeighbors = 3, int flags = 0, int minNeighbors = 3, int flags = 0,
Size minSize = Size(), Size minSize = Size(),
Size maxSize = Size(), Size maxSize = Size(),
bool outputRejectLevels = false ); bool outputRejectLevels = false ) CV_OVERRIDE;
bool isOldFormatCascade() const; bool isOldFormatCascade() const CV_OVERRIDE;
Size getOriginalWindowSize() const; Size getOriginalWindowSize() const CV_OVERRIDE;
int getFeatureType() const; int getFeatureType() const CV_OVERRIDE;
void* getOldCascade(); void* getOldCascade() CV_OVERRIDE;
void setMaskGenerator(const Ptr<MaskGenerator>& maskGenerator); void setMaskGenerator(const Ptr<MaskGenerator>& maskGenerator) CV_OVERRIDE;
Ptr<MaskGenerator> getMaskGenerator(); Ptr<MaskGenerator> getMaskGenerator() CV_OVERRIDE;
protected: protected:
enum { SUM_ALIGN = 64 }; enum { SUM_ALIGN = 64 };
...@@ -311,7 +311,7 @@ protected: ...@@ -311,7 +311,7 @@ protected:
#define CALC_SUM_OFS(rect, ptr) CALC_SUM_OFS_((rect)[0], (rect)[1], (rect)[2], (rect)[3], ptr) #define CALC_SUM_OFS(rect, ptr) CALC_SUM_OFS_((rect)[0], (rect)[1], (rect)[2], (rect)[3], ptr)
//---------------------------------------------- HaarEvaluator --------------------------------------- //---------------------------------------------- HaarEvaluator ---------------------------------------
class HaarEvaluator : public FeatureEvaluator class HaarEvaluator CV_FINAL : public FeatureEvaluator
{ {
public: public:
struct Feature struct Feature
...@@ -342,24 +342,24 @@ public: ...@@ -342,24 +342,24 @@ public:
}; };
HaarEvaluator(); HaarEvaluator();
virtual ~HaarEvaluator(); virtual ~HaarEvaluator() CV_OVERRIDE;
virtual bool read( const FileNode& node, Size origWinSize); virtual bool read( const FileNode& node, Size origWinSize) CV_OVERRIDE;
virtual Ptr<FeatureEvaluator> clone() const; virtual Ptr<FeatureEvaluator> clone() const CV_OVERRIDE;
virtual int getFeatureType() const { return FeatureEvaluator::HAAR; } virtual int getFeatureType() const CV_OVERRIDE { return FeatureEvaluator::HAAR; }
virtual bool setWindow(Point p, int scaleIdx); virtual bool setWindow(Point p, int scaleIdx) CV_OVERRIDE;
Rect getNormRect() const; Rect getNormRect() const;
int getSquaresOffset() const; int getSquaresOffset() const;
float operator()(int featureIdx) const float operator()(int featureIdx) const
{ return optfeaturesPtr[featureIdx].calc(pwin) * varianceNormFactor; } { return optfeaturesPtr[featureIdx].calc(pwin) * varianceNormFactor; }
virtual float calcOrd(int featureIdx) const virtual float calcOrd(int featureIdx) const CV_OVERRIDE
{ return (*this)(featureIdx); } { return (*this)(featureIdx); }
protected: protected:
virtual void computeChannels( int i, InputArray img ); virtual void computeChannels( int i, InputArray img ) CV_OVERRIDE;
virtual void computeOptFeatures(); virtual void computeOptFeatures() CV_OVERRIDE;
Ptr<std::vector<Feature> > features; Ptr<std::vector<Feature> > features;
Ptr<std::vector<OptFeature> > optfeatures; Ptr<std::vector<OptFeature> > optfeatures;
...@@ -403,7 +403,7 @@ inline float HaarEvaluator::OptFeature :: calc( const int* ptr ) const ...@@ -403,7 +403,7 @@ inline float HaarEvaluator::OptFeature :: calc( const int* ptr ) const
//---------------------------------------------- LBPEvaluator ------------------------------------- //---------------------------------------------- LBPEvaluator -------------------------------------
class LBPEvaluator : public FeatureEvaluator class LBPEvaluator CV_FINAL : public FeatureEvaluator
{ {
public: public:
struct Feature struct Feature
...@@ -427,21 +427,21 @@ public: ...@@ -427,21 +427,21 @@ public:
}; };
LBPEvaluator(); LBPEvaluator();
virtual ~LBPEvaluator(); virtual ~LBPEvaluator() CV_OVERRIDE;
virtual bool read( const FileNode& node, Size origWinSize ); virtual bool read( const FileNode& node, Size origWinSize ) CV_OVERRIDE;
virtual Ptr<FeatureEvaluator> clone() const; virtual Ptr<FeatureEvaluator> clone() const CV_OVERRIDE;
virtual int getFeatureType() const { return FeatureEvaluator::LBP; } virtual int getFeatureType() const CV_OVERRIDE { return FeatureEvaluator::LBP; }
virtual bool setWindow(Point p, int scaleIdx); virtual bool setWindow(Point p, int scaleIdx) CV_OVERRIDE;
int operator()(int featureIdx) const int operator()(int featureIdx) const
{ return optfeaturesPtr[featureIdx].calc(pwin); } { return optfeaturesPtr[featureIdx].calc(pwin); }
virtual int calcCat(int featureIdx) const virtual int calcCat(int featureIdx) const CV_OVERRIDE
{ return (*this)(featureIdx); } { return (*this)(featureIdx); }
protected: protected:
virtual void computeChannels( int i, InputArray img ); virtual void computeChannels( int i, InputArray img ) CV_OVERRIDE;
virtual void computeOptFeatures(); virtual void computeOptFeatures() CV_OVERRIDE;
Ptr<std::vector<Feature> > features; Ptr<std::vector<Feature> > features;
Ptr<std::vector<OptFeature> > optfeatures; Ptr<std::vector<OptFeature> > optfeatures;
......
...@@ -957,7 +957,7 @@ public: ...@@ -957,7 +957,7 @@ public:
mtx = _mtx; mtx = _mtx;
} }
void operator()( const Range& range ) const void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
...@@ -1137,7 +1137,7 @@ public: ...@@ -1137,7 +1137,7 @@ public:
mtx = _mtx; mtx = _mtx;
} }
void operator()( const Range& range ) const void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
......
...@@ -1793,7 +1793,7 @@ public: ...@@ -1793,7 +1793,7 @@ public:
mtx = _mtx; mtx = _mtx;
} }
void operator()( const Range& range ) const void operator()(const Range& range) const CV_OVERRIDE
{ {
int i, i1 = range.start, i2 = range.end; int i, i1 = range.start, i2 = range.end;
double minScale = i1 > 0 ? levelScale[i1] : i2 > 1 ? levelScale[i1+1] : std::max(img.cols, img.rows); double minScale = i1 > 0 ? levelScale[i1] : i2 > 1 ? levelScale[i1+1] : std::max(img.cols, img.rows);
...@@ -3501,7 +3501,7 @@ public: ...@@ -3501,7 +3501,7 @@ public:
mtx = _mtx; mtx = _mtx;
} }
void operator()( const Range& range ) const void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
......
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