mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-18 08:44:11 +08:00
tracking: apply CV_OVERRIDE/CV_FINAL
This commit is contained in:
@@ -145,8 +145,8 @@ class CvFeatureParams : public CvParams
|
||||
};
|
||||
CvFeatureParams();
|
||||
virtual void init( const CvFeatureParams& fp );
|
||||
virtual void write( FileStorage &fs ) const;
|
||||
virtual bool read( const FileNode &node );
|
||||
virtual void write( FileStorage &fs ) const CV_OVERRIDE;
|
||||
virtual bool read( const FileNode &node ) CV_OVERRIDE;
|
||||
static Ptr<CvFeatureParams> create( int featureType );
|
||||
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
|
||||
@@ -201,13 +201,13 @@ class CvHaarFeatureParams : public CvFeatureParams
|
||||
|
||||
CvHaarFeatureParams();
|
||||
|
||||
virtual void init( const CvFeatureParams& fp );
|
||||
virtual void write( FileStorage &fs ) const;
|
||||
virtual bool read( const FileNode &node );
|
||||
virtual void init( const CvFeatureParams& fp ) CV_OVERRIDE;
|
||||
virtual void write( FileStorage &fs ) const CV_OVERRIDE;
|
||||
virtual bool read( const FileNode &node ) CV_OVERRIDE;
|
||||
|
||||
virtual void printDefaults() const;
|
||||
virtual void printAttrs() const;
|
||||
virtual bool scanAttr( const std::string prm, const std::string val );
|
||||
virtual void printDefaults() const CV_OVERRIDE;
|
||||
virtual void printAttrs() const CV_OVERRIDE;
|
||||
virtual bool scanAttr( const std::string prm, const std::string val ) CV_OVERRIDE;
|
||||
|
||||
bool isIntegral;
|
||||
};
|
||||
@@ -251,10 +251,10 @@ class CvHaarEvaluator : public CvFeatureEvaluator
|
||||
|
||||
};
|
||||
|
||||
virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize );
|
||||
virtual void setImage( const Mat& img, uchar clsLabel = 0, int idx = 1 );
|
||||
virtual float operator()( int featureIdx, int sampleIdx );
|
||||
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const;
|
||||
virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize ) CV_OVERRIDE;
|
||||
virtual void setImage( const Mat& img, uchar clsLabel = 0, int idx = 1 ) CV_OVERRIDE;
|
||||
virtual float operator()( int featureIdx, int sampleIdx ) CV_OVERRIDE;
|
||||
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const CV_OVERRIDE;
|
||||
void writeFeature( FileStorage &fs ) const; // for old file format
|
||||
const std::vector<CvHaarEvaluator::FeatureHaar>& getFeatures() const;
|
||||
inline CvHaarEvaluator::FeatureHaar& getFeatures( int idx )
|
||||
@@ -263,7 +263,7 @@ class CvHaarEvaluator : public CvFeatureEvaluator
|
||||
}
|
||||
void setWinSize( Size patchSize );
|
||||
Size setWinSize() const;
|
||||
virtual void generateFeatures();
|
||||
virtual void generateFeatures() CV_OVERRIDE;
|
||||
|
||||
/**
|
||||
* TODO new method
|
||||
@@ -300,12 +300,12 @@ class CvHOGEvaluator : public CvFeatureEvaluator
|
||||
virtual ~CvHOGEvaluator()
|
||||
{
|
||||
}
|
||||
virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize );
|
||||
virtual void setImage( const Mat& img, uchar clsLabel, int idx );
|
||||
virtual float operator()( int varIdx, int sampleIdx );
|
||||
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const;
|
||||
virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize ) CV_OVERRIDE;
|
||||
virtual void setImage( const Mat& img, uchar clsLabel, int idx ) CV_OVERRIDE;
|
||||
virtual float operator()( int varIdx, int sampleIdx ) CV_OVERRIDE;
|
||||
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const CV_OVERRIDE;
|
||||
protected:
|
||||
virtual void generateFeatures();
|
||||
virtual void generateFeatures() CV_OVERRIDE;
|
||||
virtual void integralHistogram( const Mat &img, std::vector<Mat> &histogram, Mat &norm, int nbins ) const;
|
||||
class Feature
|
||||
{
|
||||
@@ -364,18 +364,18 @@ struct CvLBPFeatureParams : CvFeatureParams
|
||||
class CvLBPEvaluator : public CvFeatureEvaluator
|
||||
{
|
||||
public:
|
||||
virtual ~CvLBPEvaluator()
|
||||
virtual ~CvLBPEvaluator() CV_OVERRIDE
|
||||
{
|
||||
}
|
||||
virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize );
|
||||
virtual void setImage( const Mat& img, uchar clsLabel, int idx );
|
||||
virtual float operator()( int featureIdx, int sampleIdx )
|
||||
virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize ) CV_OVERRIDE;
|
||||
virtual void setImage( const Mat& img, uchar clsLabel, int idx ) CV_OVERRIDE;
|
||||
virtual float operator()( int featureIdx, int sampleIdx ) CV_OVERRIDE
|
||||
{
|
||||
return (float) features[featureIdx].calc( sum, sampleIdx );
|
||||
}
|
||||
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const;
|
||||
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const CV_OVERRIDE;
|
||||
protected:
|
||||
virtual void generateFeatures();
|
||||
virtual void generateFeatures() CV_OVERRIDE;
|
||||
|
||||
class Feature
|
||||
{
|
||||
|
@@ -525,7 +525,7 @@ class CV_EXPORTS_W Tracker : public virtual Algorithm
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~Tracker();
|
||||
virtual ~Tracker() CV_OVERRIDE;
|
||||
|
||||
/** @brief Initialize the tracker with a known bounding box that surrounded the target
|
||||
@param image The initial frame
|
||||
@@ -546,8 +546,8 @@ class CV_EXPORTS_W Tracker : public virtual Algorithm
|
||||
*/
|
||||
CV_WRAP bool update( InputArray image, CV_OUT Rect2d& boundingBox );
|
||||
|
||||
virtual void read( const FileNode& fn )=0;
|
||||
virtual void write( FileStorage& fs ) const=0;
|
||||
virtual void read( const FileNode& fn ) CV_OVERRIDE = 0;
|
||||
virtual void write( FileStorage& fs ) const CV_OVERRIDE = 0;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -627,8 +627,8 @@ class CV_EXPORTS TrackerStateEstimatorMILBoosting : public TrackerStateEstimator
|
||||
void setCurrentConfidenceMap( ConfidenceMap& confidenceMap );
|
||||
|
||||
protected:
|
||||
Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps );
|
||||
void updateImpl( std::vector<ConfidenceMap>& confidenceMaps );
|
||||
Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
|
||||
void updateImpl( std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
uint max_idx( const std::vector<float> &v );
|
||||
@@ -732,8 +732,8 @@ class CV_EXPORTS TrackerStateEstimatorAdaBoosting : public TrackerStateEstimator
|
||||
std::vector<int> computeSwappedClassifier();
|
||||
|
||||
protected:
|
||||
Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps );
|
||||
void updateImpl( std::vector<ConfidenceMap>& confidenceMaps );
|
||||
Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
|
||||
void updateImpl( std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
|
||||
|
||||
Ptr<StrongClassifierDirectSelection> boostClassifier;
|
||||
|
||||
@@ -760,8 +760,8 @@ class CV_EXPORTS TrackerStateEstimatorSVM : public TrackerStateEstimator
|
||||
~TrackerStateEstimatorSVM();
|
||||
|
||||
protected:
|
||||
Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps );
|
||||
void updateImpl( std::vector<ConfidenceMap>& confidenceMaps );
|
||||
Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
|
||||
void updateImpl( std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
|
||||
};
|
||||
|
||||
/************************************ Specific TrackerSamplerAlgorithm Classes ************************************/
|
||||
@@ -813,7 +813,7 @@ class CV_EXPORTS TrackerSamplerCSC : public TrackerSamplerAlgorithm
|
||||
|
||||
protected:
|
||||
|
||||
bool samplingImpl( const Mat& image, Rect boundingBox, std::vector<Mat>& sample );
|
||||
bool samplingImpl( const Mat& image, Rect boundingBox, std::vector<Mat>& sample ) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
@@ -860,7 +860,7 @@ class CV_EXPORTS TrackerSamplerCS : public TrackerSamplerAlgorithm
|
||||
|
||||
~TrackerSamplerCS();
|
||||
|
||||
bool samplingImpl( const Mat& image, Rect boundingBox, std::vector<Mat>& sample );
|
||||
bool samplingImpl( const Mat& image, Rect boundingBox, std::vector<Mat>& sample ) CV_OVERRIDE;
|
||||
Rect getROI() const;
|
||||
private:
|
||||
Rect getTrackingROI( float searchFactor );
|
||||
@@ -916,7 +916,7 @@ public:
|
||||
*/
|
||||
TrackerSamplerPF(const Mat& chosenRect,const TrackerSamplerPF::Params ¶meters = TrackerSamplerPF::Params());
|
||||
protected:
|
||||
bool samplingImpl( const Mat& image, Rect boundingBox, std::vector<Mat>& sample );
|
||||
bool samplingImpl( const Mat& image, Rect boundingBox, std::vector<Mat>& sample ) CV_OVERRIDE;
|
||||
private:
|
||||
Params params;
|
||||
Ptr<MinProblemSolver> _solver;
|
||||
@@ -939,13 +939,13 @@ class CV_EXPORTS TrackerFeatureFeature2d : public TrackerFeature
|
||||
*/
|
||||
TrackerFeatureFeature2d( String detectorType, String descriptorType );
|
||||
|
||||
~TrackerFeatureFeature2d();
|
||||
~TrackerFeatureFeature2d() CV_OVERRIDE;
|
||||
|
||||
void selection( Mat& response, int npoints );
|
||||
void selection( Mat& response, int npoints ) CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
bool computeImpl( const std::vector<Mat>& images, Mat& response );
|
||||
bool computeImpl( const std::vector<Mat>& images, Mat& response ) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
@@ -961,13 +961,13 @@ class CV_EXPORTS TrackerFeatureHOG : public TrackerFeature
|
||||
|
||||
TrackerFeatureHOG();
|
||||
|
||||
~TrackerFeatureHOG();
|
||||
~TrackerFeatureHOG() CV_OVERRIDE;
|
||||
|
||||
void selection( Mat& response, int npoints );
|
||||
void selection( Mat& response, int npoints ) CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
bool computeImpl( const std::vector<Mat>& images, Mat& response );
|
||||
bool computeImpl( const std::vector<Mat>& images, Mat& response ) CV_OVERRIDE;
|
||||
|
||||
};
|
||||
|
||||
@@ -990,7 +990,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature
|
||||
*/
|
||||
TrackerFeatureHAAR( const TrackerFeatureHAAR::Params ¶meters = TrackerFeatureHAAR::Params() );
|
||||
|
||||
~TrackerFeatureHAAR();
|
||||
~TrackerFeatureHAAR() CV_OVERRIDE;
|
||||
|
||||
/** @brief Compute the features only for the selected indices in the images collection
|
||||
@param selFeatures indices of selected features
|
||||
@@ -1005,7 +1005,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature
|
||||
|
||||
@note This method modifies the response parameter
|
||||
*/
|
||||
void selection( Mat& response, int npoints );
|
||||
void selection( Mat& response, int npoints ) CV_OVERRIDE;
|
||||
|
||||
/** @brief Swap the feature in position source with the feature in position target
|
||||
@param source The source position
|
||||
@@ -1025,7 +1025,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature
|
||||
CvHaarEvaluator::FeatureHaar& getFeatureAt( int id );
|
||||
|
||||
protected:
|
||||
bool computeImpl( const std::vector<Mat>& images, Mat& response );
|
||||
bool computeImpl( const std::vector<Mat>& images, Mat& response ) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
@@ -1044,11 +1044,11 @@ class CV_EXPORTS TrackerFeatureLBP : public TrackerFeature
|
||||
|
||||
~TrackerFeatureLBP();
|
||||
|
||||
void selection( Mat& response, int npoints );
|
||||
void selection( Mat& response, int npoints ) CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
bool computeImpl( const std::vector<Mat>& images, Mat& response );
|
||||
bool computeImpl( const std::vector<Mat>& images, Mat& response ) CV_OVERRIDE;
|
||||
|
||||
};
|
||||
|
||||
@@ -1088,7 +1088,7 @@ class CV_EXPORTS_W TrackerMIL : public Tracker
|
||||
|
||||
CV_WRAP static Ptr<TrackerMIL> create();
|
||||
|
||||
virtual ~TrackerMIL() {}
|
||||
virtual ~TrackerMIL() CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
/** @brief This is a real-time object tracking based on a novel on-line version of the AdaBoost algorithm.
|
||||
@@ -1125,7 +1125,7 @@ class CV_EXPORTS_W TrackerBoosting : public Tracker
|
||||
|
||||
CV_WRAP static Ptr<TrackerBoosting> create();
|
||||
|
||||
virtual ~TrackerBoosting() {}
|
||||
virtual ~TrackerBoosting() CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
/** @brief Median Flow tracker implementation.
|
||||
@@ -1164,7 +1164,7 @@ class CV_EXPORTS_W TrackerMedianFlow : public Tracker
|
||||
|
||||
CV_WRAP static Ptr<TrackerMedianFlow> create();
|
||||
|
||||
virtual ~TrackerMedianFlow() {}
|
||||
virtual ~TrackerMedianFlow() CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
/** @brief TLD is a novel tracking framework that explicitly decomposes the long-term tracking task into
|
||||
@@ -1195,7 +1195,7 @@ class CV_EXPORTS_W TrackerTLD : public Tracker
|
||||
|
||||
CV_WRAP static Ptr<TrackerTLD> create();
|
||||
|
||||
virtual ~TrackerTLD() {}
|
||||
virtual ~TrackerTLD() CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
/** @brief KCF is a novel tracking framework that utilizes properties of circulant matrix to enhance the processing speed.
|
||||
@@ -1261,7 +1261,7 @@ public:
|
||||
|
||||
CV_WRAP static Ptr<TrackerKCF> create();
|
||||
|
||||
virtual ~TrackerKCF() {}
|
||||
virtual ~TrackerKCF() CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
/** @brief GOTURN (@cite GOTURN) is kind of trackers based on Convolutional Neural Networks (CNN). While taking all advantages of CNN trackers,
|
||||
@@ -1294,7 +1294,7 @@ public:
|
||||
|
||||
CV_WRAP static Ptr<TrackerGOTURN> create();
|
||||
|
||||
virtual ~TrackerGOTURN() {}
|
||||
virtual ~TrackerGOTURN() CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
/** @brief the MOSSE tracker
|
||||
@@ -1309,7 +1309,7 @@ class CV_EXPORTS_W TrackerMOSSE : public Tracker
|
||||
*/
|
||||
CV_WRAP static Ptr<TrackerMOSSE> create();
|
||||
|
||||
virtual ~TrackerMOSSE() {}
|
||||
virtual ~TrackerMOSSE() CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
|
||||
@@ -1330,7 +1330,7 @@ public:
|
||||
/**
|
||||
* \brief Destructor
|
||||
*/
|
||||
~MultiTracker();
|
||||
~MultiTracker() CV_OVERRIDE;
|
||||
|
||||
/**
|
||||
* \brief Add a new object to be tracked.
|
||||
@@ -1524,7 +1524,7 @@ public:
|
||||
|
||||
virtual void setInitialMask(const Mat mask) = 0;
|
||||
|
||||
virtual ~TrackerCSRT() {}
|
||||
virtual ~TrackerCSRT() CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
} /* namespace cv */
|
||||
|
Reference in New Issue
Block a user