Commit 874edea9 authored by Alexander Alekhin's avatar Alexander Alekhin

tracking: apply CV_OVERRIDE/CV_FINAL

parent e4c8510e
...@@ -145,8 +145,8 @@ class CvFeatureParams : public CvParams ...@@ -145,8 +145,8 @@ class CvFeatureParams : public CvParams
}; };
CvFeatureParams(); CvFeatureParams();
virtual void init( const CvFeatureParams& fp ); virtual void init( const CvFeatureParams& fp );
virtual void write( FileStorage &fs ) const; virtual void write( FileStorage &fs ) const CV_OVERRIDE;
virtual bool read( const FileNode &node ); virtual bool read( const FileNode &node ) CV_OVERRIDE;
static Ptr<CvFeatureParams> create( int featureType ); static Ptr<CvFeatureParams> create( int featureType );
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
...@@ -201,13 +201,13 @@ class CvHaarFeatureParams : public CvFeatureParams ...@@ -201,13 +201,13 @@ class CvHaarFeatureParams : public CvFeatureParams
CvHaarFeatureParams(); CvHaarFeatureParams();
virtual void init( const CvFeatureParams& fp ); virtual void init( const CvFeatureParams& fp ) CV_OVERRIDE;
virtual void write( FileStorage &fs ) const; virtual void write( FileStorage &fs ) const CV_OVERRIDE;
virtual bool read( const FileNode &node ); virtual bool read( const FileNode &node ) CV_OVERRIDE;
virtual void printDefaults() const; virtual void printDefaults() const CV_OVERRIDE;
virtual void printAttrs() const; virtual void printAttrs() const CV_OVERRIDE;
virtual bool scanAttr( const std::string prm, const std::string val ); virtual bool scanAttr( const std::string prm, const std::string val ) CV_OVERRIDE;
bool isIntegral; bool isIntegral;
}; };
...@@ -251,10 +251,10 @@ class CvHaarEvaluator : public CvFeatureEvaluator ...@@ -251,10 +251,10 @@ class CvHaarEvaluator : public CvFeatureEvaluator
}; };
virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize ); virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize ) CV_OVERRIDE;
virtual void setImage( const Mat& img, uchar clsLabel = 0, int idx = 1 ); virtual void setImage( const Mat& img, uchar clsLabel = 0, int idx = 1 ) CV_OVERRIDE;
virtual float operator()( int featureIdx, int sampleIdx ); virtual float operator()( int featureIdx, int sampleIdx ) CV_OVERRIDE;
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const; virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const CV_OVERRIDE;
void writeFeature( FileStorage &fs ) const; // for old file format void writeFeature( FileStorage &fs ) const; // for old file format
const std::vector<CvHaarEvaluator::FeatureHaar>& getFeatures() const; const std::vector<CvHaarEvaluator::FeatureHaar>& getFeatures() const;
inline CvHaarEvaluator::FeatureHaar& getFeatures( int idx ) inline CvHaarEvaluator::FeatureHaar& getFeatures( int idx )
...@@ -263,7 +263,7 @@ class CvHaarEvaluator : public CvFeatureEvaluator ...@@ -263,7 +263,7 @@ class CvHaarEvaluator : public CvFeatureEvaluator
} }
void setWinSize( Size patchSize ); void setWinSize( Size patchSize );
Size setWinSize() const; Size setWinSize() const;
virtual void generateFeatures(); virtual void generateFeatures() CV_OVERRIDE;
/** /**
* TODO new method * TODO new method
...@@ -300,12 +300,12 @@ class CvHOGEvaluator : public CvFeatureEvaluator ...@@ -300,12 +300,12 @@ class CvHOGEvaluator : public CvFeatureEvaluator
virtual ~CvHOGEvaluator() virtual ~CvHOGEvaluator()
{ {
} }
virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize ); virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize ) CV_OVERRIDE;
virtual void setImage( const Mat& img, uchar clsLabel, int idx ); virtual void setImage( const Mat& img, uchar clsLabel, int idx ) CV_OVERRIDE;
virtual float operator()( int varIdx, int sampleIdx ); virtual float operator()( int varIdx, int sampleIdx ) CV_OVERRIDE;
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const; virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const CV_OVERRIDE;
protected: protected:
virtual void generateFeatures(); virtual void generateFeatures() CV_OVERRIDE;
virtual void integralHistogram( const Mat &img, std::vector<Mat> &histogram, Mat &norm, int nbins ) const; virtual void integralHistogram( const Mat &img, std::vector<Mat> &histogram, Mat &norm, int nbins ) const;
class Feature class Feature
{ {
...@@ -364,18 +364,18 @@ struct CvLBPFeatureParams : CvFeatureParams ...@@ -364,18 +364,18 @@ struct CvLBPFeatureParams : CvFeatureParams
class CvLBPEvaluator : public CvFeatureEvaluator class CvLBPEvaluator : public CvFeatureEvaluator
{ {
public: public:
virtual ~CvLBPEvaluator() virtual ~CvLBPEvaluator() CV_OVERRIDE
{ {
} }
virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize ); virtual void init( const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize ) CV_OVERRIDE;
virtual void setImage( const Mat& img, uchar clsLabel, int idx ); virtual void setImage( const Mat& img, uchar clsLabel, int idx ) CV_OVERRIDE;
virtual float operator()( int featureIdx, int sampleIdx ) virtual float operator()( int featureIdx, int sampleIdx ) CV_OVERRIDE
{ {
return (float) features[featureIdx].calc( sum, sampleIdx ); 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: protected:
virtual void generateFeatures(); virtual void generateFeatures() CV_OVERRIDE;
class Feature class Feature
{ {
......
...@@ -525,7 +525,7 @@ class CV_EXPORTS_W Tracker : public virtual Algorithm ...@@ -525,7 +525,7 @@ class CV_EXPORTS_W Tracker : public virtual Algorithm
{ {
public: public:
virtual ~Tracker(); virtual ~Tracker() CV_OVERRIDE;
/** @brief Initialize the tracker with a known bounding box that surrounded the target /** @brief Initialize the tracker with a known bounding box that surrounded the target
@param image The initial frame @param image The initial frame
...@@ -546,8 +546,8 @@ class CV_EXPORTS_W Tracker : public virtual Algorithm ...@@ -546,8 +546,8 @@ class CV_EXPORTS_W Tracker : public virtual Algorithm
*/ */
CV_WRAP bool update( InputArray image, CV_OUT Rect2d& boundingBox ); CV_WRAP bool update( InputArray image, CV_OUT Rect2d& boundingBox );
virtual void read( const FileNode& fn )=0; virtual void read( const FileNode& fn ) CV_OVERRIDE = 0;
virtual void write( FileStorage& fs ) const=0; virtual void write( FileStorage& fs ) const CV_OVERRIDE = 0;
protected: protected:
...@@ -627,8 +627,8 @@ class CV_EXPORTS TrackerStateEstimatorMILBoosting : public TrackerStateEstimator ...@@ -627,8 +627,8 @@ class CV_EXPORTS TrackerStateEstimatorMILBoosting : public TrackerStateEstimator
void setCurrentConfidenceMap( ConfidenceMap& confidenceMap ); void setCurrentConfidenceMap( ConfidenceMap& confidenceMap );
protected: protected:
Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps ); Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
void updateImpl( std::vector<ConfidenceMap>& confidenceMaps ); void updateImpl( std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
private: private:
uint max_idx( const std::vector<float> &v ); uint max_idx( const std::vector<float> &v );
...@@ -732,8 +732,8 @@ class CV_EXPORTS TrackerStateEstimatorAdaBoosting : public TrackerStateEstimator ...@@ -732,8 +732,8 @@ class CV_EXPORTS TrackerStateEstimatorAdaBoosting : public TrackerStateEstimator
std::vector<int> computeSwappedClassifier(); std::vector<int> computeSwappedClassifier();
protected: protected:
Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps ); Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
void updateImpl( std::vector<ConfidenceMap>& confidenceMaps ); void updateImpl( std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
Ptr<StrongClassifierDirectSelection> boostClassifier; Ptr<StrongClassifierDirectSelection> boostClassifier;
...@@ -760,8 +760,8 @@ class CV_EXPORTS TrackerStateEstimatorSVM : public TrackerStateEstimator ...@@ -760,8 +760,8 @@ class CV_EXPORTS TrackerStateEstimatorSVM : public TrackerStateEstimator
~TrackerStateEstimatorSVM(); ~TrackerStateEstimatorSVM();
protected: protected:
Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps ); Ptr<TrackerTargetState> estimateImpl( const std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
void updateImpl( std::vector<ConfidenceMap>& confidenceMaps ); void updateImpl( std::vector<ConfidenceMap>& confidenceMaps ) CV_OVERRIDE;
}; };
/************************************ Specific TrackerSamplerAlgorithm Classes ************************************/ /************************************ Specific TrackerSamplerAlgorithm Classes ************************************/
...@@ -813,7 +813,7 @@ class CV_EXPORTS TrackerSamplerCSC : public TrackerSamplerAlgorithm ...@@ -813,7 +813,7 @@ class CV_EXPORTS TrackerSamplerCSC : public TrackerSamplerAlgorithm
protected: 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: private:
...@@ -860,7 +860,7 @@ class CV_EXPORTS TrackerSamplerCS : public TrackerSamplerAlgorithm ...@@ -860,7 +860,7 @@ class CV_EXPORTS TrackerSamplerCS : public TrackerSamplerAlgorithm
~TrackerSamplerCS(); ~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; Rect getROI() const;
private: private:
Rect getTrackingROI( float searchFactor ); Rect getTrackingROI( float searchFactor );
...@@ -916,7 +916,7 @@ public: ...@@ -916,7 +916,7 @@ public:
*/ */
TrackerSamplerPF(const Mat& chosenRect,const TrackerSamplerPF::Params &parameters = TrackerSamplerPF::Params()); TrackerSamplerPF(const Mat& chosenRect,const TrackerSamplerPF::Params &parameters = TrackerSamplerPF::Params());
protected: 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: private:
Params params; Params params;
Ptr<MinProblemSolver> _solver; Ptr<MinProblemSolver> _solver;
...@@ -939,13 +939,13 @@ class CV_EXPORTS TrackerFeatureFeature2d : public TrackerFeature ...@@ -939,13 +939,13 @@ class CV_EXPORTS TrackerFeatureFeature2d : public TrackerFeature
*/ */
TrackerFeatureFeature2d( String detectorType, String descriptorType ); TrackerFeatureFeature2d( String detectorType, String descriptorType );
~TrackerFeatureFeature2d(); ~TrackerFeatureFeature2d() CV_OVERRIDE;
void selection( Mat& response, int npoints ); void selection( Mat& response, int npoints ) CV_OVERRIDE;
protected: protected:
bool computeImpl( const std::vector<Mat>& images, Mat& response ); bool computeImpl( const std::vector<Mat>& images, Mat& response ) CV_OVERRIDE;
private: private:
...@@ -961,13 +961,13 @@ class CV_EXPORTS TrackerFeatureHOG : public TrackerFeature ...@@ -961,13 +961,13 @@ class CV_EXPORTS TrackerFeatureHOG : public TrackerFeature
TrackerFeatureHOG(); TrackerFeatureHOG();
~TrackerFeatureHOG(); ~TrackerFeatureHOG() CV_OVERRIDE;
void selection( Mat& response, int npoints ); void selection( Mat& response, int npoints ) CV_OVERRIDE;
protected: 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 ...@@ -990,7 +990,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature
*/ */
TrackerFeatureHAAR( const TrackerFeatureHAAR::Params &parameters = TrackerFeatureHAAR::Params() ); TrackerFeatureHAAR( const TrackerFeatureHAAR::Params &parameters = TrackerFeatureHAAR::Params() );
~TrackerFeatureHAAR(); ~TrackerFeatureHAAR() CV_OVERRIDE;
/** @brief Compute the features only for the selected indices in the images collection /** @brief Compute the features only for the selected indices in the images collection
@param selFeatures indices of selected features @param selFeatures indices of selected features
...@@ -1005,7 +1005,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature ...@@ -1005,7 +1005,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature
@note This method modifies the response parameter @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 /** @brief Swap the feature in position source with the feature in position target
@param source The source position @param source The source position
...@@ -1025,7 +1025,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature ...@@ -1025,7 +1025,7 @@ class CV_EXPORTS TrackerFeatureHAAR : public TrackerFeature
CvHaarEvaluator::FeatureHaar& getFeatureAt( int id ); CvHaarEvaluator::FeatureHaar& getFeatureAt( int id );
protected: protected:
bool computeImpl( const std::vector<Mat>& images, Mat& response ); bool computeImpl( const std::vector<Mat>& images, Mat& response ) CV_OVERRIDE;
private: private:
...@@ -1044,11 +1044,11 @@ class CV_EXPORTS TrackerFeatureLBP : public TrackerFeature ...@@ -1044,11 +1044,11 @@ class CV_EXPORTS TrackerFeatureLBP : public TrackerFeature
~TrackerFeatureLBP(); ~TrackerFeatureLBP();
void selection( Mat& response, int npoints ); void selection( Mat& response, int npoints ) CV_OVERRIDE;
protected: 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 ...@@ -1088,7 +1088,7 @@ class CV_EXPORTS_W TrackerMIL : public Tracker
CV_WRAP static Ptr<TrackerMIL> create(); 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. /** @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 ...@@ -1125,7 +1125,7 @@ class CV_EXPORTS_W TrackerBoosting : public Tracker
CV_WRAP static Ptr<TrackerBoosting> create(); CV_WRAP static Ptr<TrackerBoosting> create();
virtual ~TrackerBoosting() {} virtual ~TrackerBoosting() CV_OVERRIDE {}
}; };
/** @brief Median Flow tracker implementation. /** @brief Median Flow tracker implementation.
...@@ -1164,7 +1164,7 @@ class CV_EXPORTS_W TrackerMedianFlow : public Tracker ...@@ -1164,7 +1164,7 @@ class CV_EXPORTS_W TrackerMedianFlow : public Tracker
CV_WRAP static Ptr<TrackerMedianFlow> create(); 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 /** @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 ...@@ -1195,7 +1195,7 @@ class CV_EXPORTS_W TrackerTLD : public Tracker
CV_WRAP static Ptr<TrackerTLD> create(); 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. /** @brief KCF is a novel tracking framework that utilizes properties of circulant matrix to enhance the processing speed.
...@@ -1261,7 +1261,7 @@ public: ...@@ -1261,7 +1261,7 @@ public:
CV_WRAP static Ptr<TrackerKCF> create(); 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, /** @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: ...@@ -1294,7 +1294,7 @@ public:
CV_WRAP static Ptr<TrackerGOTURN> create(); CV_WRAP static Ptr<TrackerGOTURN> create();
virtual ~TrackerGOTURN() {} virtual ~TrackerGOTURN() CV_OVERRIDE {}
}; };
/** @brief the MOSSE tracker /** @brief the MOSSE tracker
...@@ -1309,7 +1309,7 @@ class CV_EXPORTS_W TrackerMOSSE : public Tracker ...@@ -1309,7 +1309,7 @@ class CV_EXPORTS_W TrackerMOSSE : public Tracker
*/ */
CV_WRAP static Ptr<TrackerMOSSE> create(); CV_WRAP static Ptr<TrackerMOSSE> create();
virtual ~TrackerMOSSE() {} virtual ~TrackerMOSSE() CV_OVERRIDE {}
}; };
...@@ -1330,7 +1330,7 @@ public: ...@@ -1330,7 +1330,7 @@ public:
/** /**
* \brief Destructor * \brief Destructor
*/ */
~MultiTracker(); ~MultiTracker() CV_OVERRIDE;
/** /**
* \brief Add a new object to be tracked. * \brief Add a new object to be tracked.
...@@ -1524,7 +1524,7 @@ public: ...@@ -1524,7 +1524,7 @@ public:
virtual void setInitialMask(const Mat mask) = 0; virtual void setInitialMask(const Mat mask) = 0;
virtual ~TrackerCSRT() {} virtual ~TrackerCSRT() CV_OVERRIDE {}
}; };
} /* namespace cv */ } /* namespace cv */
......
...@@ -22,7 +22,7 @@ namespace cv{ ...@@ -22,7 +22,7 @@ namespace cv{
PFSolver(); PFSolver();
void getOptParam(OutputArray params)const; void getOptParam(OutputArray params)const;
int iteration(); int iteration();
double minimize(InputOutputArray x); double minimize(InputOutputArray x) CV_OVERRIDE;
void setParticlesNum(int num); void setParticlesNum(int num);
int getParticlesNum(); int getParticlesNum();
...@@ -31,10 +31,10 @@ namespace cv{ ...@@ -31,10 +31,10 @@ namespace cv{
void getParamsSTD(OutputArray std)const; void getParamsSTD(OutputArray std)const;
void setParamsSTD(InputArray std); void setParamsSTD(InputArray std);
Ptr<MinProblemSolver::Function> getFunction() const; Ptr<MinProblemSolver::Function> getFunction() const CV_OVERRIDE;
void setFunction(const Ptr<MinProblemSolver::Function>& f); void setFunction(const Ptr<MinProblemSolver::Function>& f) CV_OVERRIDE;
TermCriteria getTermCriteria() const; TermCriteria getTermCriteria() const CV_OVERRIDE;
void setTermCriteria(const TermCriteria& termcrit); void setTermCriteria(const TermCriteria& termcrit) CV_OVERRIDE;
private: private:
Mat_<double> _std,_particles,_logweight; Mat_<double> _std,_particles,_logweight;
Ptr<MinProblemSolver::Function> _Function; Ptr<MinProblemSolver::Function> _Function;
......
...@@ -9,9 +9,9 @@ namespace cv{ ...@@ -9,9 +9,9 @@ namespace cv{
public: public:
TrackingFunctionPF(const Mat& chosenRect); TrackingFunctionPF(const Mat& chosenRect);
void update(const Mat& image); void update(const Mat& image);
int getDims() const { return 4; } int getDims() const CV_OVERRIDE { return 4; }
double calc(const double* x) const; double calc(const double* x) const CV_OVERRIDE;
void correctParams(double* pt)const; void correctParams(double* pt)const CV_OVERRIDE;
private: private:
Mat _image; Mat _image;
static inline Rect rectFromRow(const double* row); static inline Rect rectFromRow(const double* row);
......
...@@ -140,16 +140,16 @@ class AugmentedUnscentedKalmanFilterImpl: public UnscentedKalmanFilter ...@@ -140,16 +140,16 @@ class AugmentedUnscentedKalmanFilterImpl: public UnscentedKalmanFilter
public: public:
AugmentedUnscentedKalmanFilterImpl(const AugmentedUnscentedKalmanFilterParams& params); AugmentedUnscentedKalmanFilterImpl(const AugmentedUnscentedKalmanFilterParams& params);
~AugmentedUnscentedKalmanFilterImpl(); ~AugmentedUnscentedKalmanFilterImpl() CV_OVERRIDE;
Mat predict(InputArray control); Mat predict(InputArray control) CV_OVERRIDE;
Mat correct(InputArray measurement); Mat correct(InputArray measurement) CV_OVERRIDE;
Mat getProcessNoiseCov() const; Mat getProcessNoiseCov() const CV_OVERRIDE;
Mat getMeasurementNoiseCov() const; Mat getMeasurementNoiseCov() const CV_OVERRIDE;
Mat getErrorCov() const; Mat getErrorCov() const CV_OVERRIDE;
Mat getState() const; Mat getState() const CV_OVERRIDE;
}; };
......
...@@ -81,8 +81,8 @@ public: ...@@ -81,8 +81,8 @@ public:
protected: protected:
Rect2d boundingBox_; Rect2d boundingBox_;
Mat image_; Mat image_;
void modelEstimationImpl(const std::vector<Mat>&){} void modelEstimationImpl(const std::vector<Mat>&) CV_OVERRIDE {}
void modelUpdateImpl(){} void modelUpdateImpl() CV_OVERRIDE {}
}; };
TrackerGOTURNImpl::TrackerGOTURNImpl(const TrackerGOTURN::Params &parameters) : TrackerGOTURNImpl::TrackerGOTURNImpl(const TrackerGOTURN::Params &parameters) :
......
...@@ -64,10 +64,10 @@ class TrackerGOTURNImpl : public TrackerGOTURN ...@@ -64,10 +64,10 @@ class TrackerGOTURNImpl : public TrackerGOTURN
{ {
public: public:
TrackerGOTURNImpl(const TrackerGOTURN::Params &parameters = TrackerGOTURN::Params()); TrackerGOTURNImpl(const TrackerGOTURN::Params &parameters = TrackerGOTURN::Params());
void read(const FileNode& fn); void read(const FileNode& fn) CV_OVERRIDE;
void write(FileStorage& fs) const; void write(FileStorage& fs) const CV_OVERRIDE;
bool initImpl(const Mat& image, const Rect2d& boundingBox); bool initImpl(const Mat& image, const Rect2d& boundingBox) CV_OVERRIDE;
bool updateImpl(const Mat& image, Rect2d& boundingBox); bool updateImpl(const Mat& image, Rect2d& boundingBox) CV_OVERRIDE;
TrackerGOTURN::Params params; TrackerGOTURN::Params params;
......
...@@ -20,8 +20,8 @@ namespace tracking { ...@@ -20,8 +20,8 @@ namespace tracking {
struct DummyModel : TrackerModel struct DummyModel : TrackerModel
{ {
virtual void modelUpdateImpl(){} virtual void modelUpdateImpl() CV_OVERRIDE {}
virtual void modelEstimationImpl( const std::vector<Mat>& ){} virtual void modelEstimationImpl( const std::vector<Mat>& ) CV_OVERRIDE {}
}; };
...@@ -30,7 +30,7 @@ const double rate=0.2; // learning rate ...@@ -30,7 +30,7 @@ const double rate=0.2; // learning rate
const double psrThreshold=5.7; // no detection, if PSR is smaller than this const double psrThreshold=5.7; // no detection, if PSR is smaller than this
struct MosseImpl : TrackerMOSSE struct MosseImpl CV_FINAL : TrackerMOSSE
{ {
protected: protected:
...@@ -130,7 +130,7 @@ protected: ...@@ -130,7 +130,7 @@ protected:
} }
virtual bool initImpl( const Mat& image, const Rect2d& boundingBox ) virtual bool initImpl( const Mat& image, const Rect2d& boundingBox ) CV_OVERRIDE
{ {
model = makePtr<DummyModel>(); model = makePtr<DummyModel>();
...@@ -183,7 +183,7 @@ protected: ...@@ -183,7 +183,7 @@ protected:
return true; return true;
} }
virtual bool updateImpl( const Mat& image, Rect2d& boundingBox ) virtual bool updateImpl( const Mat& image, Rect2d& boundingBox ) CV_OVERRIDE
{ {
if (H.empty()) // not initialized if (H.empty()) // not initialized
return false; return false;
...@@ -232,8 +232,8 @@ public: ...@@ -232,8 +232,8 @@ public:
MosseImpl() { isInit = 0; } MosseImpl() { isInit = 0; }
// dummy implementation. // dummy implementation.
virtual void read( const FileNode& ){} virtual void read( const FileNode& ) CV_OVERRIDE {}
virtual void write( FileStorage& ) const{} virtual void write( FileStorage& ) const CV_OVERRIDE {}
}; // MosseImpl }; // MosseImpl
......
...@@ -337,7 +337,7 @@ namespace cv ...@@ -337,7 +337,7 @@ namespace cv
{ {
} }
virtual void operator () (const cv::Range & r) const virtual void operator () (const cv::Range & r) const CV_OVERRIDE
{ {
for (int ind = r.start; ind < r.end; ++ind) for (int ind = r.start; ind < r.end; ++ind)
{ {
......
...@@ -195,7 +195,7 @@ namespace cv ...@@ -195,7 +195,7 @@ namespace cv
{ {
} }
virtual void operator () (const cv::Range & r) const virtual void operator () (const cv::Range & r) const CV_OVERRIDE
{ {
for (int ind = r.start; ind < r.end; ++ind) for (int ind = r.start; ind < r.end; ++ind)
{ {
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#ifndef OPENCV_TLD_MODEL #ifndef OPENCV_TLD_MODEL
#define OPENCV_TLD_MODEL #define OPENCV_TLD_MODEL
#include "precomp.hpp"
#include "tldDetector.hpp" #include "tldDetector.hpp"
#include "tldUtils.hpp" #include "tldUtils.hpp"
...@@ -79,8 +78,8 @@ namespace cv ...@@ -79,8 +78,8 @@ namespace cv
Size minSize_; Size minSize_;
TrackerTLD::Params params_; TrackerTLD::Params params_;
void pushIntoModel(const Mat_<uchar>& example, bool positive); void pushIntoModel(const Mat_<uchar>& example, bool positive);
void modelEstimationImpl(const std::vector<Mat>& /*responses*/){} void modelEstimationImpl(const std::vector<Mat>& /*responses*/) CV_OVERRIDE {}
void modelUpdateImpl(){} void modelUpdateImpl() CV_OVERRIDE {}
Rect2d boundingBox_; Rect2d boundingBox_;
RNG rng; RNG rng;
}; };
......
...@@ -96,12 +96,12 @@ class TrackerProxyImpl : public TrackerProxy ...@@ -96,12 +96,12 @@ class TrackerProxyImpl : public TrackerProxy
{ {
public: public:
TrackerProxyImpl(Tparams params = Tparams()) :params_(params){} TrackerProxyImpl(Tparams params = Tparams()) :params_(params){}
bool init(const Mat& image, const Rect2d& boundingBox) bool init(const Mat& image, const Rect2d& boundingBox) CV_OVERRIDE
{ {
trackerPtr = T::create(); trackerPtr = T::create();
return trackerPtr->init(image, boundingBox); return trackerPtr->init(image, boundingBox);
} }
bool update(const Mat& image, Rect2d& boundingBox) bool update(const Mat& image, Rect2d& boundingBox) CV_OVERRIDE
{ {
return trackerPtr->update(image, boundingBox); return trackerPtr->update(image, boundingBox);
} }
...@@ -119,8 +119,8 @@ class TrackerTLDImpl : public TrackerTLD ...@@ -119,8 +119,8 @@ class TrackerTLDImpl : public TrackerTLD
{ {
public: public:
TrackerTLDImpl(const TrackerTLD::Params &parameters = TrackerTLD::Params()); TrackerTLDImpl(const TrackerTLD::Params &parameters = TrackerTLD::Params());
void read(const FileNode& fn); void read(const FileNode& fn) CV_OVERRIDE;
void write(FileStorage& fs) const; void write(FileStorage& fs) const CV_OVERRIDE;
Ptr<TrackerModel> getModel() Ptr<TrackerModel> getModel()
{ {
...@@ -136,7 +136,7 @@ public: ...@@ -136,7 +136,7 @@ public:
bool operator()(Rect2d /*box*/){ return false; } bool operator()(Rect2d /*box*/){ return false; }
int additionalExamples(std::vector<Mat_<uchar> >& examplesForModel, std::vector<Mat_<uchar> >& examplesForEnsemble); int additionalExamples(std::vector<Mat_<uchar> >& examplesForModel, std::vector<Mat_<uchar> >& examplesForEnsemble);
protected: protected:
Pexpert(){} Pexpert() : detector_(NULL) {}
Mat img_, imgBlurred_; Mat img_, imgBlurred_;
Rect2d resultBox_; Rect2d resultBox_;
const TLDDetector* detector_; const TLDDetector* detector_;
...@@ -159,8 +159,8 @@ public: ...@@ -159,8 +159,8 @@ public:
} }
}; };
bool initImpl(const Mat& image, const Rect2d& boundingBox); bool initImpl(const Mat& image, const Rect2d& boundingBox) CV_OVERRIDE;
bool updateImpl(const Mat& image, Rect2d& boundingBox); bool updateImpl(const Mat& image, Rect2d& boundingBox) CV_OVERRIDE;
TrackerTLD::Params params; TrackerTLD::Params params;
Ptr<Data> data; Ptr<Data> data;
......
...@@ -49,13 +49,13 @@ class TrackerBoostingImpl : public TrackerBoosting ...@@ -49,13 +49,13 @@ class TrackerBoostingImpl : public TrackerBoosting
{ {
public: public:
TrackerBoostingImpl( const TrackerBoosting::Params &parameters = TrackerBoosting::Params() ); TrackerBoostingImpl( const TrackerBoosting::Params &parameters = TrackerBoosting::Params() );
void read( const FileNode& fn ); void read( const FileNode& fn ) CV_OVERRIDE;
void write( FileStorage& fs ) const; void write( FileStorage& fs ) const CV_OVERRIDE;
protected: protected:
bool initImpl( const Mat& image, const Rect2d& boundingBox ); bool initImpl( const Mat& image, const Rect2d& boundingBox ) CV_OVERRIDE;
bool updateImpl( const Mat& image, Rect2d& boundingBox ); bool updateImpl( const Mat& image, Rect2d& boundingBox ) CV_OVERRIDE;
TrackerBoosting::Params params; TrackerBoosting::Params params;
}; };
......
...@@ -93,8 +93,8 @@ class TrackerBoostingModel : public TrackerModel ...@@ -93,8 +93,8 @@ class TrackerBoostingModel : public TrackerModel
std::vector<int> getSelectedWeakClassifier(); std::vector<int> getSelectedWeakClassifier();
protected: protected:
void modelEstimationImpl( const std::vector<Mat>& responses ); void modelEstimationImpl( const std::vector<Mat>& responses ) CV_OVERRIDE;
void modelUpdateImpl(); void modelUpdateImpl() CV_OVERRIDE;
private: private:
......
...@@ -19,8 +19,8 @@ public: ...@@ -19,8 +19,8 @@ public:
TrackerCSRTModel(TrackerCSRT::Params /*params*/){} TrackerCSRTModel(TrackerCSRT::Params /*params*/){}
~TrackerCSRTModel(){} ~TrackerCSRTModel(){}
protected: protected:
void modelEstimationImpl(const std::vector<Mat>& /*responses*/){} void modelEstimationImpl(const std::vector<Mat>& /*responses*/) CV_OVERRIDE {}
void modelUpdateImpl(){} void modelUpdateImpl() CV_OVERRIDE {}
}; };
...@@ -28,15 +28,15 @@ class TrackerCSRTImpl : public TrackerCSRT ...@@ -28,15 +28,15 @@ class TrackerCSRTImpl : public TrackerCSRT
{ {
public: public:
TrackerCSRTImpl(const TrackerCSRT::Params &parameters = TrackerCSRT::Params()); TrackerCSRTImpl(const TrackerCSRT::Params &parameters = TrackerCSRT::Params());
void read(const FileNode& fn); void read(const FileNode& fn) CV_OVERRIDE;
void write(FileStorage& fs) const; void write(FileStorage& fs) const CV_OVERRIDE;
protected: protected:
TrackerCSRT::Params params; TrackerCSRT::Params params;
bool initImpl(const Mat& image, const Rect2d& boundingBox); bool initImpl(const Mat& image, const Rect2d& boundingBox) CV_OVERRIDE;
virtual void setInitialMask(const Mat mask); virtual void setInitialMask(const Mat mask) CV_OVERRIDE;
bool updateImpl(const Mat& image, Rect2d& boundingBox); bool updateImpl(const Mat& image, Rect2d& boundingBox) CV_OVERRIDE;
void update_csr_filter(const Mat &image, const Mat &my_mask); void update_csr_filter(const Mat &image, const Mat &my_mask);
void update_histograms(const Mat &image, const Rect &region); void update_histograms(const Mat &image, const Rect &region);
void extract_histograms(const Mat &image, cv::Rect region, Histogram &hf, Histogram &hb); void extract_histograms(const Mat &image, cv::Rect region, Histogram &hf, Histogram &hb);
...@@ -232,7 +232,7 @@ public: ...@@ -232,7 +232,7 @@ public:
this->P = P; this->P = P;
this->admm_iterations = admm_iterations; this->admm_iterations = admm_iterations;
} }
virtual void operator ()(const Range& range) const virtual void operator ()(const Range& range) const CV_OVERRIDE
{ {
for (int i = range.start; i < range.end; i++) { for (int i = range.start; i < range.end; i++) {
float mu = 5.0f; float mu = 5.0f;
......
...@@ -35,7 +35,7 @@ public: ...@@ -35,7 +35,7 @@ public:
this->col_len = col_len; this->col_len = col_len;
this->result = result; this->result = result;
} }
virtual void operator ()(const Range& range) const virtual void operator ()(const Range& range) const CV_OVERRIDE
{ {
for (int s = range.start; s < range.end; s++) { for (int s = range.start; s < range.end; s++) {
Size patch_sz = Size(static_cast<int>(current_scale * scale_factors[s] * base_target_sz.width), Size patch_sz = Size(static_cast<int>(current_scale * scale_factors[s] * base_target_sz.width),
......
...@@ -248,7 +248,7 @@ class Parallel_compute : public cv::ParallelLoopBody ...@@ -248,7 +248,7 @@ class Parallel_compute : public cv::ParallelLoopBody
//features = featureEvaluator->getFeatures(); //features = featureEvaluator->getFeatures();
} }
virtual void operator()( const cv::Range &r ) const virtual void operator()( const cv::Range &r ) const CV_OVERRIDE
{ {
for ( int jf = r.start; jf != r.end; ++jf ) for ( int jf = r.start; jf != r.end; ++jf )
{ {
......
...@@ -56,8 +56,8 @@ namespace cv{ ...@@ -56,8 +56,8 @@ namespace cv{
TrackerKCFModel(TrackerKCF::Params /*params*/){} TrackerKCFModel(TrackerKCF::Params /*params*/){}
~TrackerKCFModel(){} ~TrackerKCFModel(){}
protected: protected:
void modelEstimationImpl( const std::vector<Mat>& /*responses*/ ){} void modelEstimationImpl( const std::vector<Mat>& /*responses*/ ) CV_OVERRIDE {}
void modelUpdateImpl(){} void modelUpdateImpl() CV_OVERRIDE {}
}; };
} /* namespace cv */ } /* namespace cv */
...@@ -73,16 +73,16 @@ namespace cv{ ...@@ -73,16 +73,16 @@ namespace cv{
class TrackerKCFImpl : public TrackerKCF { class TrackerKCFImpl : public TrackerKCF {
public: public:
TrackerKCFImpl( const TrackerKCF::Params &parameters = TrackerKCF::Params() ); TrackerKCFImpl( const TrackerKCF::Params &parameters = TrackerKCF::Params() );
void read( const FileNode& /*fn*/ ); void read( const FileNode& /*fn*/ ) CV_OVERRIDE;
void write( FileStorage& /*fs*/ ) const; void write( FileStorage& /*fs*/ ) const CV_OVERRIDE;
void setFeatureExtractor(void (*f)(const Mat, const Rect, Mat&), bool pca_func = false); void setFeatureExtractor(void (*f)(const Mat, const Rect, Mat&), bool pca_func = false) CV_OVERRIDE;
protected: protected:
/* /*
* basic functions and vars * basic functions and vars
*/ */
bool initImpl( const Mat& /*image*/, const Rect2d& boundingBox ); bool initImpl( const Mat& /*image*/, const Rect2d& boundingBox ) CV_OVERRIDE;
bool updateImpl( const Mat& image, Rect2d& boundingBox ); bool updateImpl( const Mat& image, Rect2d& boundingBox ) CV_OVERRIDE;
TrackerKCF::Params params; TrackerKCF::Params params;
......
...@@ -49,13 +49,13 @@ class TrackerMILImpl : public TrackerMIL ...@@ -49,13 +49,13 @@ class TrackerMILImpl : public TrackerMIL
{ {
public: public:
TrackerMILImpl( const TrackerMIL::Params &parameters = TrackerMIL::Params() ); TrackerMILImpl( const TrackerMIL::Params &parameters = TrackerMIL::Params() );
void read( const FileNode& fn ); void read( const FileNode& fn ) CV_OVERRIDE;
void write( FileStorage& fs ) const; void write( FileStorage& fs ) const CV_OVERRIDE;
protected: protected:
bool initImpl( const Mat& image, const Rect2d& boundingBox ); bool initImpl( const Mat& image, const Rect2d& boundingBox ) CV_OVERRIDE;
bool updateImpl( const Mat& image, Rect2d& boundingBox ); bool updateImpl( const Mat& image, Rect2d& boundingBox ) CV_OVERRIDE;
void compute_integral( const Mat & img, Mat & ii_img ); void compute_integral( const Mat & img, Mat & ii_img );
TrackerMIL::Params params; TrackerMIL::Params params;
......
...@@ -87,8 +87,8 @@ class TrackerMILModel : public TrackerModel ...@@ -87,8 +87,8 @@ class TrackerMILModel : public TrackerModel
void responseToConfidenceMap( const std::vector<Mat>& responses, ConfidenceMap& confidenceMap ); void responseToConfidenceMap( const std::vector<Mat>& responses, ConfidenceMap& confidenceMap );
protected: protected:
void modelEstimationImpl( const std::vector<Mat>& responses ); void modelEstimationImpl( const std::vector<Mat>& responses ) CV_OVERRIDE;
void modelUpdateImpl(); void modelUpdateImpl() CV_OVERRIDE;
private: private:
int mode; int mode;
......
...@@ -75,11 +75,11 @@ using namespace cv; ...@@ -75,11 +75,11 @@ using namespace cv;
class TrackerMedianFlowImpl : public TrackerMedianFlow{ class TrackerMedianFlowImpl : public TrackerMedianFlow{
public: public:
TrackerMedianFlowImpl(TrackerMedianFlow::Params paramsIn = TrackerMedianFlow::Params()) {params=paramsIn;isInit=false;} TrackerMedianFlowImpl(TrackerMedianFlow::Params paramsIn = TrackerMedianFlow::Params()) {params=paramsIn;isInit=false;}
void read( const FileNode& fn ); void read( const FileNode& fn ) CV_OVERRIDE;
void write( FileStorage& fs ) const; void write( FileStorage& fs ) const CV_OVERRIDE;
private: private:
bool initImpl( const Mat& image, const Rect2d& boundingBox ); bool initImpl( const Mat& image, const Rect2d& boundingBox ) CV_OVERRIDE;
bool updateImpl( const Mat& image, Rect2d& boundingBox ); bool updateImpl( const Mat& image, Rect2d& boundingBox ) CV_OVERRIDE;
bool medianFlowImpl(Mat oldImage,Mat newImage,Rect2d& oldBox); bool medianFlowImpl(Mat oldImage,Mat newImage,Rect2d& oldBox);
Rect2d vote(const std::vector<Point2f>& oldPoints,const std::vector<Point2f>& newPoints,const Rect2d& oldRect,Point2f& mD); Rect2d vote(const std::vector<Point2f>& oldPoints,const std::vector<Point2f>& newPoints,const Rect2d& oldRect,Point2f& mD);
float dist(Point2f p1,Point2f p2); float dist(Point2f p1,Point2f p2);
...@@ -127,8 +127,8 @@ public: ...@@ -127,8 +127,8 @@ public:
protected: protected:
Rect2d boundingBox_; Rect2d boundingBox_;
Mat image_; Mat image_;
void modelEstimationImpl( const std::vector<Mat>& /*responses*/ ){} void modelEstimationImpl( const std::vector<Mat>& /*responses*/ ) CV_OVERRIDE {}
void modelUpdateImpl(){} void modelUpdateImpl() CV_OVERRIDE {}
}; };
void TrackerMedianFlowImpl::read( const cv::FileNode& fn ) void TrackerMedianFlowImpl::read( const cv::FileNode& fn )
......
...@@ -132,19 +132,19 @@ public: ...@@ -132,19 +132,19 @@ public:
// perform prediction step // perform prediction step
// control - the optional control vector, CP x 1 // control - the optional control vector, CP x 1
Mat predict( InputArray control = noArray() ); Mat predict( InputArray control = noArray() ) CV_OVERRIDE;
// perform correction step // perform correction step
// measurement - current measurement vector, MP x 1 // measurement - current measurement vector, MP x 1
Mat correct( InputArray measurement ); Mat correct( InputArray measurement ) CV_OVERRIDE;
// Get system parameters // Get system parameters
Mat getProcessNoiseCov() const; Mat getProcessNoiseCov() const CV_OVERRIDE;
Mat getMeasurementNoiseCov() const; Mat getMeasurementNoiseCov() const CV_OVERRIDE;
Mat getErrorCov() const; Mat getErrorCov() const CV_OVERRIDE;
// Get the state estimate // Get the state estimate
Mat getState() const; Mat getState() const CV_OVERRIDE;
}; };
UnscentedKalmanFilterImpl::UnscentedKalmanFilterImpl(const UnscentedKalmanFilterParams& params) UnscentedKalmanFilterImpl::UnscentedKalmanFilterImpl(const UnscentedKalmanFilterParams& params)
......
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