Commit 0854dc33 authored by Alexander Alekhin's avatar Alexander Alekhin

features2d: apply CV_OVERRIDE/CV_FINAL

parent 8f0669c3
...@@ -208,14 +208,14 @@ public: ...@@ -208,14 +208,14 @@ public:
CV_WRAP void read( const String& fileName ); CV_WRAP void read( const String& fileName );
virtual void write( FileStorage&) const; virtual void write( FileStorage&) const CV_OVERRIDE;
// see corresponding cv::Algorithm method // see corresponding cv::Algorithm method
CV_WRAP virtual void read( const FileNode&); CV_WRAP virtual void read( const FileNode&) CV_OVERRIDE;
//! Return true if detector object is empty //! Return true if detector object is empty
CV_WRAP virtual bool empty() const; CV_WRAP virtual bool empty() const CV_OVERRIDE;
CV_WRAP virtual String getDefaultName() const; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
// see corresponding cv::Algorithm method // see corresponding cv::Algorithm method
CV_WRAP inline void write(const Ptr<FileStorage>& fs, const String& name = String()) const { Algorithm::write(fs, name); } CV_WRAP inline void write(const Ptr<FileStorage>& fs, const String& name = String()) const { Algorithm::write(fs, name); }
...@@ -280,7 +280,7 @@ public: ...@@ -280,7 +280,7 @@ public:
CV_WRAP static Ptr<BRISK> create(int thresh, int octaves, const std::vector<float> &radiusList, CV_WRAP static Ptr<BRISK> create(int thresh, int octaves, const std::vector<float> &radiusList,
const std::vector<int> &numberList, float dMax=5.85f, float dMin=8.2f, const std::vector<int> &numberList, float dMax=5.85f, float dMin=8.2f,
const std::vector<int>& indexChange=std::vector<int>()); const std::vector<int>& indexChange=std::vector<int>());
CV_WRAP virtual String getDefaultName() const; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
}; };
/** @brief Class implementing the ORB (*oriented BRIEF*) keypoint detector and descriptor extractor /** @brief Class implementing the ORB (*oriented BRIEF*) keypoint detector and descriptor extractor
...@@ -355,7 +355,7 @@ public: ...@@ -355,7 +355,7 @@ public:
CV_WRAP virtual void setFastThreshold(int fastThreshold) = 0; CV_WRAP virtual void setFastThreshold(int fastThreshold) = 0;
CV_WRAP virtual int getFastThreshold() const = 0; CV_WRAP virtual int getFastThreshold() const = 0;
CV_WRAP virtual String getDefaultName() const; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
}; };
/** @brief Maximally stable extremal region extractor /** @brief Maximally stable extremal region extractor
...@@ -415,7 +415,7 @@ public: ...@@ -415,7 +415,7 @@ public:
CV_WRAP virtual void setPass2Only(bool f) = 0; CV_WRAP virtual void setPass2Only(bool f) = 0;
CV_WRAP virtual bool getPass2Only() const = 0; CV_WRAP virtual bool getPass2Only() const = 0;
CV_WRAP virtual String getDefaultName() const; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
}; };
/** @overload */ /** @overload */
...@@ -471,7 +471,7 @@ public: ...@@ -471,7 +471,7 @@ public:
CV_WRAP virtual void setType(int type) = 0; CV_WRAP virtual void setType(int type) = 0;
CV_WRAP virtual int getType() const = 0; CV_WRAP virtual int getType() const = 0;
CV_WRAP virtual String getDefaultName() const; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
}; };
/** @overload */ /** @overload */
...@@ -526,7 +526,7 @@ public: ...@@ -526,7 +526,7 @@ public:
CV_WRAP virtual void setType(int type) = 0; CV_WRAP virtual void setType(int type) = 0;
CV_WRAP virtual int getType() const = 0; CV_WRAP virtual int getType() const = 0;
CV_WRAP virtual String getDefaultName() const; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
}; };
/** @brief Wrapping class for feature detection using the goodFeaturesToTrack function. : /** @brief Wrapping class for feature detection using the goodFeaturesToTrack function. :
...@@ -555,7 +555,7 @@ public: ...@@ -555,7 +555,7 @@ public:
CV_WRAP virtual void setK(double k) = 0; CV_WRAP virtual void setK(double k) = 0;
CV_WRAP virtual double getK() const = 0; CV_WRAP virtual double getK() const = 0;
CV_WRAP virtual String getDefaultName() const; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
}; };
/** @brief Class for extracting blobs from an image. : /** @brief Class for extracting blobs from an image. :
...@@ -622,7 +622,7 @@ public: ...@@ -622,7 +622,7 @@ public:
CV_WRAP static Ptr<SimpleBlobDetector> CV_WRAP static Ptr<SimpleBlobDetector>
create(const SimpleBlobDetector::Params &parameters = SimpleBlobDetector::Params()); create(const SimpleBlobDetector::Params &parameters = SimpleBlobDetector::Params());
CV_WRAP virtual String getDefaultName() const; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
}; };
//! @} features2d_main //! @} features2d_main
...@@ -679,7 +679,7 @@ public: ...@@ -679,7 +679,7 @@ public:
CV_WRAP virtual void setDiffusivity(int diff) = 0; CV_WRAP virtual void setDiffusivity(int diff) = 0;
CV_WRAP virtual int getDiffusivity() const = 0; CV_WRAP virtual int getDiffusivity() const = 0;
CV_WRAP virtual String getDefaultName() const; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
}; };
/** @brief Class implementing the AKAZE keypoint detector and descriptor extractor, described in @cite ANB13. /** @brief Class implementing the AKAZE keypoint detector and descriptor extractor, described in @cite ANB13.
...@@ -747,7 +747,7 @@ public: ...@@ -747,7 +747,7 @@ public:
CV_WRAP virtual void setDiffusivity(int diff) = 0; CV_WRAP virtual void setDiffusivity(int diff) = 0;
CV_WRAP virtual int getDiffusivity() const = 0; CV_WRAP virtual int getDiffusivity() const = 0;
CV_WRAP virtual String getDefaultName() const; CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
}; };
//! @} features2d_main //! @} features2d_main
...@@ -857,11 +857,11 @@ public: ...@@ -857,11 +857,11 @@ public:
/** @brief Clears the train descriptor collections. /** @brief Clears the train descriptor collections.
*/ */
CV_WRAP virtual void clear(); CV_WRAP virtual void clear() CV_OVERRIDE;
/** @brief Returns true if there are no train descriptors in the both collections. /** @brief Returns true if there are no train descriptors in the both collections.
*/ */
CV_WRAP virtual bool empty() const; CV_WRAP virtual bool empty() const CV_OVERRIDE;
/** @brief Returns true if the descriptor matcher supports masking permissible matches. /** @brief Returns true if the descriptor matcher supports masking permissible matches.
*/ */
...@@ -991,9 +991,9 @@ public: ...@@ -991,9 +991,9 @@ public:
} }
// Reads matcher object from a file node // Reads matcher object from a file node
// see corresponding cv::Algorithm method // see corresponding cv::Algorithm method
CV_WRAP virtual void read( const FileNode& ); CV_WRAP virtual void read( const FileNode& ) CV_OVERRIDE;
// Writes matcher object to a file storage // Writes matcher object to a file storage
virtual void write( FileStorage& ) const; virtual void write( FileStorage& ) const CV_OVERRIDE;
/** @brief Clones the matcher. /** @brief Clones the matcher.
...@@ -1086,7 +1086,7 @@ public: ...@@ -1086,7 +1086,7 @@ public:
virtual ~BFMatcher() {} virtual ~BFMatcher() {}
virtual bool isMaskSupported() const { return true; } virtual bool isMaskSupported() const CV_OVERRIDE { return true; }
/** @brief Brute-force matcher create method. /** @brief Brute-force matcher create method.
@param normType One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are @param normType One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are
...@@ -1102,12 +1102,12 @@ public: ...@@ -1102,12 +1102,12 @@ public:
*/ */
CV_WRAP static Ptr<BFMatcher> create( int normType=NORM_L2, bool crossCheck=false ) ; CV_WRAP static Ptr<BFMatcher> create( int normType=NORM_L2, bool crossCheck=false ) ;
virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const; virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const CV_OVERRIDE;
protected: protected:
virtual void knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k, virtual void knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k,
InputArrayOfArrays masks=noArray(), bool compactResult=false ); InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE;
virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance, virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,
InputArrayOfArrays masks=noArray(), bool compactResult=false ); InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE;
int normType; int normType;
bool crossCheck; bool crossCheck;
...@@ -1128,29 +1128,29 @@ public: ...@@ -1128,29 +1128,29 @@ public:
CV_WRAP FlannBasedMatcher( const Ptr<flann::IndexParams>& indexParams=makePtr<flann::KDTreeIndexParams>(), CV_WRAP FlannBasedMatcher( const Ptr<flann::IndexParams>& indexParams=makePtr<flann::KDTreeIndexParams>(),
const Ptr<flann::SearchParams>& searchParams=makePtr<flann::SearchParams>() ); const Ptr<flann::SearchParams>& searchParams=makePtr<flann::SearchParams>() );
virtual void add( InputArrayOfArrays descriptors ); virtual void add( InputArrayOfArrays descriptors ) CV_OVERRIDE;
virtual void clear(); virtual void clear() CV_OVERRIDE;
// Reads matcher object from a file node // Reads matcher object from a file node
virtual void read( const FileNode& ); virtual void read( const FileNode& ) CV_OVERRIDE;
// Writes matcher object to a file storage // Writes matcher object to a file storage
virtual void write( FileStorage& ) const; virtual void write( FileStorage& ) const CV_OVERRIDE;
virtual void train(); virtual void train() CV_OVERRIDE;
virtual bool isMaskSupported() const; virtual bool isMaskSupported() const CV_OVERRIDE;
CV_WRAP static Ptr<FlannBasedMatcher> create(); CV_WRAP static Ptr<FlannBasedMatcher> create();
virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const; virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const CV_OVERRIDE;
protected: protected:
static void convertToDMatches( const DescriptorCollection& descriptors, static void convertToDMatches( const DescriptorCollection& descriptors,
const Mat& indices, const Mat& distances, const Mat& indices, const Mat& distances,
std::vector<std::vector<DMatch> >& matches ); std::vector<std::vector<DMatch> >& matches );
virtual void knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k, virtual void knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k,
InputArrayOfArrays masks=noArray(), bool compactResult=false ); InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE;
virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance, virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,
InputArrayOfArrays masks=noArray(), bool compactResult=false ); InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE;
Ptr<flann::IndexParams> indexParams; Ptr<flann::IndexParams> indexParams;
Ptr<flann::SearchParams> searchParams; Ptr<flann::SearchParams> searchParams;
...@@ -1327,8 +1327,8 @@ public: ...@@ -1327,8 +1327,8 @@ public:
virtual ~BOWKMeansTrainer(); virtual ~BOWKMeansTrainer();
// Returns trained vocabulary (i.e. cluster centers). // Returns trained vocabulary (i.e. cluster centers).
CV_WRAP virtual Mat cluster() const; CV_WRAP virtual Mat cluster() const CV_OVERRIDE;
CV_WRAP virtual Mat cluster( const Mat& descriptors ) const; CV_WRAP virtual Mat cluster( const Mat& descriptors ) const CV_OVERRIDE;
protected: protected:
......
...@@ -7941,14 +7941,14 @@ void AGAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, boo ...@@ -7941,14 +7941,14 @@ void AGAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, boo
AGAST(_img, keypoints, threshold, nonmax_suppression, AgastFeatureDetector::OAST_9_16); AGAST(_img, keypoints, threshold, nonmax_suppression, AgastFeatureDetector::OAST_9_16);
} }
class AgastFeatureDetector_Impl : public AgastFeatureDetector class AgastFeatureDetector_Impl CV_FINAL : public AgastFeatureDetector
{ {
public: public:
AgastFeatureDetector_Impl( int _threshold, bool _nonmaxSuppression, int _type ) AgastFeatureDetector_Impl( int _threshold, bool _nonmaxSuppression, int _type )
: threshold(_threshold), nonmaxSuppression(_nonmaxSuppression), type((short)_type) : threshold(_threshold), nonmaxSuppression(_nonmaxSuppression), type((short)_type)
{} {}
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
...@@ -7986,14 +7986,14 @@ public: ...@@ -7986,14 +7986,14 @@ public:
return 0; return 0;
} }
void setThreshold(int threshold_) { threshold = threshold_; } void setThreshold(int threshold_) CV_OVERRIDE { threshold = threshold_; }
int getThreshold() const { return threshold; } int getThreshold() const CV_OVERRIDE { return threshold; }
void setNonmaxSuppression(bool f) { nonmaxSuppression = f; } void setNonmaxSuppression(bool f) CV_OVERRIDE { nonmaxSuppression = f; }
bool getNonmaxSuppression() const { return nonmaxSuppression; } bool getNonmaxSuppression() const CV_OVERRIDE { return nonmaxSuppression; }
void setType(int type_) { type = type_; } void setType(int type_) CV_OVERRIDE { type = type_; }
int getType() const { return type; } int getType() const CV_OVERRIDE { return type; }
int threshold; int threshold;
bool nonmaxSuppression; bool nonmaxSuppression;
......
...@@ -72,34 +72,34 @@ namespace cv ...@@ -72,34 +72,34 @@ namespace cv
{ {
} }
virtual ~AKAZE_Impl() virtual ~AKAZE_Impl() CV_OVERRIDE
{ {
} }
void setDescriptorType(int dtype) { descriptor = dtype; } void setDescriptorType(int dtype) CV_OVERRIDE { descriptor = dtype; }
int getDescriptorType() const { return descriptor; } int getDescriptorType() const CV_OVERRIDE { return descriptor; }
void setDescriptorSize(int dsize) { descriptor_size = dsize; } void setDescriptorSize(int dsize) CV_OVERRIDE { descriptor_size = dsize; }
int getDescriptorSize() const { return descriptor_size; } int getDescriptorSize() const CV_OVERRIDE { return descriptor_size; }
void setDescriptorChannels(int dch) { descriptor_channels = dch; } void setDescriptorChannels(int dch) CV_OVERRIDE { descriptor_channels = dch; }
int getDescriptorChannels() const { return descriptor_channels; } int getDescriptorChannels() const CV_OVERRIDE { return descriptor_channels; }
void setThreshold(double threshold_) { threshold = (float)threshold_; } void setThreshold(double threshold_) CV_OVERRIDE { threshold = (float)threshold_; }
double getThreshold() const { return threshold; } double getThreshold() const CV_OVERRIDE { return threshold; }
void setNOctaves(int octaves_) { octaves = octaves_; } void setNOctaves(int octaves_) CV_OVERRIDE { octaves = octaves_; }
int getNOctaves() const { return octaves; } int getNOctaves() const CV_OVERRIDE { return octaves; }
void setNOctaveLayers(int octaveLayers_) { sublevels = octaveLayers_; } void setNOctaveLayers(int octaveLayers_) CV_OVERRIDE { sublevels = octaveLayers_; }
int getNOctaveLayers() const { return sublevels; } int getNOctaveLayers() const CV_OVERRIDE { return sublevels; }
void setDiffusivity(int diff_) { diffusivity = diff_; } void setDiffusivity(int diff_) CV_OVERRIDE { diffusivity = diff_; }
int getDiffusivity() const { return diffusivity; } int getDiffusivity() const CV_OVERRIDE { return diffusivity; }
// returns the descriptor size in bytes // returns the descriptor size in bytes
int descriptorSize() const int descriptorSize() const CV_OVERRIDE
{ {
switch (descriptor) switch (descriptor)
{ {
...@@ -127,7 +127,7 @@ namespace cv ...@@ -127,7 +127,7 @@ namespace cv
} }
// returns the descriptor type // returns the descriptor type
int descriptorType() const int descriptorType() const CV_OVERRIDE
{ {
switch (descriptor) switch (descriptor)
{ {
...@@ -145,7 +145,7 @@ namespace cv ...@@ -145,7 +145,7 @@ namespace cv
} }
// returns the default norm type // returns the default norm type
int defaultNorm() const int defaultNorm() const CV_OVERRIDE
{ {
switch (descriptor) switch (descriptor)
{ {
...@@ -165,7 +165,7 @@ namespace cv ...@@ -165,7 +165,7 @@ namespace cv
void detectAndCompute(InputArray image, InputArray mask, void detectAndCompute(InputArray image, InputArray mask,
std::vector<KeyPoint>& keypoints, std::vector<KeyPoint>& keypoints,
OutputArray descriptors, OutputArray descriptors,
bool useProvidedKeypoints) bool useProvidedKeypoints) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
...@@ -204,7 +204,7 @@ namespace cv ...@@ -204,7 +204,7 @@ namespace cv
} }
} }
void write(FileStorage& fs) const void write(FileStorage& fs) const CV_OVERRIDE
{ {
writeFormat(fs); writeFormat(fs);
fs << "descriptor" << descriptor; fs << "descriptor" << descriptor;
...@@ -216,7 +216,7 @@ namespace cv ...@@ -216,7 +216,7 @@ namespace cv
fs << "diffusivity" << diffusivity; fs << "diffusivity" << diffusivity;
} }
void read(const FileNode& fn) void read(const FileNode& fn) CV_OVERRIDE
{ {
descriptor = (int)fn["descriptor"]; descriptor = (int)fn["descriptor"];
descriptor_channels = (int)fn["descriptor_channels"]; descriptor_channels = (int)fn["descriptor_channels"];
......
...@@ -64,8 +64,8 @@ public: ...@@ -64,8 +64,8 @@ public:
explicit SimpleBlobDetectorImpl(const SimpleBlobDetector::Params &parameters = SimpleBlobDetector::Params()); explicit SimpleBlobDetectorImpl(const SimpleBlobDetector::Params &parameters = SimpleBlobDetector::Params());
virtual void read( const FileNode& fn ); virtual void read( const FileNode& fn ) CV_OVERRIDE;
virtual void write( FileStorage& fs ) const; virtual void write( FileStorage& fs ) const CV_OVERRIDE;
protected: protected:
struct CV_EXPORTS Center struct CV_EXPORTS Center
...@@ -75,7 +75,7 @@ protected: ...@@ -75,7 +75,7 @@ protected:
double confidence; double confidence;
}; };
virtual void detect( InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask=noArray() ); virtual void detect( InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask=noArray() ) CV_OVERRIDE;
virtual void findBlobs(InputArray image, InputArray binaryImage, std::vector<Center> &centers) const; virtual void findBlobs(InputArray image, InputArray binaryImage, std::vector<Center> &centers) const;
Params params; Params params;
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
namespace cv namespace cv
{ {
class BRISK_Impl : public BRISK class BRISK_Impl CV_FINAL : public BRISK
{ {
public: public:
explicit BRISK_Impl(int thresh=30, int octaves=3, float patternScale=1.0f); explicit BRISK_Impl(int thresh=30, int octaves=3, float patternScale=1.0f);
...@@ -65,17 +65,17 @@ public: ...@@ -65,17 +65,17 @@ public:
virtual ~BRISK_Impl(); virtual ~BRISK_Impl();
int descriptorSize() const int descriptorSize() const CV_OVERRIDE
{ {
return strings_; return strings_;
} }
int descriptorType() const int descriptorType() const CV_OVERRIDE
{ {
return CV_8U; return CV_8U;
} }
int defaultNorm() const int defaultNorm() const CV_OVERRIDE
{ {
return NORM_HAMMING; return NORM_HAMMING;
} }
...@@ -90,7 +90,7 @@ public: ...@@ -90,7 +90,7 @@ public:
void detectAndCompute( InputArray image, InputArray mask, void detectAndCompute( InputArray image, InputArray mask,
CV_OUT std::vector<KeyPoint>& keypoints, CV_OUT std::vector<KeyPoint>& keypoints,
OutputArray descriptors, OutputArray descriptors,
bool useProvidedKeypoints ); bool useProvidedKeypoints ) CV_OVERRIDE;
protected: protected:
...@@ -151,11 +151,11 @@ private: ...@@ -151,11 +151,11 @@ private:
// a layer in the Brisk detector pyramid // a layer in the Brisk detector pyramid
class CV_EXPORTS BriskLayer class BriskLayer
{ {
public: public:
// constructor arguments // constructor arguments
struct CV_EXPORTS CommonParams struct CommonParams
{ {
static const int HALFSAMPLE = 0; static const int HALFSAMPLE = 0;
static const int TWOTHIRDSAMPLE = 1; static const int TWOTHIRDSAMPLE = 1;
...@@ -223,7 +223,7 @@ private: ...@@ -223,7 +223,7 @@ private:
int pixel_9_16_[25]; int pixel_9_16_[25];
}; };
class CV_EXPORTS BriskScaleSpace class BriskScaleSpace
{ {
public: public:
// construct telling the octaves number: // construct telling the octaves number:
......
...@@ -50,7 +50,7 @@ namespace cv ...@@ -50,7 +50,7 @@ namespace cv
namespace opt_AVX2 namespace opt_AVX2
{ {
class FAST_t_patternSize16_AVX2_Impl: public FAST_t_patternSize16_AVX2 class FAST_t_patternSize16_AVX2_Impl CV_FINAL: public FAST_t_patternSize16_AVX2
{ {
public: public:
FAST_t_patternSize16_AVX2_Impl(int _cols, int _threshold, bool _nonmax_suppression, const int* _pixel): FAST_t_patternSize16_AVX2_Impl(int _cols, int _threshold, bool _nonmax_suppression, const int* _pixel):
...@@ -61,7 +61,7 @@ public: ...@@ -61,7 +61,7 @@ public:
threshold = std::min(std::max(_threshold, 0), 255); threshold = std::min(std::max(_threshold, 0), 255);
} }
virtual void process(int &j, const uchar* &ptr, uchar* curr, int* cornerpos, int &ncorners) virtual void process(int &j, const uchar* &ptr, uchar* curr, int* cornerpos, int &ncorners) CV_OVERRIDE
{ {
static const __m256i delta256 = _mm256_broadcastsi128_si256(_mm_set1_epi8((char)(-128))), K16_256 = _mm256_broadcastsi128_si256(_mm_set1_epi8((char)8)); static const __m256i delta256 = _mm256_broadcastsi128_si256(_mm_set1_epi8((char)(-128))), K16_256 = _mm256_broadcastsi128_si256(_mm_set1_epi8((char)8));
const __m256i t256 = _mm256_broadcastsi128_si256(_mm_set1_epi8(t256c)); const __m256i t256 = _mm256_broadcastsi128_si256(_mm_set1_epi8(t256c));
...@@ -165,7 +165,7 @@ public: ...@@ -165,7 +165,7 @@ public:
_mm256_zeroupper(); _mm256_zeroupper();
} }
virtual ~FAST_t_patternSize16_AVX2_Impl() {}; virtual ~FAST_t_patternSize16_AVX2_Impl() CV_OVERRIDE {};
private: private:
int cols; int cols;
......
...@@ -515,14 +515,14 @@ void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool ...@@ -515,14 +515,14 @@ void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool
} }
class FastFeatureDetector_Impl : public FastFeatureDetector class FastFeatureDetector_Impl CV_FINAL : public FastFeatureDetector
{ {
public: public:
FastFeatureDetector_Impl( int _threshold, bool _nonmaxSuppression, int _type ) FastFeatureDetector_Impl( int _threshold, bool _nonmaxSuppression, int _type )
: threshold(_threshold), nonmaxSuppression(_nonmaxSuppression), type((short)_type) : threshold(_threshold), nonmaxSuppression(_nonmaxSuppression), type((short)_type)
{} {}
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
...@@ -563,14 +563,14 @@ public: ...@@ -563,14 +563,14 @@ public:
return 0; return 0;
} }
void setThreshold(int threshold_) { threshold = threshold_; } void setThreshold(int threshold_) CV_OVERRIDE { threshold = threshold_; }
int getThreshold() const { return threshold; } int getThreshold() const CV_OVERRIDE { return threshold; }
void setNonmaxSuppression(bool f) { nonmaxSuppression = f; } void setNonmaxSuppression(bool f) CV_OVERRIDE { nonmaxSuppression = f; }
bool getNonmaxSuppression() const { return nonmaxSuppression; } bool getNonmaxSuppression() const CV_OVERRIDE { return nonmaxSuppression; }
void setType(int type_) { type = type_; } void setType(int type_) CV_OVERRIDE { type = type_; }
int getType() const { return type; } int getType() const CV_OVERRIDE { return type; }
int threshold; int threshold;
bool nonmaxSuppression; bool nonmaxSuppression;
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
namespace cv namespace cv
{ {
class GFTTDetector_Impl : public GFTTDetector class GFTTDetector_Impl CV_FINAL : public GFTTDetector
{ {
public: public:
GFTTDetector_Impl( int _nfeatures, double _qualityLevel, GFTTDetector_Impl( int _nfeatures, double _qualityLevel,
...@@ -55,28 +55,28 @@ public: ...@@ -55,28 +55,28 @@ public:
{ {
} }
void setMaxFeatures(int maxFeatures) { nfeatures = maxFeatures; } void setMaxFeatures(int maxFeatures) CV_OVERRIDE { nfeatures = maxFeatures; }
int getMaxFeatures() const { return nfeatures; } int getMaxFeatures() const CV_OVERRIDE { return nfeatures; }
void setQualityLevel(double qlevel) { qualityLevel = qlevel; } void setQualityLevel(double qlevel) CV_OVERRIDE { qualityLevel = qlevel; }
double getQualityLevel() const { return qualityLevel; } double getQualityLevel() const CV_OVERRIDE { return qualityLevel; }
void setMinDistance(double minDistance_) { minDistance = minDistance_; } void setMinDistance(double minDistance_) CV_OVERRIDE { minDistance = minDistance_; }
double getMinDistance() const { return minDistance; } double getMinDistance() const CV_OVERRIDE { return minDistance; }
void setBlockSize(int blockSize_) { blockSize = blockSize_; } void setBlockSize(int blockSize_) CV_OVERRIDE { blockSize = blockSize_; }
int getBlockSize() const { return blockSize; } int getBlockSize() const CV_OVERRIDE { return blockSize; }
void setGradientSize(int gradientSize_) { gradSize = gradientSize_; } //void setGradientSize(int gradientSize_) { gradSize = gradientSize_; }
int getGradientSize() { return gradSize; } //int getGradientSize() { return gradSize; }
void setHarrisDetector(bool val) { useHarrisDetector = val; } void setHarrisDetector(bool val) CV_OVERRIDE { useHarrisDetector = val; }
bool getHarrisDetector() const { return useHarrisDetector; } bool getHarrisDetector() const CV_OVERRIDE { return useHarrisDetector; }
void setK(double k_) { k = k_; } void setK(double k_) CV_OVERRIDE { k = k_; }
double getK() const { return k; } double getK() const CV_OVERRIDE { return k; }
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
......
...@@ -53,7 +53,7 @@ http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12eccv.pd ...@@ -53,7 +53,7 @@ http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12eccv.pd
namespace cv namespace cv
{ {
class KAZE_Impl : public KAZE class KAZE_Impl CV_FINAL : public KAZE
{ {
public: public:
KAZE_Impl(bool _extended, bool _upright, float _threshold, int _octaves, KAZE_Impl(bool _extended, bool _upright, float _threshold, int _octaves,
...@@ -67,40 +67,40 @@ namespace cv ...@@ -67,40 +67,40 @@ namespace cv
{ {
} }
virtual ~KAZE_Impl() {} virtual ~KAZE_Impl() CV_OVERRIDE {}
void setExtended(bool extended_) { extended = extended_; } void setExtended(bool extended_) CV_OVERRIDE { extended = extended_; }
bool getExtended() const { return extended; } bool getExtended() const CV_OVERRIDE { return extended; }
void setUpright(bool upright_) { upright = upright_; } void setUpright(bool upright_) CV_OVERRIDE { upright = upright_; }
bool getUpright() const { return upright; } bool getUpright() const CV_OVERRIDE { return upright; }
void setThreshold(double threshold_) { threshold = (float)threshold_; } void setThreshold(double threshold_) CV_OVERRIDE { threshold = (float)threshold_; }
double getThreshold() const { return threshold; } double getThreshold() const CV_OVERRIDE { return threshold; }
void setNOctaves(int octaves_) { octaves = octaves_; } void setNOctaves(int octaves_) CV_OVERRIDE { octaves = octaves_; }
int getNOctaves() const { return octaves; } int getNOctaves() const CV_OVERRIDE { return octaves; }
void setNOctaveLayers(int octaveLayers_) { sublevels = octaveLayers_; } void setNOctaveLayers(int octaveLayers_) CV_OVERRIDE { sublevels = octaveLayers_; }
int getNOctaveLayers() const { return sublevels; } int getNOctaveLayers() const CV_OVERRIDE { return sublevels; }
void setDiffusivity(int diff_) { diffusivity = diff_; } void setDiffusivity(int diff_) CV_OVERRIDE { diffusivity = diff_; }
int getDiffusivity() const { return diffusivity; } int getDiffusivity() const CV_OVERRIDE { return diffusivity; }
// returns the descriptor size in bytes // returns the descriptor size in bytes
int descriptorSize() const int descriptorSize() const CV_OVERRIDE
{ {
return extended ? 128 : 64; return extended ? 128 : 64;
} }
// returns the descriptor type // returns the descriptor type
int descriptorType() const int descriptorType() const CV_OVERRIDE
{ {
return CV_32F; return CV_32F;
} }
// returns the default norm type // returns the default norm type
int defaultNorm() const int defaultNorm() const CV_OVERRIDE
{ {
return NORM_L2; return NORM_L2;
} }
...@@ -108,7 +108,7 @@ namespace cv ...@@ -108,7 +108,7 @@ namespace cv
void detectAndCompute(InputArray image, InputArray mask, void detectAndCompute(InputArray image, InputArray mask,
std::vector<KeyPoint>& keypoints, std::vector<KeyPoint>& keypoints,
OutputArray descriptors, OutputArray descriptors,
bool useProvidedKeypoints) bool useProvidedKeypoints) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
...@@ -160,7 +160,7 @@ namespace cv ...@@ -160,7 +160,7 @@ namespace cv
} }
} }
void write(FileStorage& fs) const void write(FileStorage& fs) const CV_OVERRIDE
{ {
writeFormat(fs); writeFormat(fs);
fs << "extended" << (int)extended; fs << "extended" << (int)extended;
...@@ -171,7 +171,7 @@ namespace cv ...@@ -171,7 +171,7 @@ namespace cv
fs << "diffusivity" << diffusivity; fs << "diffusivity" << diffusivity;
} }
void read(const FileNode& fn) void read(const FileNode& fn) CV_OVERRIDE
{ {
extended = (int)fn["extended"] != 0; extended = (int)fn["extended"] != 0;
upright = (int)fn["upright"] != 0; upright = (int)fn["upright"] != 0;
......
...@@ -237,7 +237,7 @@ public: ...@@ -237,7 +237,7 @@ public:
: Lt_(&Lt), Lf_(&Lf), Lstep_(&Lstep), step_size_(step_size) : Lt_(&Lt), Lf_(&Lf), Lstep_(&Lstep), step_size_(step_size)
{} {}
void operator()(const Range& range) const void operator()(const Range& range) const CV_OVERRIDE
{ {
nld_step_scalar_one_lane(*Lt_, *Lf_, *Lstep_, step_size_, range.start, range.end); nld_step_scalar_one_lane(*Lt_, *Lf_, *Lstep_, step_size_, range.start, range.end);
} }
...@@ -603,7 +603,7 @@ public: ...@@ -603,7 +603,7 @@ public:
{ {
} }
void operator()(const Range& range) const void operator()(const Range& range) const CV_OVERRIDE
{ {
MatType Lxx, Lxy, Lyy; MatType Lxx, Lxy, Lyy;
...@@ -725,7 +725,7 @@ public: ...@@ -725,7 +725,7 @@ public:
: evolution_(&ev), keypoints_by_layers_(&kpts), dthreshold_(dthreshold) : evolution_(&ev), keypoints_by_layers_(&kpts), dthreshold_(dthreshold)
{} {}
void operator()(const Range& range) const 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++)
{ {
...@@ -948,7 +948,7 @@ public: ...@@ -948,7 +948,7 @@ public:
{ {
} }
void operator() (const Range& range) const 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++)
{ {
...@@ -974,7 +974,7 @@ public: ...@@ -974,7 +974,7 @@ public:
{ {
} }
void operator()(const Range& range) const 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++)
{ {
...@@ -1000,7 +1000,7 @@ public: ...@@ -1000,7 +1000,7 @@ public:
{ {
} }
void operator()(const Range& range) const 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++)
{ {
...@@ -1026,7 +1026,7 @@ public: ...@@ -1026,7 +1026,7 @@ public:
{ {
} }
void operator() (const Range& range) const 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++)
{ {
...@@ -1053,7 +1053,7 @@ public: ...@@ -1053,7 +1053,7 @@ public:
{ {
} }
void operator() (const Range& range) const 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++)
{ {
...@@ -1088,7 +1088,7 @@ public: ...@@ -1088,7 +1088,7 @@ public:
{ {
} }
void operator() (const Range& range) const 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++)
{ {
...@@ -1119,7 +1119,7 @@ public: ...@@ -1119,7 +1119,7 @@ public:
{ {
} }
void operator() (const Range& range) const 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++)
{ {
...@@ -1158,7 +1158,7 @@ public: ...@@ -1158,7 +1158,7 @@ public:
{ {
} }
void operator() (const Range& range) const 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++)
{ {
...@@ -1448,7 +1448,7 @@ public: ...@@ -1448,7 +1448,7 @@ public:
{ {
} }
void operator() (const Range& range) const 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++)
{ {
......
...@@ -196,7 +196,7 @@ public: ...@@ -196,7 +196,7 @@ public:
{ {
} }
void operator()(const Range& range) const void operator()(const Range& range) const CV_OVERRIDE
{ {
std::vector<TEvolution>& evolution = *evolution_; std::vector<TEvolution>& evolution = *evolution_;
for (int i = range.start; i < range.end; i++) for (int i = range.start; i < range.end; i++)
...@@ -239,7 +239,7 @@ public: ...@@ -239,7 +239,7 @@ public:
{ {
} }
void operator()(const Range& range) const void operator()(const Range& range) const CV_OVERRIDE
{ {
std::vector<TEvolution>& evolution = *evolution_; std::vector<TEvolution>& evolution = *evolution_;
std::vector<std::vector<KeyPoint> >& kpts_par = *kpts_par_; std::vector<std::vector<KeyPoint> >& kpts_par = *kpts_par_;
...@@ -503,11 +503,11 @@ public: ...@@ -503,11 +503,11 @@ public:
{ {
} }
void operator() (const Range& range) const void operator() (const Range& range) const CV_OVERRIDE
{ {
std::vector<KeyPoint> &kpts = *kpts_; std::vector<KeyPoint> &kpts = *kpts_;
Mat &desc = *desc_; Mat &desc = *desc_;
std::vector<TEvolution> &evolution = *evolution_; std::vector<TEvolution> &evolution = *evolution_;
for (int i = range.start; i < range.end; i++) for (int i = range.start; i < range.end; i++)
{ {
......
...@@ -378,7 +378,7 @@ public: ...@@ -378,7 +378,7 @@ public:
} }
void operator()(const cv::Range& range) const void operator()(const cv::Range& range) const CV_OVERRIDE
{ {
cv::Mat& Ld = *_Ld; cv::Mat& Ld = *_Ld;
const cv::Mat& c = *_c; const cv::Mat& c = *_c;
......
...@@ -48,7 +48,7 @@ namespace cv ...@@ -48,7 +48,7 @@ namespace cv
using std::vector; using std::vector;
class MSER_Impl : public MSER class MSER_Impl CV_FINAL : public MSER
{ {
public: public:
struct Params struct Params
...@@ -85,19 +85,19 @@ public: ...@@ -85,19 +85,19 @@ public:
explicit MSER_Impl(const Params& _params) : params(_params) {} explicit MSER_Impl(const Params& _params) : params(_params) {}
virtual ~MSER_Impl() {} virtual ~MSER_Impl() CV_OVERRIDE {}
void setDelta(int delta) { params.delta = delta; } void setDelta(int delta) CV_OVERRIDE { params.delta = delta; }
int getDelta() const { return params.delta; } int getDelta() const CV_OVERRIDE { return params.delta; }
void setMinArea(int minArea) { params.minArea = minArea; } void setMinArea(int minArea) CV_OVERRIDE { params.minArea = minArea; }
int getMinArea() const { return params.minArea; } int getMinArea() const CV_OVERRIDE { return params.minArea; }
void setMaxArea(int maxArea) { params.maxArea = maxArea; } void setMaxArea(int maxArea) CV_OVERRIDE { params.maxArea = maxArea; }
int getMaxArea() const { return params.maxArea; } int getMaxArea() const CV_OVERRIDE { return params.maxArea; }
void setPass2Only(bool f) { params.pass2Only = f; } void setPass2Only(bool f) CV_OVERRIDE { params.pass2Only = f; }
bool getPass2Only() const { return params.pass2Only; } bool getPass2Only() const CV_OVERRIDE { return params.pass2Only; }
enum { DIR_SHIFT = 29, NEXT_MASK = ((1<<DIR_SHIFT)-1) }; enum { DIR_SHIFT = 29, NEXT_MASK = ((1<<DIR_SHIFT)-1) };
...@@ -364,8 +364,8 @@ public: ...@@ -364,8 +364,8 @@ public:
void detectRegions( InputArray image, void detectRegions( InputArray image,
std::vector<std::vector<Point> >& msers, std::vector<std::vector<Point> >& msers,
std::vector<Rect>& bboxes ); std::vector<Rect>& bboxes ) CV_OVERRIDE;
void detect( InputArray _src, vector<KeyPoint>& keypoints, InputArray _mask ); void detect( InputArray _src, vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE;
void preprocess1( const Mat& img, int* level_size ) void preprocess1( const Mat& img, int* level_size )
{ {
......
...@@ -651,7 +651,7 @@ static inline float getScale(int level, int firstLevel, double scaleFactor) ...@@ -651,7 +651,7 @@ static inline float getScale(int level, int firstLevel, double scaleFactor)
} }
class ORB_Impl : public ORB class ORB_Impl CV_FINAL : public ORB
{ {
public: public:
explicit ORB_Impl(int _nfeatures, float _scaleFactor, int _nlevels, int _edgeThreshold, explicit ORB_Impl(int _nfeatures, float _scaleFactor, int _nlevels, int _edgeThreshold,
...@@ -661,43 +661,43 @@ public: ...@@ -661,43 +661,43 @@ public:
scoreType(_scoreType), patchSize(_patchSize), fastThreshold(_fastThreshold) scoreType(_scoreType), patchSize(_patchSize), fastThreshold(_fastThreshold)
{} {}
void setMaxFeatures(int maxFeatures) { nfeatures = maxFeatures; } void setMaxFeatures(int maxFeatures) CV_OVERRIDE { nfeatures = maxFeatures; }
int getMaxFeatures() const { return nfeatures; } int getMaxFeatures() const CV_OVERRIDE { return nfeatures; }
void setScaleFactor(double scaleFactor_) { scaleFactor = scaleFactor_; } void setScaleFactor(double scaleFactor_) CV_OVERRIDE { scaleFactor = scaleFactor_; }
double getScaleFactor() const { return scaleFactor; } double getScaleFactor() const CV_OVERRIDE { return scaleFactor; }
void setNLevels(int nlevels_) { nlevels = nlevels_; } void setNLevels(int nlevels_) CV_OVERRIDE { nlevels = nlevels_; }
int getNLevels() const { return nlevels; } int getNLevels() const CV_OVERRIDE { return nlevels; }
void setEdgeThreshold(int edgeThreshold_) { edgeThreshold = edgeThreshold_; } void setEdgeThreshold(int edgeThreshold_) CV_OVERRIDE { edgeThreshold = edgeThreshold_; }
int getEdgeThreshold() const { return edgeThreshold; } int getEdgeThreshold() const CV_OVERRIDE { return edgeThreshold; }
void setFirstLevel(int firstLevel_) { CV_Assert(firstLevel_ >= 0); firstLevel = firstLevel_; } void setFirstLevel(int firstLevel_) CV_OVERRIDE { CV_Assert(firstLevel_ >= 0); firstLevel = firstLevel_; }
int getFirstLevel() const { return firstLevel; } int getFirstLevel() const CV_OVERRIDE { return firstLevel; }
void setWTA_K(int wta_k_) { wta_k = wta_k_; } void setWTA_K(int wta_k_) CV_OVERRIDE { wta_k = wta_k_; }
int getWTA_K() const { return wta_k; } int getWTA_K() const CV_OVERRIDE { return wta_k; }
void setScoreType(int scoreType_) { scoreType = scoreType_; } void setScoreType(int scoreType_) CV_OVERRIDE { scoreType = scoreType_; }
int getScoreType() const { return scoreType; } int getScoreType() const CV_OVERRIDE { return scoreType; }
void setPatchSize(int patchSize_) { patchSize = patchSize_; } void setPatchSize(int patchSize_) CV_OVERRIDE { patchSize = patchSize_; }
int getPatchSize() const { return patchSize; } int getPatchSize() const CV_OVERRIDE { return patchSize; }
void setFastThreshold(int fastThreshold_) { fastThreshold = fastThreshold_; } void setFastThreshold(int fastThreshold_) CV_OVERRIDE { fastThreshold = fastThreshold_; }
int getFastThreshold() const { return fastThreshold; } int getFastThreshold() const CV_OVERRIDE { return fastThreshold; }
// returns the descriptor size in bytes // returns the descriptor size in bytes
int descriptorSize() const; int descriptorSize() const CV_OVERRIDE;
// returns the descriptor type // returns the descriptor type
int descriptorType() const; int descriptorType() const CV_OVERRIDE;
// returns the default norm type // returns the default norm type
int defaultNorm() const; int defaultNorm() const CV_OVERRIDE;
// Compute the ORB_Impl features and descriptors on an image // Compute the ORB_Impl features and descriptors on an image
void detectAndCompute( InputArray image, InputArray mask, std::vector<KeyPoint>& keypoints, void detectAndCompute( InputArray image, InputArray mask, std::vector<KeyPoint>& keypoints,
OutputArray descriptors, bool useProvidedKeypoints=false ); OutputArray descriptors, bool useProvidedKeypoints=false ) CV_OVERRIDE;
protected: protected:
......
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