diff --git a/modules/features2d/include/opencv2/features2d.hpp b/modules/features2d/include/opencv2/features2d.hpp index 06e15ac8d1..1ba4f0da26 100644 --- a/modules/features2d/include/opencv2/features2d.hpp +++ b/modules/features2d/include/opencv2/features2d.hpp @@ -208,14 +208,14 @@ public: CV_WRAP void read( const String& fileName ); - virtual void write( FileStorage&) const; + virtual void write( FileStorage&) const CV_OVERRIDE; // 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 - CV_WRAP virtual bool empty() const; - CV_WRAP virtual String getDefaultName() const; + CV_WRAP virtual bool empty() const CV_OVERRIDE; + CV_WRAP virtual String getDefaultName() const CV_OVERRIDE; // see corresponding cv::Algorithm method CV_WRAP inline void write(const Ptr& fs, const String& name = String()) const { Algorithm::write(fs, name); } @@ -280,7 +280,7 @@ public: CV_WRAP static Ptr create(int thresh, int octaves, const std::vector &radiusList, const std::vector &numberList, float dMax=5.85f, float dMin=8.2f, const std::vector& indexChange=std::vector()); - 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 @@ -355,7 +355,7 @@ public: CV_WRAP virtual void setFastThreshold(int fastThreshold) = 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 @@ -415,7 +415,7 @@ public: CV_WRAP virtual void setPass2Only(bool f) = 0; CV_WRAP virtual bool getPass2Only() const = 0; - CV_WRAP virtual String getDefaultName() const; + CV_WRAP virtual String getDefaultName() const CV_OVERRIDE; }; /** @overload */ @@ -471,7 +471,7 @@ public: CV_WRAP virtual void setType(int type) = 0; CV_WRAP virtual int getType() const = 0; - CV_WRAP virtual String getDefaultName() const; + CV_WRAP virtual String getDefaultName() const CV_OVERRIDE; }; /** @overload */ @@ -526,7 +526,7 @@ public: CV_WRAP virtual void setType(int type) = 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. : @@ -555,7 +555,7 @@ public: CV_WRAP virtual void setK(double k) = 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. : @@ -622,7 +622,7 @@ public: CV_WRAP static Ptr create(const SimpleBlobDetector::Params ¶meters = SimpleBlobDetector::Params()); - CV_WRAP virtual String getDefaultName() const; + CV_WRAP virtual String getDefaultName() const CV_OVERRIDE; }; //! @} features2d_main @@ -679,7 +679,7 @@ public: CV_WRAP virtual void setDiffusivity(int diff) = 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. @@ -747,7 +747,7 @@ public: CV_WRAP virtual void setDiffusivity(int diff) = 0; CV_WRAP virtual int getDiffusivity() const = 0; - CV_WRAP virtual String getDefaultName() const; + CV_WRAP virtual String getDefaultName() const CV_OVERRIDE; }; //! @} features2d_main @@ -857,11 +857,11 @@ public: /** @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. */ - 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. */ @@ -991,9 +991,9 @@ public: } // Reads matcher object from a file node // 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 - virtual void write( FileStorage& ) const; + virtual void write( FileStorage& ) const CV_OVERRIDE; /** @brief Clones the matcher. @@ -1086,7 +1086,7 @@ public: virtual ~BFMatcher() {} - virtual bool isMaskSupported() const { return true; } + virtual bool isMaskSupported() const CV_OVERRIDE { return true; } /** @brief Brute-force matcher create method. @param normType One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are @@ -1102,12 +1102,12 @@ public: */ CV_WRAP static Ptr create( int normType=NORM_L2, bool crossCheck=false ) ; - virtual Ptr clone( bool emptyTrainData=false ) const; + virtual Ptr clone( bool emptyTrainData=false ) const CV_OVERRIDE; protected: virtual void knnMatchImpl( InputArray queryDescriptors, std::vector >& matches, int k, - InputArrayOfArrays masks=noArray(), bool compactResult=false ); + InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE; virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector >& matches, float maxDistance, - InputArrayOfArrays masks=noArray(), bool compactResult=false ); + InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE; int normType; bool crossCheck; @@ -1128,29 +1128,29 @@ public: CV_WRAP FlannBasedMatcher( const Ptr& indexParams=makePtr(), const Ptr& searchParams=makePtr() ); - virtual void add( InputArrayOfArrays descriptors ); - virtual void clear(); + virtual void add( InputArrayOfArrays descriptors ) CV_OVERRIDE; + virtual void clear() CV_OVERRIDE; // 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 - virtual void write( FileStorage& ) const; + virtual void write( FileStorage& ) const CV_OVERRIDE; - virtual void train(); - virtual bool isMaskSupported() const; + virtual void train() CV_OVERRIDE; + virtual bool isMaskSupported() const CV_OVERRIDE; CV_WRAP static Ptr create(); - virtual Ptr clone( bool emptyTrainData=false ) const; + virtual Ptr clone( bool emptyTrainData=false ) const CV_OVERRIDE; protected: static void convertToDMatches( const DescriptorCollection& descriptors, const Mat& indices, const Mat& distances, std::vector >& matches ); virtual void knnMatchImpl( InputArray queryDescriptors, std::vector >& matches, int k, - InputArrayOfArrays masks=noArray(), bool compactResult=false ); + InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE; virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector >& matches, float maxDistance, - InputArrayOfArrays masks=noArray(), bool compactResult=false ); + InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE; Ptr indexParams; Ptr searchParams; @@ -1327,8 +1327,8 @@ public: virtual ~BOWKMeansTrainer(); // Returns trained vocabulary (i.e. cluster centers). - CV_WRAP virtual Mat cluster() const; - CV_WRAP virtual Mat cluster( const Mat& descriptors ) const; + CV_WRAP virtual Mat cluster() const CV_OVERRIDE; + CV_WRAP virtual Mat cluster( const Mat& descriptors ) const CV_OVERRIDE; protected: diff --git a/modules/features2d/src/agast.cpp b/modules/features2d/src/agast.cpp index e77d556476..ab01b67805 100644 --- a/modules/features2d/src/agast.cpp +++ b/modules/features2d/src/agast.cpp @@ -7941,14 +7941,14 @@ void AGAST(InputArray _img, std::vector& keypoints, int threshold, boo AGAST(_img, keypoints, threshold, nonmax_suppression, AgastFeatureDetector::OAST_9_16); } -class AgastFeatureDetector_Impl : public AgastFeatureDetector +class AgastFeatureDetector_Impl CV_FINAL : public AgastFeatureDetector { public: AgastFeatureDetector_Impl( int _threshold, bool _nonmaxSuppression, int _type ) : threshold(_threshold), nonmaxSuppression(_nonmaxSuppression), type((short)_type) {} - void detect( InputArray _image, std::vector& keypoints, InputArray _mask ) + void detect( InputArray _image, std::vector& keypoints, InputArray _mask ) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -7986,14 +7986,14 @@ public: return 0; } - void setThreshold(int threshold_) { threshold = threshold_; } - int getThreshold() const { return threshold; } + void setThreshold(int threshold_) CV_OVERRIDE { threshold = threshold_; } + int getThreshold() const CV_OVERRIDE { return threshold; } - void setNonmaxSuppression(bool f) { nonmaxSuppression = f; } - bool getNonmaxSuppression() const { return nonmaxSuppression; } + void setNonmaxSuppression(bool f) CV_OVERRIDE { nonmaxSuppression = f; } + bool getNonmaxSuppression() const CV_OVERRIDE { return nonmaxSuppression; } - void setType(int type_) { type = type_; } - int getType() const { return type; } + void setType(int type_) CV_OVERRIDE { type = type_; } + int getType() const CV_OVERRIDE { return type; } int threshold; bool nonmaxSuppression; diff --git a/modules/features2d/src/akaze.cpp b/modules/features2d/src/akaze.cpp index c63bb74be3..d5cc25d358 100644 --- a/modules/features2d/src/akaze.cpp +++ b/modules/features2d/src/akaze.cpp @@ -72,34 +72,34 @@ namespace cv { } - virtual ~AKAZE_Impl() + virtual ~AKAZE_Impl() CV_OVERRIDE { } - void setDescriptorType(int dtype) { descriptor = dtype; } - int getDescriptorType() const { return descriptor; } + void setDescriptorType(int dtype) CV_OVERRIDE { descriptor = dtype; } + int getDescriptorType() const CV_OVERRIDE { return descriptor; } - void setDescriptorSize(int dsize) { descriptor_size = dsize; } - int getDescriptorSize() const { return descriptor_size; } + void setDescriptorSize(int dsize) CV_OVERRIDE { descriptor_size = dsize; } + int getDescriptorSize() const CV_OVERRIDE { return descriptor_size; } - void setDescriptorChannels(int dch) { descriptor_channels = dch; } - int getDescriptorChannels() const { return descriptor_channels; } + void setDescriptorChannels(int dch) CV_OVERRIDE { descriptor_channels = dch; } + int getDescriptorChannels() const CV_OVERRIDE { return descriptor_channels; } - void setThreshold(double threshold_) { threshold = (float)threshold_; } - double getThreshold() const { return threshold; } + void setThreshold(double threshold_) CV_OVERRIDE { threshold = (float)threshold_; } + double getThreshold() const CV_OVERRIDE { return threshold; } - void setNOctaves(int octaves_) { octaves = octaves_; } - int getNOctaves() const { return octaves; } + void setNOctaves(int octaves_) CV_OVERRIDE { octaves = octaves_; } + int getNOctaves() const CV_OVERRIDE { return octaves; } - void setNOctaveLayers(int octaveLayers_) { sublevels = octaveLayers_; } - int getNOctaveLayers() const { return sublevels; } + void setNOctaveLayers(int octaveLayers_) CV_OVERRIDE { sublevels = octaveLayers_; } + int getNOctaveLayers() const CV_OVERRIDE { return sublevels; } - void setDiffusivity(int diff_) { diffusivity = diff_; } - int getDiffusivity() const { return diffusivity; } + void setDiffusivity(int diff_) CV_OVERRIDE { diffusivity = diff_; } + int getDiffusivity() const CV_OVERRIDE { return diffusivity; } // returns the descriptor size in bytes - int descriptorSize() const + int descriptorSize() const CV_OVERRIDE { switch (descriptor) { @@ -127,7 +127,7 @@ namespace cv } // returns the descriptor type - int descriptorType() const + int descriptorType() const CV_OVERRIDE { switch (descriptor) { @@ -145,7 +145,7 @@ namespace cv } // returns the default norm type - int defaultNorm() const + int defaultNorm() const CV_OVERRIDE { switch (descriptor) { @@ -165,7 +165,7 @@ namespace cv void detectAndCompute(InputArray image, InputArray mask, std::vector& keypoints, OutputArray descriptors, - bool useProvidedKeypoints) + bool useProvidedKeypoints) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -204,7 +204,7 @@ namespace cv } } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "descriptor" << descriptor; @@ -216,7 +216,7 @@ namespace cv fs << "diffusivity" << diffusivity; } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { descriptor = (int)fn["descriptor"]; descriptor_channels = (int)fn["descriptor_channels"]; diff --git a/modules/features2d/src/blobdetector.cpp b/modules/features2d/src/blobdetector.cpp index d3f6a6d709..ffcc431b58 100644 --- a/modules/features2d/src/blobdetector.cpp +++ b/modules/features2d/src/blobdetector.cpp @@ -64,8 +64,8 @@ public: explicit SimpleBlobDetectorImpl(const SimpleBlobDetector::Params ¶meters = SimpleBlobDetector::Params()); - virtual void read( const FileNode& fn ); - virtual void write( FileStorage& fs ) const; + virtual void read( const FileNode& fn ) CV_OVERRIDE; + virtual void write( FileStorage& fs ) const CV_OVERRIDE; protected: struct CV_EXPORTS Center @@ -75,7 +75,7 @@ protected: double confidence; }; - virtual void detect( InputArray image, std::vector& keypoints, InputArray mask=noArray() ); + virtual void detect( InputArray image, std::vector& keypoints, InputArray mask=noArray() ) CV_OVERRIDE; virtual void findBlobs(InputArray image, InputArray binaryImage, std::vector
¢ers) const; Params params; diff --git a/modules/features2d/src/brisk.cpp b/modules/features2d/src/brisk.cpp index 00810a62fd..bacea2b5a4 100644 --- a/modules/features2d/src/brisk.cpp +++ b/modules/features2d/src/brisk.cpp @@ -51,7 +51,7 @@ namespace cv { -class BRISK_Impl : public BRISK +class BRISK_Impl CV_FINAL : public BRISK { public: explicit BRISK_Impl(int thresh=30, int octaves=3, float patternScale=1.0f); @@ -65,17 +65,17 @@ public: virtual ~BRISK_Impl(); - int descriptorSize() const + int descriptorSize() const CV_OVERRIDE { return strings_; } - int descriptorType() const + int descriptorType() const CV_OVERRIDE { return CV_8U; } - int defaultNorm() const + int defaultNorm() const CV_OVERRIDE { return NORM_HAMMING; } @@ -90,7 +90,7 @@ public: void detectAndCompute( InputArray image, InputArray mask, CV_OUT std::vector& keypoints, OutputArray descriptors, - bool useProvidedKeypoints ); + bool useProvidedKeypoints ) CV_OVERRIDE; protected: @@ -151,11 +151,11 @@ private: // a layer in the Brisk detector pyramid -class CV_EXPORTS BriskLayer +class BriskLayer { public: // constructor arguments - struct CV_EXPORTS CommonParams + struct CommonParams { static const int HALFSAMPLE = 0; static const int TWOTHIRDSAMPLE = 1; @@ -223,7 +223,7 @@ private: int pixel_9_16_[25]; }; -class CV_EXPORTS BriskScaleSpace +class BriskScaleSpace { public: // construct telling the octaves number: diff --git a/modules/features2d/src/fast.avx2.cpp b/modules/features2d/src/fast.avx2.cpp index b319ae1c9f..ca0bcb9269 100644 --- a/modules/features2d/src/fast.avx2.cpp +++ b/modules/features2d/src/fast.avx2.cpp @@ -50,7 +50,7 @@ namespace cv 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: FAST_t_patternSize16_AVX2_Impl(int _cols, int _threshold, bool _nonmax_suppression, const int* _pixel): @@ -61,7 +61,7 @@ public: 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)); const __m256i t256 = _mm256_broadcastsi128_si256(_mm_set1_epi8(t256c)); @@ -165,7 +165,7 @@ public: _mm256_zeroupper(); } - virtual ~FAST_t_patternSize16_AVX2_Impl() {}; + virtual ~FAST_t_patternSize16_AVX2_Impl() CV_OVERRIDE {}; private: int cols; diff --git a/modules/features2d/src/fast.cpp b/modules/features2d/src/fast.cpp index 0f2a0cbc9c..106e5802cd 100644 --- a/modules/features2d/src/fast.cpp +++ b/modules/features2d/src/fast.cpp @@ -515,14 +515,14 @@ void FAST(InputArray _img, std::vector& keypoints, int threshold, bool } -class FastFeatureDetector_Impl : public FastFeatureDetector +class FastFeatureDetector_Impl CV_FINAL : public FastFeatureDetector { public: FastFeatureDetector_Impl( int _threshold, bool _nonmaxSuppression, int _type ) : threshold(_threshold), nonmaxSuppression(_nonmaxSuppression), type((short)_type) {} - void detect( InputArray _image, std::vector& keypoints, InputArray _mask ) + void detect( InputArray _image, std::vector& keypoints, InputArray _mask ) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -563,14 +563,14 @@ public: return 0; } - void setThreshold(int threshold_) { threshold = threshold_; } - int getThreshold() const { return threshold; } + void setThreshold(int threshold_) CV_OVERRIDE { threshold = threshold_; } + int getThreshold() const CV_OVERRIDE { return threshold; } - void setNonmaxSuppression(bool f) { nonmaxSuppression = f; } - bool getNonmaxSuppression() const { return nonmaxSuppression; } + void setNonmaxSuppression(bool f) CV_OVERRIDE { nonmaxSuppression = f; } + bool getNonmaxSuppression() const CV_OVERRIDE { return nonmaxSuppression; } - void setType(int type_) { type = type_; } - int getType() const { return type; } + void setType(int type_) CV_OVERRIDE { type = type_; } + int getType() const CV_OVERRIDE { return type; } int threshold; bool nonmaxSuppression; diff --git a/modules/features2d/src/gftt.cpp b/modules/features2d/src/gftt.cpp index c98e17e16b..1b8010625b 100644 --- a/modules/features2d/src/gftt.cpp +++ b/modules/features2d/src/gftt.cpp @@ -44,7 +44,7 @@ namespace cv { -class GFTTDetector_Impl : public GFTTDetector +class GFTTDetector_Impl CV_FINAL : public GFTTDetector { public: GFTTDetector_Impl( int _nfeatures, double _qualityLevel, @@ -55,28 +55,28 @@ public: { } - void setMaxFeatures(int maxFeatures) { nfeatures = maxFeatures; } - int getMaxFeatures() const { return nfeatures; } + void setMaxFeatures(int maxFeatures) CV_OVERRIDE { nfeatures = maxFeatures; } + int getMaxFeatures() const CV_OVERRIDE { return nfeatures; } - void setQualityLevel(double qlevel) { qualityLevel = qlevel; } - double getQualityLevel() const { return qualityLevel; } + void setQualityLevel(double qlevel) CV_OVERRIDE { qualityLevel = qlevel; } + double getQualityLevel() const CV_OVERRIDE { return qualityLevel; } - void setMinDistance(double minDistance_) { minDistance = minDistance_; } - double getMinDistance() const { return minDistance; } + void setMinDistance(double minDistance_) CV_OVERRIDE { minDistance = minDistance_; } + double getMinDistance() const CV_OVERRIDE { return minDistance; } - void setBlockSize(int blockSize_) { blockSize = blockSize_; } - int getBlockSize() const { return blockSize; } + void setBlockSize(int blockSize_) CV_OVERRIDE { blockSize = blockSize_; } + int getBlockSize() const CV_OVERRIDE { return blockSize; } - void setGradientSize(int gradientSize_) { gradSize = gradientSize_; } - int getGradientSize() { return gradSize; } + //void setGradientSize(int gradientSize_) { gradSize = gradientSize_; } + //int getGradientSize() { return gradSize; } - void setHarrisDetector(bool val) { useHarrisDetector = val; } - bool getHarrisDetector() const { return useHarrisDetector; } + void setHarrisDetector(bool val) CV_OVERRIDE { useHarrisDetector = val; } + bool getHarrisDetector() const CV_OVERRIDE { return useHarrisDetector; } - void setK(double k_) { k = k_; } - double getK() const { return k; } + void setK(double k_) CV_OVERRIDE { k = k_; } + double getK() const CV_OVERRIDE { return k; } - void detect( InputArray _image, std::vector& keypoints, InputArray _mask ) + void detect( InputArray _image, std::vector& keypoints, InputArray _mask ) CV_OVERRIDE { CV_INSTRUMENT_REGION() diff --git a/modules/features2d/src/kaze.cpp b/modules/features2d/src/kaze.cpp index 7f2a9ad2bb..a2c5209eeb 100644 --- a/modules/features2d/src/kaze.cpp +++ b/modules/features2d/src/kaze.cpp @@ -53,7 +53,7 @@ http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12eccv.pd namespace cv { - class KAZE_Impl : public KAZE + class KAZE_Impl CV_FINAL : public KAZE { public: KAZE_Impl(bool _extended, bool _upright, float _threshold, int _octaves, @@ -67,40 +67,40 @@ namespace cv { } - virtual ~KAZE_Impl() {} + virtual ~KAZE_Impl() CV_OVERRIDE {} - void setExtended(bool extended_) { extended = extended_; } - bool getExtended() const { return extended; } + void setExtended(bool extended_) CV_OVERRIDE { extended = extended_; } + bool getExtended() const CV_OVERRIDE { return extended; } - void setUpright(bool upright_) { upright = upright_; } - bool getUpright() const { return upright; } + void setUpright(bool upright_) CV_OVERRIDE { upright = upright_; } + bool getUpright() const CV_OVERRIDE { return upright; } - void setThreshold(double threshold_) { threshold = (float)threshold_; } - double getThreshold() const { return threshold; } + void setThreshold(double threshold_) CV_OVERRIDE { threshold = (float)threshold_; } + double getThreshold() const CV_OVERRIDE { return threshold; } - void setNOctaves(int octaves_) { octaves = octaves_; } - int getNOctaves() const { return octaves; } + void setNOctaves(int octaves_) CV_OVERRIDE { octaves = octaves_; } + int getNOctaves() const CV_OVERRIDE { return octaves; } - void setNOctaveLayers(int octaveLayers_) { sublevels = octaveLayers_; } - int getNOctaveLayers() const { return sublevels; } + void setNOctaveLayers(int octaveLayers_) CV_OVERRIDE { sublevels = octaveLayers_; } + int getNOctaveLayers() const CV_OVERRIDE { return sublevels; } - void setDiffusivity(int diff_) { diffusivity = diff_; } - int getDiffusivity() const { return diffusivity; } + void setDiffusivity(int diff_) CV_OVERRIDE { diffusivity = diff_; } + int getDiffusivity() const CV_OVERRIDE { return diffusivity; } // returns the descriptor size in bytes - int descriptorSize() const + int descriptorSize() const CV_OVERRIDE { return extended ? 128 : 64; } // returns the descriptor type - int descriptorType() const + int descriptorType() const CV_OVERRIDE { return CV_32F; } // returns the default norm type - int defaultNorm() const + int defaultNorm() const CV_OVERRIDE { return NORM_L2; } @@ -108,7 +108,7 @@ namespace cv void detectAndCompute(InputArray image, InputArray mask, std::vector& keypoints, OutputArray descriptors, - bool useProvidedKeypoints) + bool useProvidedKeypoints) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -160,7 +160,7 @@ namespace cv } } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "extended" << (int)extended; @@ -171,7 +171,7 @@ namespace cv fs << "diffusivity" << diffusivity; } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { extended = (int)fn["extended"] != 0; upright = (int)fn["upright"] != 0; diff --git a/modules/features2d/src/kaze/AKAZEFeatures.cpp b/modules/features2d/src/kaze/AKAZEFeatures.cpp index 66acc8ada7..381800eebd 100644 --- a/modules/features2d/src/kaze/AKAZEFeatures.cpp +++ b/modules/features2d/src/kaze/AKAZEFeatures.cpp @@ -237,7 +237,7 @@ public: : 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); } @@ -603,7 +603,7 @@ public: { } - void operator()(const Range& range) const + void operator()(const Range& range) const CV_OVERRIDE { MatType Lxx, Lxy, Lyy; @@ -725,7 +725,7 @@ public: : 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++) { @@ -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++) { @@ -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++) { @@ -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++) { @@ -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++) { @@ -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++) { @@ -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++) { @@ -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++) { @@ -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++) { @@ -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++) { diff --git a/modules/features2d/src/kaze/KAZEFeatures.cpp b/modules/features2d/src/kaze/KAZEFeatures.cpp index ab5a2c6afb..0cc52d9117 100644 --- a/modules/features2d/src/kaze/KAZEFeatures.cpp +++ b/modules/features2d/src/kaze/KAZEFeatures.cpp @@ -196,7 +196,7 @@ public: { } - void operator()(const Range& range) const + void operator()(const Range& range) const CV_OVERRIDE { std::vector& evolution = *evolution_; for (int i = range.start; i < range.end; i++) @@ -239,7 +239,7 @@ public: { } - void operator()(const Range& range) const + void operator()(const Range& range) const CV_OVERRIDE { std::vector& evolution = *evolution_; std::vector >& kpts_par = *kpts_par_; @@ -503,11 +503,11 @@ public: { } - void operator() (const Range& range) const + void operator() (const Range& range) const CV_OVERRIDE { - std::vector &kpts = *kpts_; - Mat &desc = *desc_; - std::vector &evolution = *evolution_; + std::vector &kpts = *kpts_; + Mat &desc = *desc_; + std::vector &evolution = *evolution_; for (int i = range.start; i < range.end; i++) { diff --git a/modules/features2d/src/kaze/nldiffusion_functions.cpp b/modules/features2d/src/kaze/nldiffusion_functions.cpp index 16b9615328..f87ca172a7 100644 --- a/modules/features2d/src/kaze/nldiffusion_functions.cpp +++ b/modules/features2d/src/kaze/nldiffusion_functions.cpp @@ -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; const cv::Mat& c = *_c; diff --git a/modules/features2d/src/mser.cpp b/modules/features2d/src/mser.cpp index eb9248c681..f37f84a936 100755 --- a/modules/features2d/src/mser.cpp +++ b/modules/features2d/src/mser.cpp @@ -48,7 +48,7 @@ namespace cv using std::vector; -class MSER_Impl : public MSER +class MSER_Impl CV_FINAL : public MSER { public: struct Params @@ -85,19 +85,19 @@ public: explicit MSER_Impl(const Params& _params) : params(_params) {} - virtual ~MSER_Impl() {} + virtual ~MSER_Impl() CV_OVERRIDE {} - void setDelta(int delta) { params.delta = delta; } - int getDelta() const { return params.delta; } + void setDelta(int delta) CV_OVERRIDE { params.delta = delta; } + int getDelta() const CV_OVERRIDE { return params.delta; } - void setMinArea(int minArea) { params.minArea = minArea; } - int getMinArea() const { return params.minArea; } + void setMinArea(int minArea) CV_OVERRIDE { params.minArea = minArea; } + int getMinArea() const CV_OVERRIDE { return params.minArea; } - void setMaxArea(int maxArea) { params.maxArea = maxArea; } - int getMaxArea() const { return params.maxArea; } + void setMaxArea(int maxArea) CV_OVERRIDE { params.maxArea = maxArea; } + int getMaxArea() const CV_OVERRIDE { return params.maxArea; } - void setPass2Only(bool f) { params.pass2Only = f; } - bool getPass2Only() const { return params.pass2Only; } + void setPass2Only(bool f) CV_OVERRIDE { params.pass2Only = f; } + bool getPass2Only() const CV_OVERRIDE { return params.pass2Only; } enum { DIR_SHIFT = 29, NEXT_MASK = ((1< >& msers, - std::vector& bboxes ); - void detect( InputArray _src, vector& keypoints, InputArray _mask ); + std::vector& bboxes ) CV_OVERRIDE; + void detect( InputArray _src, vector& keypoints, InputArray _mask ) CV_OVERRIDE; void preprocess1( const Mat& img, int* level_size ) { diff --git a/modules/features2d/src/orb.cpp b/modules/features2d/src/orb.cpp index 722e81b96f..453ddf420d 100644 --- a/modules/features2d/src/orb.cpp +++ b/modules/features2d/src/orb.cpp @@ -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: explicit ORB_Impl(int _nfeatures, float _scaleFactor, int _nlevels, int _edgeThreshold, @@ -661,43 +661,43 @@ public: scoreType(_scoreType), patchSize(_patchSize), fastThreshold(_fastThreshold) {} - void setMaxFeatures(int maxFeatures) { nfeatures = maxFeatures; } - int getMaxFeatures() const { return nfeatures; } + void setMaxFeatures(int maxFeatures) CV_OVERRIDE { nfeatures = maxFeatures; } + int getMaxFeatures() const CV_OVERRIDE { return nfeatures; } - void setScaleFactor(double scaleFactor_) { scaleFactor = scaleFactor_; } - double getScaleFactor() const { return scaleFactor; } + void setScaleFactor(double scaleFactor_) CV_OVERRIDE { scaleFactor = scaleFactor_; } + double getScaleFactor() const CV_OVERRIDE { return scaleFactor; } - void setNLevels(int nlevels_) { nlevels = nlevels_; } - int getNLevels() const { return nlevels; } + void setNLevels(int nlevels_) CV_OVERRIDE { nlevels = nlevels_; } + int getNLevels() const CV_OVERRIDE { return nlevels; } - void setEdgeThreshold(int edgeThreshold_) { edgeThreshold = edgeThreshold_; } - int getEdgeThreshold() const { return edgeThreshold; } + void setEdgeThreshold(int edgeThreshold_) CV_OVERRIDE { edgeThreshold = edgeThreshold_; } + int getEdgeThreshold() const CV_OVERRIDE { return edgeThreshold; } - void setFirstLevel(int firstLevel_) { CV_Assert(firstLevel_ >= 0); firstLevel = firstLevel_; } - int getFirstLevel() const { return firstLevel; } + void setFirstLevel(int firstLevel_) CV_OVERRIDE { CV_Assert(firstLevel_ >= 0); firstLevel = firstLevel_; } + int getFirstLevel() const CV_OVERRIDE { return firstLevel; } - void setWTA_K(int wta_k_) { wta_k = wta_k_; } - int getWTA_K() const { return wta_k; } + void setWTA_K(int wta_k_) CV_OVERRIDE { wta_k = wta_k_; } + int getWTA_K() const CV_OVERRIDE { return wta_k; } - void setScoreType(int scoreType_) { scoreType = scoreType_; } - int getScoreType() const { return scoreType; } + void setScoreType(int scoreType_) CV_OVERRIDE { scoreType = scoreType_; } + int getScoreType() const CV_OVERRIDE { return scoreType; } - void setPatchSize(int patchSize_) { patchSize = patchSize_; } - int getPatchSize() const { return patchSize; } + void setPatchSize(int patchSize_) CV_OVERRIDE { patchSize = patchSize_; } + int getPatchSize() const CV_OVERRIDE { return patchSize; } - void setFastThreshold(int fastThreshold_) { fastThreshold = fastThreshold_; } - int getFastThreshold() const { return fastThreshold; } + void setFastThreshold(int fastThreshold_) CV_OVERRIDE { fastThreshold = fastThreshold_; } + int getFastThreshold() const CV_OVERRIDE { return fastThreshold; } // returns the descriptor size in bytes - int descriptorSize() const; + int descriptorSize() const CV_OVERRIDE; // returns the descriptor type - int descriptorType() const; + int descriptorType() const CV_OVERRIDE; // returns the default norm type - int defaultNorm() const; + int defaultNorm() const CV_OVERRIDE; // Compute the ORB_Impl features and descriptors on an image void detectAndCompute( InputArray image, InputArray mask, std::vector& keypoints, - OutputArray descriptors, bool useProvidedKeypoints=false ); + OutputArray descriptors, bool useProvidedKeypoints=false ) CV_OVERRIDE; protected: