Commit ec65e5b2 authored by Alexander Alekhin's avatar Alexander Alekhin

xfeatures2d: apply CV_OVERRIDE/CV_FINAL

parent 874edea9
......@@ -210,11 +210,11 @@ public:
* @param keypoints of interest within image
* @param descriptors resulted descriptors array
*/
virtual void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors ) = 0;
virtual void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors ) CV_OVERRIDE = 0;
virtual void compute( InputArrayOfArrays images,
std::vector<std::vector<KeyPoint> >& keypoints,
OutputArrayOfArrays descriptors );
OutputArrayOfArrays descriptors ) CV_OVERRIDE;
/** @overload
* @param image image to extract descriptors
......
......@@ -589,7 +589,7 @@ namespace cv
{
namespace xfeatures2d
{
class AffineFeature2D_Impl : public AffineFeature2D
class AffineFeature2D_Impl CV_FINAL : public AffineFeature2D
{
public:
AffineFeature2D_Impl(
......@@ -599,12 +599,12 @@ public:
, m_descriptor_extractor(descriptor_extractor) {}
protected:
using Feature2D::detect; // overload, don't hide
void detect(InputArray image, std::vector<Elliptic_KeyPoint>& keypoints, InputArray mask);
void detectAndCompute(InputArray image, InputArray mask, std::vector<Elliptic_KeyPoint>& keypoints, OutputArray descriptors, bool useProvidedKeypoints);
void detectAndCompute(InputArray image, InputArray mask, std::vector<KeyPoint>& keypoints, OutputArray descriptors, bool useProvidedKeypoints);
int descriptorSize() const;
int descriptorType() const;
int defaultNorm() const;
void detect(InputArray image, std::vector<Elliptic_KeyPoint>& keypoints, InputArray mask) CV_OVERRIDE;
void detectAndCompute(InputArray image, InputArray mask, std::vector<Elliptic_KeyPoint>& keypoints, OutputArray descriptors, bool useProvidedKeypoints) CV_OVERRIDE;
void detectAndCompute(InputArray image, InputArray mask, std::vector<KeyPoint>& keypoints, OutputArray descriptors, bool useProvidedKeypoints) CV_OVERRIDE;
int descriptorSize() const CV_OVERRIDE;
int descriptorType() const CV_OVERRIDE;
int defaultNorm() const CV_OVERRIDE;
private:
Ptr<FeatureDetector> m_keypoint_detector;
Ptr<DescriptorExtractor> m_descriptor_extractor;
......
......@@ -68,7 +68,7 @@ namespace xfeatures2d
/*
!BoostDesc implementation
*/
class BoostDesc_Impl : public BoostDesc
class BoostDesc_Impl CV_FINAL : public BoostDesc
{
public:
......@@ -79,26 +79,26 @@ public:
float scale_factor = 6.25f );
// destructor
virtual ~BoostDesc_Impl();
virtual ~BoostDesc_Impl() CV_OVERRIDE;
// returns the descriptor length in bytes
virtual int descriptorSize() const { return m_descriptor_size; }
virtual int descriptorSize() const CV_OVERRIDE { return m_descriptor_size; }
// returns the descriptor type
virtual int descriptorType() const { return m_descriptor_type; }
virtual int descriptorType() const CV_OVERRIDE { return m_descriptor_type; }
// returns the default norm type
virtual int defaultNorm() const { return m_descriptor_norm; }
virtual int defaultNorm() const CV_OVERRIDE { return m_descriptor_norm; }
// compute descriptors given keypoints
virtual void compute( InputArray image, vector<KeyPoint>& keypoints, OutputArray descriptors );
virtual void compute( InputArray image, vector<KeyPoint>& keypoints, OutputArray descriptors ) CV_OVERRIDE;
// getter / setter
virtual void setUseScaleOrientation(const bool use_scale_orientation) { m_use_scale_orientation = use_scale_orientation; }
virtual bool getUseScaleOrientation() const { return m_use_scale_orientation; }
virtual void setUseScaleOrientation(const bool use_scale_orientation) CV_OVERRIDE { m_use_scale_orientation = use_scale_orientation; }
virtual bool getUseScaleOrientation() const CV_OVERRIDE { return m_use_scale_orientation; }
virtual void setScaleFactor(const float scale_factor) { m_scale_factor = scale_factor; }
virtual float getScaleFactor() const { return m_scale_factor; }
virtual void setScaleFactor(const float scale_factor) CV_OVERRIDE { m_scale_factor = scale_factor; }
virtual float getScaleFactor() const CV_OVERRIDE { return m_scale_factor; }
protected:
......@@ -415,7 +415,7 @@ struct ComputeBoostDescInvoker : ParallelLoopBody
use_scale_orientation = _use_scale_orientation;
}
void operator ()( const cv::Range& range ) const
void operator ()( const cv::Range& range ) const CV_OVERRIDE
{
// maps
vector<Mat> gradMap, integralMap;
......
......@@ -63,14 +63,14 @@ public:
// bytes is a length of descriptor in bytes. It can be equal 16, 32 or 64 bytes.
BriefDescriptorExtractorImpl( int bytes = 32, bool use_orientation = false );
virtual void read( const FileNode& );
virtual void write( FileStorage& ) const;
virtual void read( const FileNode& ) CV_OVERRIDE;
virtual void write( FileStorage& ) const CV_OVERRIDE;
virtual int descriptorSize() const;
virtual int descriptorType() const;
virtual int defaultNorm() const;
virtual int descriptorSize() const CV_OVERRIDE;
virtual int descriptorType() const CV_OVERRIDE;
virtual int defaultNorm() const CV_OVERRIDE;
virtual void compute(InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors);
virtual void compute(InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors) CV_OVERRIDE;
protected:
typedef void(*PixelTestFn)(InputArray, const std::vector<KeyPoint>&, OutputArray, bool use_orientation );
......
......@@ -83,7 +83,7 @@ void DAISY::compute( InputArrayOfArrays images,
/*
!DAISY implementation
*/
class DAISY_Impl : public DAISY
class DAISY_Impl CV_FINAL : public DAISY
{
public:
......@@ -101,39 +101,39 @@ public:
int norm = DAISY::NRM_NONE, InputArray H = noArray(),
bool interpolation = true, bool use_orientation = false);
virtual ~DAISY_Impl();
virtual ~DAISY_Impl() CV_OVERRIDE;
/** returns the descriptor length in bytes */
virtual int descriptorSize() const {
virtual int descriptorSize() const CV_OVERRIDE {
// +1 is for center pixel
return ( (m_rad_q_no * m_th_q_no + 1) * m_hist_th_q_no );
};
/** returns the descriptor type */
virtual int descriptorType() const { return CV_32F; }
virtual int descriptorType() const CV_OVERRIDE { return CV_32F; }
/** returns the default norm type */
virtual int defaultNorm() const { return NORM_L2; }
virtual int defaultNorm() const CV_OVERRIDE { return NORM_L2; }
/**
* @param image image to extract descriptors
* @param keypoints of interest within image
* @param descriptors resulted descriptors array
*/
virtual void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors );
virtual void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors ) CV_OVERRIDE;
/** @overload
* @param image image to extract descriptors
* @param roi region of interest within image
* @param descriptors resulted descriptors array
*/
virtual void compute( InputArray image, Rect roi, OutputArray descriptors );
virtual void compute( InputArray image, Rect roi, OutputArray descriptors ) CV_OVERRIDE;
/** @overload
* @param image image to extract descriptors
* @param descriptors resulted descriptors array
*/
virtual void compute( InputArray image, OutputArray descriptors );
virtual void compute( InputArray image, OutputArray descriptors ) CV_OVERRIDE;
/**
* @param y position y on image
......@@ -141,7 +141,7 @@ public:
* @param orientation orientation on image (0->360)
* @param descriptor supplied array for descriptor storage
*/
virtual void GetDescriptor( double y, double x, int orientation, float* descriptor ) const;
virtual void GetDescriptor( double y, double x, int orientation, float* descriptor ) const CV_OVERRIDE;
/**
* @param y position y on image
......@@ -150,7 +150,7 @@ public:
* @param descriptor supplied array for descriptor storage
* @param H homography matrix for warped grid
*/
virtual bool GetDescriptor( double y, double x, int orientation, float* descriptor, double* H ) const;
virtual bool GetDescriptor( double y, double x, int orientation, float* descriptor, double* H ) const CV_OVERRIDE;
/**
* @param y position y on image
......@@ -158,7 +158,7 @@ public:
* @param orientation orientation on image (0->360)
* @param descriptor supplied array for descriptor storage
*/
virtual void GetUnnormalizedDescriptor( double y, double x, int orientation, float* descriptor ) const;
virtual void GetUnnormalizedDescriptor( double y, double x, int orientation, float* descriptor ) const CV_OVERRIDE;
/**
* @param y position y on image
......@@ -167,7 +167,7 @@ public:
* @param descriptor supplied array for descriptor storage
* @param H homography matrix for warped grid
*/
virtual bool GetUnnormalizedDescriptor( double y, double x, int orientation, float* descriptor, double* H ) const;
virtual bool GetUnnormalizedDescriptor( double y, double x, int orientation, float* descriptor, double* H ) const CV_OVERRIDE;
protected:
......@@ -410,7 +410,7 @@ struct LayeredGradientInvoker : ParallelLoopBody
layer_no = layers->size[0];
}
void operator ()(const cv::Range& range) const
void operator ()(const cv::Range& range) const CV_OVERRIDE
{
for (int l = range.start; l < range.end; ++l)
{
......@@ -450,7 +450,7 @@ struct SmoothLayersInvoker : ParallelLoopBody
ks = filter_size( sigma, 5.0f );
}
void operator ()(const cv::Range& range) const
void operator ()(const cv::Range& range) const CV_OVERRIDE
{
for (int l = range.start; l < range.end; ++l)
{
......@@ -1003,7 +1003,7 @@ struct ComputeDescriptorsInvoker : ParallelLoopBody
orientation_shift_table = _orientation_shift_table;
}
void operator ()(const cv::Range& range) const
void operator ()(const cv::Range& range) const CV_OVERRIDE
{
int index, orientation;
for (int y = range.start; y < range.end; ++y)
......@@ -1064,7 +1064,7 @@ struct NormalizeDescriptorsInvoker : ParallelLoopBody
descriptor_size = _descriptor_size;
}
void operator ()(const cv::Range& range) const
void operator ()(const cv::Range& range) const CV_OVERRIDE
{
for (int d = range.start; d < range.end; ++d)
{
......@@ -1146,7 +1146,7 @@ struct ComputeHistogramsInvoker : ParallelLoopBody
_hist_th_q_no = layers->at(r).size[2];
}
void operator ()(const cv::Range& range) const
void operator ()(const cv::Range& range) const CV_OVERRIDE
{
for (int y = range.start; y < range.end; ++y)
{
......@@ -1251,7 +1251,7 @@ struct MaxDoGInvoker : ParallelLoopBody
scale_map = _scale_map;
}
void operator ()(const cv::Range& range) const
void operator ()(const cv::Range& range) const CV_OVERRIDE
{
for (int c = range.start; c < range.end; ++c)
{
......@@ -1277,7 +1277,7 @@ struct RoundingInvoker : ParallelLoopBody
scale_map = _scale_map;
}
void operator ()(const cv::Range& range) const
void operator ()(const cv::Range& range) const CV_OVERRIDE
{
for (int c = range.start; c < range.end; ++c)
{
......
......@@ -49,7 +49,7 @@ namespace xfeatures2d
/*!
FREAK implementation
*/
class FREAK_Impl : public FREAK
class FREAK_Impl CV_FINAL : public FREAK
{
public:
/** Constructor
......@@ -68,13 +68,13 @@ public:
virtual ~FREAK_Impl();
/** returns the descriptor length in bytes */
virtual int descriptorSize() const;
virtual int descriptorSize() const CV_OVERRIDE;
/** returns the descriptor type */
virtual int descriptorType() const;
virtual int descriptorType() const CV_OVERRIDE;
/** returns the default norm type */
virtual int defaultNorm() const;
virtual int defaultNorm() const CV_OVERRIDE;
/** select the 512 "best description pairs"
* @param images grayscale images set
......@@ -85,7 +85,7 @@ public:
*/
std::vector<int> selectPairs( const std::vector<Mat>& images, std::vector<std::vector<KeyPoint> >& keypoints,
const double corrThresh = 0.7, bool verbose = true );
virtual void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors );
virtual void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors ) CV_OVERRIDE;
protected:
......
......@@ -315,7 +315,7 @@ namespace xfeatures2d
/*
* HarrisLaplaceFeatureDetector_Impl
*/
class HarrisLaplaceFeatureDetector_Impl : public HarrisLaplaceFeatureDetector
class HarrisLaplaceFeatureDetector_Impl CV_FINAL : public HarrisLaplaceFeatureDetector
{
public:
HarrisLaplaceFeatureDetector_Impl(
......@@ -325,11 +325,11 @@ public:
int maxCorners=5000,
int num_layers=4
);
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:
void detect( InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask=noArray() );
void detect( InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask=noArray() ) CV_OVERRIDE;
int numOctaves;
float corn_thresh;
......
......@@ -58,21 +58,21 @@ namespace cv
/*
* LATCH Descriptor
*/
class LATCHDescriptorExtractorImpl : public LATCH
class LATCHDescriptorExtractorImpl CV_FINAL : public LATCH
{
public:
enum { PATCH_SIZE = 48 };
LATCHDescriptorExtractorImpl(int bytes = 32, bool rotationInvariance = true, int half_ssd_size = 3, double sigma = 2.0);
virtual void read( const FileNode& );
virtual void write( FileStorage& ) const;
virtual void read( const FileNode& ) CV_OVERRIDE;
virtual void write( FileStorage& ) const CV_OVERRIDE;
virtual int descriptorSize() const;
virtual int descriptorType() const;
virtual int defaultNorm() const;
virtual int descriptorSize() const CV_OVERRIDE;
virtual int descriptorType() const CV_OVERRIDE;
virtual int defaultNorm() const CV_OVERRIDE;
virtual void compute(InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors);
virtual void compute(InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors) CV_OVERRIDE;
protected:
typedef void(*PixelTestFn)(const Mat& input_image, const std::vector<KeyPoint>& keypoints, OutputArray, const std::vector<int> &points, bool rotationInvariance, int half_ssd_size);
......
......@@ -62,15 +62,15 @@ namespace cv {
LUCIDImpl(const int lucid_kernel = 1, const int blur_kernel = 2);
/** returns the descriptor length */
virtual int descriptorSize() const;
virtual int descriptorSize() const CV_OVERRIDE;
/** returns the descriptor type */
virtual int descriptorType() const;
virtual int descriptorType() const CV_OVERRIDE;
/** returns the default norm type */
virtual int defaultNorm() const;
virtual int defaultNorm() const CV_OVERRIDE;
virtual void compute(InputArray _src, std::vector<KeyPoint> &keypoints, OutputArray _desc);
virtual void compute(InputArray _src, std::vector<KeyPoint> &keypoints, OutputArray _desc) CV_OVERRIDE;
protected:
int l_kernel, b_kernel;
......
......@@ -78,7 +78,7 @@ namespace cv
}
void operator()(const Range& range) const
void operator()(const Range& range) const CV_OVERRIDE
{
for (int lvl = range.start; lvl < range.end; lvl++)
{
......@@ -152,7 +152,7 @@ namespace cv
remains = w - chunkSize*split;
}
void operator()(const Range& range) const
void operator()(const Range& range) const CV_OVERRIDE
{
for (int i = range.start; i < range.end; i++)
{
......@@ -199,7 +199,7 @@ namespace cv
{
}
void detect(InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask)
void detect(InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask) CV_OVERRIDE
{
m_mask = _mask.getMat();
......
This diff is collapsed.
......@@ -49,7 +49,7 @@ Contributed by Gregor Kovalcik <gregor dot kovalcik at gmail dot com>
References:
Martin Krulis, Jakub Lokoc, Tomas Skopal.
Efficient Extraction of Clustering-Based Feature Signatures Using GPU Architectures.
Multimedia tools and applications, 75(13), pp.: 8071–8103, Springer, ISSN: 1380-7501, 2016
Multimedia tools and applications, 75(13), pp.: 80718103, Springer, ISSN: 1380-7501, 2016
Christian Beecks, Merih Seran Uysal, Thomas Seidl.
Signature quadratic form distance.
......@@ -68,7 +68,7 @@ namespace cv
{
namespace pct_signatures
{
class PCTClusterizer_Impl : public PCTClusterizer
class PCTClusterizer_Impl CV_FINAL : public PCTClusterizer
{
public:
......@@ -95,21 +95,21 @@ namespace cv
}
int getIterationCount() const { return mIterationCount; }
std::vector<int> getInitSeedIndexes() const { return mInitSeedIndexes; }
int getMaxClustersCount() const { return mMaxClustersCount; }
int getClusterMinSize() const { return mClusterMinSize; }
float getJoiningDistance() const { return mJoiningDistance; }
float getDropThreshold() const { return mDropThreshold; }
int getDistanceFunction() const { return mDistanceFunction; }
int getIterationCount() const CV_OVERRIDE { return mIterationCount; }
std::vector<int> getInitSeedIndexes() const CV_OVERRIDE { return mInitSeedIndexes; }
int getMaxClustersCount() const CV_OVERRIDE { return mMaxClustersCount; }
int getClusterMinSize() const CV_OVERRIDE { return mClusterMinSize; }
float getJoiningDistance() const CV_OVERRIDE { return mJoiningDistance; }
float getDropThreshold() const CV_OVERRIDE { return mDropThreshold; }
int getDistanceFunction() const CV_OVERRIDE { return mDistanceFunction; }
void setIterationCount(int iterationCount) { mIterationCount = iterationCount; }
void setInitSeedIndexes(std::vector<int> initSeedIndexes) { mInitSeedIndexes = initSeedIndexes; }
void setMaxClustersCount(int maxClustersCount) { mMaxClustersCount = maxClustersCount; }
void setClusterMinSize(int clusterMinSize) { mClusterMinSize = clusterMinSize; }
void setJoiningDistance(float joiningDistance) { mJoiningDistance = joiningDistance; }
void setDropThreshold(float dropThreshold) { mDropThreshold = dropThreshold; }
void setDistanceFunction(int distanceFunction) { mDistanceFunction = distanceFunction; }
void setIterationCount(int iterationCount) CV_OVERRIDE { mIterationCount = iterationCount; }
void setInitSeedIndexes(std::vector<int> initSeedIndexes) CV_OVERRIDE { mInitSeedIndexes = initSeedIndexes; }
void setMaxClustersCount(int maxClustersCount) CV_OVERRIDE { mMaxClustersCount = maxClustersCount; }
void setClusterMinSize(int clusterMinSize) CV_OVERRIDE { mClusterMinSize = clusterMinSize; }
void setJoiningDistance(float joiningDistance) CV_OVERRIDE { mJoiningDistance = joiningDistance; }
void setDropThreshold(float dropThreshold) CV_OVERRIDE { mDropThreshold = dropThreshold; }
void setDistanceFunction(int distanceFunction) CV_OVERRIDE { mDistanceFunction = distanceFunction; }
/**
......@@ -117,7 +117,7 @@ namespace cv
* @param samples List of sampled points.
* @param signature Output list of computed centroids - the signature of the image.
*/
void clusterize(InputArray _samples, OutputArray _signature)
void clusterize(InputArray _samples, OutputArray _signature) CV_OVERRIDE
{
CV_Assert(!_samples.empty());
......
......@@ -49,7 +49,7 @@ Contributed by Gregor Kovalcik <gregor dot kovalcik at gmail dot com>
References:
Martin Krulis, Jakub Lokoc, Tomas Skopal.
Efficient Extraction of Clustering-Based Feature Signatures Using GPU Architectures.
Multimedia tools and applications, 75(13), pp.: 8071–8103, Springer, ISSN: 1380-7501, 2016
Multimedia tools and applications, 75(13), pp.: 80718103, Springer, ISSN: 1380-7501, 2016
Christian Beecks, Merih Seran Uysal, Thomas Seidl.
Signature quadratic form distance.
......@@ -67,7 +67,7 @@ namespace cv
{
namespace pct_signatures
{
class PCTSampler_Impl : public PCTSampler
class PCTSampler_Impl CV_FINAL : public PCTSampler
{
private:
/**
......@@ -119,40 +119,40 @@ namespace cv
/**** Acessors ****/
int getSampleCount() const { return (int)mInitSamplingPoints.size(); }
int getGrayscaleBits() const { return mGrayscaleBits; }
int getWindowRadius() const { return mWindowRadius; }
int getSampleCount() const CV_OVERRIDE { return (int)mInitSamplingPoints.size(); }
int getGrayscaleBits() const CV_OVERRIDE { return mGrayscaleBits; }
int getWindowRadius() const CV_OVERRIDE { return mWindowRadius; }
float getWeightX() const { return mWeights[X_IDX]; }
float getWeightY() const { return mWeights[Y_IDX]; }
float getWeightL() const { return mWeights[L_IDX]; }
float getWeightA() const { return mWeights[A_IDX]; }
float getWeightB() const { return mWeights[B_IDX]; }
float getWeightContrast() const { return mWeights[CONTRAST_IDX]; }
float getWeightEntropy() const { return mWeights[ENTROPY_IDX]; }
float getWeightX() const CV_OVERRIDE { return mWeights[X_IDX]; }
float getWeightY() const CV_OVERRIDE { return mWeights[Y_IDX]; }
float getWeightL() const CV_OVERRIDE { return mWeights[L_IDX]; }
float getWeightA() const CV_OVERRIDE { return mWeights[A_IDX]; }
float getWeightB() const CV_OVERRIDE { return mWeights[B_IDX]; }
float getWeightContrast() const CV_OVERRIDE { return mWeights[CONTRAST_IDX]; }
float getWeightEntropy() const CV_OVERRIDE { return mWeights[ENTROPY_IDX]; }
std::vector<Point2f> getSamplingPoints() const
std::vector<Point2f> getSamplingPoints() const CV_OVERRIDE
{ return mInitSamplingPoints; }
void setGrayscaleBits(int grayscaleBits) { mGrayscaleBits = grayscaleBits; }
void setWindowRadius(int windowRadius) { mWindowRadius = windowRadius; }
void setGrayscaleBits(int grayscaleBits) CV_OVERRIDE { mGrayscaleBits = grayscaleBits; }
void setWindowRadius(int windowRadius) CV_OVERRIDE { mWindowRadius = windowRadius; }
void setWeightX(float weight) { mWeights[X_IDX] = weight; }
void setWeightY(float weight) { mWeights[Y_IDX] = weight; }
void setWeightL(float weight) { mWeights[L_IDX] = weight; }
void setWeightA(float weight) { mWeights[A_IDX] = weight; }
void setWeightB(float weight) { mWeights[B_IDX] = weight; }
void setWeightContrast(float weight) { mWeights[CONTRAST_IDX] = weight; }
void setWeightEntropy(float weight) { mWeights[ENTROPY_IDX] = weight; }
void setWeightX(float weight) CV_OVERRIDE { mWeights[X_IDX] = weight; }
void setWeightY(float weight) CV_OVERRIDE { mWeights[Y_IDX] = weight; }
void setWeightL(float weight) CV_OVERRIDE { mWeights[L_IDX] = weight; }
void setWeightA(float weight) CV_OVERRIDE { mWeights[A_IDX] = weight; }
void setWeightB(float weight) CV_OVERRIDE { mWeights[B_IDX] = weight; }
void setWeightContrast(float weight) CV_OVERRIDE { mWeights[CONTRAST_IDX] = weight; }
void setWeightEntropy(float weight) CV_OVERRIDE { mWeights[ENTROPY_IDX] = weight; }
void setWeight(int idx, float value)
void setWeight(int idx, float value) CV_OVERRIDE
{
mWeights[idx] = value;
}
void setWeights(const std::vector<float>& weights)
void setWeights(const std::vector<float>& weights) CV_OVERRIDE
{
if (weights.size() != mWeights.size())
{
......@@ -168,12 +168,12 @@ namespace cv
}
}
void setTranslation(int idx, float value)
void setTranslation(int idx, float value) CV_OVERRIDE
{
mTranslations[idx] = value;
}
void setTranslations(const std::vector<float>& translations)
void setTranslations(const std::vector<float>& translations) CV_OVERRIDE
{
if (translations.size() != mTranslations.size())
{
......@@ -189,10 +189,10 @@ namespace cv
}
}
void setSamplingPoints(std::vector<Point2f> samplingPoints) { mInitSamplingPoints = samplingPoints; }
void setSamplingPoints(std::vector<Point2f> samplingPoints) CV_OVERRIDE { mInitSamplingPoints = samplingPoints; }
void sample(InputArray _image, OutputArray _samples) const
void sample(InputArray _image, OutputArray _samples) const CV_OVERRIDE
{
// prepare matrices
Mat image = _image.getMat();
......
......@@ -49,7 +49,7 @@ Contributed by Gregor Kovalcik <gregor dot kovalcik at gmail dot com>
References:
Martin Krulis, Jakub Lokoc, Tomas Skopal.
Efficient Extraction of Clustering-Based Feature Signatures Using GPU Architectures.
Multimedia tools and applications, 75(13), pp.: 80718103, Springer, ISSN: 1380-7501, 2016
Multimedia tools and applications, 75(13), pp.: 80718103, Springer, ISSN: 1380-7501, 2016
Christian Beecks, Merih Seran Uysal, Thomas Seidl.
Signature quadratic form distance.
......@@ -84,12 +84,12 @@ namespace cv
float computeQuadraticFormDistance(
InputArray _signature0,
InputArray _signature1) const;
InputArray _signature1) const CV_OVERRIDE;
void computeQuadraticFormDistances(
const Mat& sourceSignature,
const std::vector<Mat>& imageSignatures,
std::vector<float>& distances) const;
std::vector<float>& distances) const CV_OVERRIDE;
private:
......@@ -129,7 +129,7 @@ namespace cv
mDistances->resize(imageSignatures->size());
}
void operator()(const Range& range) const
void operator()(const Range& range) const CV_OVERRIDE
{
if (mSourceSignature->empty())
{
......
......@@ -125,20 +125,20 @@ public:
double sigma = 1.6);
//! returns the descriptor size in floats (128)
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;
//! finds the keypoints and computes descriptors for them using SIFT algorithm.
//! Optionally it can compute descriptors for the user-provided keypoints
void detectAndCompute(InputArray img, InputArray mask,
std::vector<KeyPoint>& keypoints,
OutputArray descriptors,
bool useProvidedKeypoints = false);
bool useProvidedKeypoints = false) CV_OVERRIDE;
void buildGaussianPyramid( const Mat& base, std::vector<Mat>& pyr, int nOctaves ) const;
void buildDoGPyramid( const std::vector<Mat>& pyr, std::vector<Mat>& dogpyr ) const;
......@@ -302,7 +302,7 @@ public:
gpyr(_gpyr),
dogpyr(_dogpyr) { }
void operator()( const cv::Range& range ) const
void operator()( const cv::Range& range ) const CV_OVERRIDE
{
const int begin = range.start;
const int end = range.end;
......@@ -605,7 +605,7 @@ public:
gauss_pyr(_gauss_pyr),
dog_pyr(_dog_pyr),
tls_kpts_struct(_tls_kpts_struct) { }
void operator()( const cv::Range& range ) const
void operator()( const cv::Range& range ) const CV_OVERRIDE
{
const int begin = range.start;
const int end = range.end;
......@@ -1046,7 +1046,7 @@ public:
nOctaveLayers(_nOctaveLayers),
firstOctave(_firstOctave) { }
void operator()( const cv::Range& range ) const
void operator()( const cv::Range& range ) const CV_OVERRIDE
{
const int begin = range.start;
const int end = range.end;
......
......@@ -60,7 +60,7 @@ public:
int _lineThresholdBinarized=8,
int _suppressNonmaxSize=5);
void detect( InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask=noArray() );
void detect( InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask=noArray() ) CV_OVERRIDE;
protected:
int maxSize;
......
......@@ -274,7 +274,7 @@ struct SURFBuildInvoker : ParallelLoopBody
traces = &_traces;
}
void operator()(const Range& range) const
void operator()(const Range& range) const CV_OVERRIDE
{
for( int i=range.start; i<range.end; i++ )
calcLayerDetAndTrace( *sum, (*sizes)[i], (*sampleSteps)[i], (*dets)[i], (*traces)[i] );
......@@ -313,7 +313,7 @@ struct SURFFindInvoker : ParallelLoopBody
const std::vector<int>& sizes, std::vector<KeyPoint>& keypoints,
int octave, int layer, float hessianThreshold, int sampleStep );
void operator()(const Range& range) const
void operator()(const Range& range) const CV_OVERRIDE
{
for( int i=range.start; i<range.end; i++ )
{
......@@ -563,7 +563,7 @@ struct SURFInvoker : ParallelLoopBody
}
}
void operator()(const Range& range) const
void operator()(const Range& range) const CV_OVERRIDE
{
/* X and Y gradient wavelet data */
const int NX=2, NY=2;
......
......@@ -24,13 +24,13 @@ public:
bool extended = true, bool upright = false);
//! returns the descriptor size in float's (64 or 128)
CV_WRAP int descriptorSize() const;
CV_WRAP int descriptorSize() const CV_OVERRIDE;
//! returns the descriptor type
CV_WRAP int descriptorType() const;
CV_WRAP int descriptorType() const CV_OVERRIDE;
//! returns the descriptor type
CV_WRAP int defaultNorm() const;
CV_WRAP int defaultNorm() const CV_OVERRIDE;
void set(int, double);
double get(int) const;
......@@ -40,22 +40,22 @@ public:
void detectAndCompute(InputArray img, InputArray mask,
CV_OUT std::vector<KeyPoint>& keypoints,
OutputArray descriptors,
bool useProvidedKeypoints = false);
bool useProvidedKeypoints = false) CV_OVERRIDE;
void setHessianThreshold(double hessianThreshold_) { hessianThreshold = hessianThreshold_; }
double getHessianThreshold() const { return hessianThreshold; }
void setHessianThreshold(double hessianThreshold_) CV_OVERRIDE { hessianThreshold = hessianThreshold_; }
double getHessianThreshold() const CV_OVERRIDE { return hessianThreshold; }
void setNOctaves(int nOctaves_) { nOctaves = nOctaves_; }
int getNOctaves() const { return nOctaves; }
void setNOctaves(int nOctaves_) CV_OVERRIDE { nOctaves = nOctaves_; }
int getNOctaves() const CV_OVERRIDE { return nOctaves; }
void setNOctaveLayers(int nOctaveLayers_) { nOctaveLayers = nOctaveLayers_; }
int getNOctaveLayers() const { return nOctaveLayers; }
void setNOctaveLayers(int nOctaveLayers_) CV_OVERRIDE { nOctaveLayers = nOctaveLayers_; }
int getNOctaveLayers() const CV_OVERRIDE { return nOctaveLayers; }
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; }
double hessianThreshold;
int nOctaves;
......
......@@ -69,7 +69,7 @@ namespace xfeatures2d
/*
!VGG implementation
*/
class VGG_Impl : public VGG
class VGG_Impl CV_FINAL : public VGG
{
public:
......@@ -80,35 +80,35 @@ public:
float scale_factor = 6.25f, bool dsc_normalize = false );
// destructor
virtual ~VGG_Impl();
virtual ~VGG_Impl() CV_OVERRIDE;
// returns the descriptor length in bytes
virtual int descriptorSize() const { return m_descriptor_size; }
virtual int descriptorSize() const CV_OVERRIDE { return m_descriptor_size; }
// returns the descriptor type
virtual int descriptorType() const { return CV_32F; }
virtual int descriptorType() const CV_OVERRIDE { return CV_32F; }
// returns the default norm type
virtual int defaultNorm() const { return NORM_L2; }
virtual int defaultNorm() const CV_OVERRIDE { return NORM_L2; }
// compute descriptors given keypoints
virtual void compute( InputArray image, vector<KeyPoint>& keypoints, OutputArray descriptors );
virtual void compute( InputArray image, vector<KeyPoint>& keypoints, OutputArray descriptors ) CV_OVERRIDE;
// getter / setter
virtual void setSigma(const float isigma) { m_isigma = isigma; }
virtual float getSigma() const { return m_isigma; }
virtual void setSigma(const float isigma) CV_OVERRIDE { m_isigma = isigma; }
virtual float getSigma() const CV_OVERRIDE { return m_isigma; }
virtual void setUseNormalizeImage(const bool img_normalize) { m_img_normalize = img_normalize; }
virtual bool getUseNormalizeImage() const { return m_img_normalize; }
virtual void setUseNormalizeImage(const bool img_normalize) CV_OVERRIDE { m_img_normalize = img_normalize; }
virtual bool getUseNormalizeImage() const CV_OVERRIDE { return m_img_normalize; }
virtual void setUseScaleOrientation(const bool use_scale_orientation) { m_use_scale_orientation = use_scale_orientation; }
virtual bool getUseScaleOrientation() const { return m_use_scale_orientation; }
virtual void setUseScaleOrientation(const bool use_scale_orientation) CV_OVERRIDE { m_use_scale_orientation = use_scale_orientation; }
virtual bool getUseScaleOrientation() const CV_OVERRIDE { return m_use_scale_orientation; }
virtual void setScaleFactor(const float scale_factor) { m_scale_factor = scale_factor; }
virtual float getScaleFactor() const { return m_scale_factor; }
virtual void setScaleFactor(const float scale_factor) CV_OVERRIDE { m_scale_factor = scale_factor; }
virtual float getScaleFactor() const CV_OVERRIDE { return m_scale_factor; }
virtual void setUseNormalizeDescriptor(const bool dsc_normalize) { m_dsc_normalize = dsc_normalize; }
virtual bool getUseNormalizeDescriptor() const { return m_dsc_normalize; }
virtual void setUseNormalizeDescriptor(const bool dsc_normalize) CV_OVERRIDE { m_dsc_normalize = dsc_normalize; }
virtual bool getUseNormalizeDescriptor() const CV_OVERRIDE { return m_dsc_normalize; }
protected:
......@@ -352,7 +352,7 @@ struct ComputeVGGInvoker : ParallelLoopBody
use_scale_orientation = _use_scale_orientation;
}
void operator ()(const cv::Range& range) const
void operator ()(const cv::Range& range) const CV_OVERRIDE
{
Mat Desc, PatchTrans;
Mat Patch( 64, 64, CV_32F );
......
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