Commit 64d58861 authored by Alexander Alekhin's avatar Alexander Alekhin

ximgproc: apply CV_OVERRIDE/CV_FINAL

parent ec65e5b2
...@@ -109,16 +109,22 @@ class AdaptiveManifoldFilterN : public AdaptiveManifoldFilter ...@@ -109,16 +109,22 @@ class AdaptiveManifoldFilterN : public AdaptiveManifoldFilter
public: public:
AdaptiveManifoldFilterN(); AdaptiveManifoldFilterN();
void filter(InputArray src, OutputArray dst, InputArray joint); void filter(InputArray src, OutputArray dst, InputArray joint) CV_OVERRIDE;
void collectGarbage(); void collectGarbage() CV_OVERRIDE;
CV_IMPL_PROPERTY(double, SigmaS, sigma_s_) inline double getSigmaS() const CV_OVERRIDE { return sigma_s_; }
CV_IMPL_PROPERTY(double, SigmaR, sigma_r_) inline void setSigmaS(double val) CV_OVERRIDE { sigma_s_ = val; }
CV_IMPL_PROPERTY(int, TreeHeight, tree_height_) inline double getSigmaR() const CV_OVERRIDE { return sigma_r_; }
CV_IMPL_PROPERTY(int, PCAIterations, num_pca_iterations_) inline void setSigmaR(double val) CV_OVERRIDE { sigma_r_ = val; }
CV_IMPL_PROPERTY(bool, AdjustOutliers, adjust_outliers_) inline int getTreeHeight() const CV_OVERRIDE { return tree_height_; }
CV_IMPL_PROPERTY(bool, UseRNG, useRNG) inline void setTreeHeight(int val) CV_OVERRIDE { tree_height_ = val; }
inline int getPCAIterations() const CV_OVERRIDE { return num_pca_iterations_; }
inline void setPCAIterations(int val) CV_OVERRIDE { num_pca_iterations_ = val; }
inline bool getAdjustOutliers() const CV_OVERRIDE { return adjust_outliers_; }
inline void setAdjustOutliers(bool val) CV_OVERRIDE { adjust_outliers_ = val; }
inline bool getUseRNG() const CV_OVERRIDE { return useRNG; }
inline void setUseRNG(bool val) CV_OVERRIDE { useRNG = val; }
protected: protected:
...@@ -257,7 +263,7 @@ private: /*Parallelization routines*/ ...@@ -257,7 +263,7 @@ private: /*Parallelization routines*/
const vector<Mat>& srcv; const vector<Mat>& srcv;
vector<Mat>& dstv; vector<Mat>& dstv;
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++)
(instancePtr->*transform)(srcv[i], dstv[i]); (instancePtr->*transform)(srcv[i], dstv[i]);
......
...@@ -92,7 +92,7 @@ public: ...@@ -92,7 +92,7 @@ public:
alpha_ = alpha; alpha_ = alpha;
} }
void operator()(const Range& range) const void operator()(const Range& range) const CV_OVERRIDE
{ {
const int cn = 3; const int cn = 3;
int cols = src->cols; int cols = src->cols;
......
...@@ -162,7 +162,7 @@ public: ...@@ -162,7 +162,7 @@ public:
verbose(false) verbose(false)
{} {}
void Verbose(bool b) { verbose = b; } void Verbose(bool b) { verbose = b; }
virtual void operator()(const Range& range) const virtual void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_Assert(img.depth()==CV_8UC1 || img.depth()==CV_8SC1 || img.depth()==CV_16SC1 || img.depth()==CV_16UC1); CV_Assert(img.depth()==CV_8UC1 || img.depth()==CV_8SC1 || img.depth()==CV_16SC1 || img.depth()==CV_16UC1);
CV_Assert(dst.depth()==CV_32FC1); CV_Assert(dst.depth()==CV_32FC1);
...@@ -209,7 +209,7 @@ public: ...@@ -209,7 +209,7 @@ public:
verbose(false) verbose(false)
{} {}
void Verbose(bool b) { verbose = b; } void Verbose(bool b) { verbose = b; }
virtual void operator()(const Range& range) const virtual void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_Assert(img.depth()==CV_32FC1); CV_Assert(img.depth()==CV_32FC1);
CV_Assert(dst.depth()==CV_32FC1); CV_Assert(dst.depth()==CV_32FC1);
...@@ -282,7 +282,7 @@ public: ...@@ -282,7 +282,7 @@ public:
verbose(false) verbose(false)
{} {}
void Verbose(bool b) { verbose = b; } void Verbose(bool b) { verbose = b; }
virtual void operator()(const Range& range) const virtual void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_Assert(img.depth()==CV_32FC1); CV_Assert(img.depth()==CV_32FC1);
CV_Assert(dst.depth()==CV_32FC1); CV_Assert(dst.depth()==CV_32FC1);
...@@ -357,7 +357,7 @@ public: ...@@ -357,7 +357,7 @@ public:
verbose(false) verbose(false)
{} {}
void Verbose(bool b) { verbose = b; } void Verbose(bool b) { verbose = b; }
virtual void operator()(const Range& range) const virtual void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_Assert(img.depth()==CV_8UC1 || img.depth()==CV_8SC1 || img.depth()==CV_16SC1 || img.depth()==CV_16UC1); CV_Assert(img.depth()==CV_8UC1 || img.depth()==CV_8SC1 || img.depth()==CV_16SC1 || img.depth()==CV_16UC1);
CV_Assert(dst.depth()==CV_32FC1); CV_Assert(dst.depth()==CV_32FC1);
......
...@@ -76,7 +76,7 @@ protected: ...@@ -76,7 +76,7 @@ protected:
int nstripes, stripe_sz; int nstripes, stripe_sz;
ComputeDiscontinuityAwareLRC_ParBody(DisparityWLSFilterImpl& _wls, Mat& _left_disp, Mat& _right_disp, Mat& _left_disc, Mat& _right_disc, Mat& _dst, Rect _left_ROI, Rect _right_ROI, int _nstripes); ComputeDiscontinuityAwareLRC_ParBody(DisparityWLSFilterImpl& _wls, Mat& _left_disp, Mat& _right_disp, Mat& _left_disc, Mat& _right_disc, Mat& _dst, Rect _left_ROI, Rect _right_ROI, int _nstripes);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
struct ComputeDepthDisc_ParBody : public ParallelLoopBody struct ComputeDepthDisc_ParBody : public ParallelLoopBody
...@@ -86,7 +86,7 @@ protected: ...@@ -86,7 +86,7 @@ protected:
int nstripes, stripe_sz; int nstripes, stripe_sz;
ComputeDepthDisc_ParBody(DisparityWLSFilterImpl& _wls, Mat& _disp, Mat& _disp_squares, Mat& _dst, int _nstripes); ComputeDepthDisc_ParBody(DisparityWLSFilterImpl& _wls, Mat& _disp, Mat& _disp_squares, Mat& _dst, int _nstripes);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
typedef void (DisparityWLSFilterImpl::*MatOp)(Mat& src, Mat& dst); typedef void (DisparityWLSFilterImpl::*MatOp)(Mat& src, Mat& dst);
...@@ -99,7 +99,7 @@ protected: ...@@ -99,7 +99,7 @@ protected:
vector<Mat*> dst; vector<Mat*> dst;
ParallelMatOp_ParBody(DisparityWLSFilterImpl& _wls, vector<MatOp> _ops, vector<Mat*>& _src, vector<Mat*>& _dst); ParallelMatOp_ParBody(DisparityWLSFilterImpl& _wls, vector<MatOp> _ops, vector<Mat*>& _src, vector<Mat*>& _dst);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
void boxFilterOp(Mat& src,Mat& dst) void boxFilterOp(Mat& src,Mat& dst)
...@@ -121,23 +121,23 @@ protected: ...@@ -121,23 +121,23 @@ protected:
public: public:
static Ptr<DisparityWLSFilterImpl> create(bool _use_confidence, int l_offs, int r_offs, int t_offs, int b_offs, int min_disp); static Ptr<DisparityWLSFilterImpl> create(bool _use_confidence, int l_offs, int r_offs, int t_offs, int b_offs, int min_disp);
void filter(InputArray disparity_map_left, InputArray left_view, OutputArray filtered_disparity_map, InputArray disparity_map_right, Rect ROI, InputArray); void filter(InputArray disparity_map_left, InputArray left_view, OutputArray filtered_disparity_map, InputArray disparity_map_right, Rect ROI, InputArray) CV_OVERRIDE;
void filter_(InputArray disparity_map_left, InputArray left_view, OutputArray filtered_disparity_map, InputArray disparity_map_right, Rect ROI); void filter_(InputArray disparity_map_left, InputArray left_view, OutputArray filtered_disparity_map, InputArray disparity_map_right, Rect ROI);
double getLambda() {return lambda;} double getLambda() CV_OVERRIDE { return lambda; }
void setLambda(double _lambda) {lambda = _lambda;} void setLambda(double _lambda) CV_OVERRIDE { lambda = _lambda; }
double getSigmaColor() {return sigma_color;} double getSigmaColor() CV_OVERRIDE { return sigma_color; }
void setSigmaColor(double _sigma_color) {sigma_color = _sigma_color;} void setSigmaColor(double _sigma_color) CV_OVERRIDE { sigma_color = _sigma_color; }
int getLRCthresh() {return LRC_thresh;} int getLRCthresh() CV_OVERRIDE { return LRC_thresh; }
void setLRCthresh(int _LRC_thresh) {LRC_thresh = _LRC_thresh;} void setLRCthresh(int _LRC_thresh) CV_OVERRIDE { LRC_thresh = _LRC_thresh; }
int getDepthDiscontinuityRadius() {return depth_discontinuity_radius;} int getDepthDiscontinuityRadius() CV_OVERRIDE { return depth_discontinuity_radius; }
void setDepthDiscontinuityRadius(int _disc_radius) {depth_discontinuity_radius = _disc_radius;} void setDepthDiscontinuityRadius(int _disc_radius) CV_OVERRIDE { depth_discontinuity_radius = _disc_radius; }
Mat getConfidenceMap() {return confidence_map;} Mat getConfidenceMap() CV_OVERRIDE { return confidence_map; }
Rect getROI() {return valid_disp_ROI;} Rect getROI() CV_OVERRIDE { return valid_disp_ROI; }
}; };
void DisparityWLSFilterImpl::init(double _lambda, double _sigma_color, bool _use_confidence, int l_offs, int r_offs, int t_offs, int b_offs, int _min_disp) void DisparityWLSFilterImpl::init(double _lambda, double _sigma_color, bool _use_confidence, int l_offs, int r_offs, int t_offs, int b_offs, int _min_disp)
......
...@@ -59,7 +59,7 @@ public: /*Non-template methods*/ ...@@ -59,7 +59,7 @@ public: /*Non-template methods*/
static Ptr<DTFilterCPU> createRF(InputArray adistHor, InputArray adistVert, double sigmaSpatial, double sigmaColor, int numIters = 3); static Ptr<DTFilterCPU> createRF(InputArray adistHor, InputArray adistVert, double sigmaSpatial, double sigmaColor, int numIters = 3);
void filter(InputArray src, OutputArray dst, int dDepth = -1); void filter(InputArray src, OutputArray dst, int dDepth = -1) CV_OVERRIDE;
void setSingleFilterCall(bool value); void setSingleFilterCall(bool value);
...@@ -141,7 +141,7 @@ protected: /*Wrappers for parallelization*/ ...@@ -141,7 +141,7 @@ protected: /*Wrappers for parallelization*/
float radius; float radius;
FilterNC_horPass(Mat& src_, Mat& idist_, Mat& dst_); FilterNC_horPass(Mat& src_, Mat& idist_, Mat& dst_);
void operator() (const Range& range) const; void operator() (const Range& range) const CV_OVERRIDE;
}; };
template <typename WorkVec> template <typename WorkVec>
...@@ -151,7 +151,7 @@ protected: /*Wrappers for parallelization*/ ...@@ -151,7 +151,7 @@ protected: /*Wrappers for parallelization*/
float radius; float radius;
FilterIC_horPass(Mat& src_, Mat& idist_, Mat& dist_, Mat& dst_); FilterIC_horPass(Mat& src_, Mat& idist_, Mat& dist_, Mat& dst_);
void operator() (const Range& range) const; void operator() (const Range& range) const CV_OVERRIDE;
}; };
template <typename WorkVec> template <typename WorkVec>
...@@ -161,7 +161,7 @@ protected: /*Wrappers for parallelization*/ ...@@ -161,7 +161,7 @@ protected: /*Wrappers for parallelization*/
int iteration; int iteration;
FilterRF_horPass(Mat& res_, Mat& alphaD_, int iteration_); FilterRF_horPass(Mat& res_, Mat& alphaD_, int iteration_);
void operator() (const Range& range) const; void operator() (const Range& range) const CV_OVERRIDE;
Range getRange() const { return Range(0, res.rows); } Range getRange() const { return Range(0, res.rows); }
}; };
...@@ -172,7 +172,7 @@ protected: /*Wrappers for parallelization*/ ...@@ -172,7 +172,7 @@ protected: /*Wrappers for parallelization*/
int iteration; int iteration;
FilterRF_vertPass(Mat& res_, Mat& alphaD_, int iteration_); FilterRF_vertPass(Mat& res_, Mat& alphaD_, int iteration_);
void operator() (const Range& range) const; void operator() (const Range& range) const CV_OVERRIDE;
#ifdef CV_GET_NUM_THREAD_WORKS_PROPERLY #ifdef CV_GET_NUM_THREAD_WORKS_PROPERLY
Range getRange() const { return Range(0, cv::getNumThreads()); } Range getRange() const { return Range(0, cv::getNumThreads()); }
#else #else
...@@ -187,7 +187,7 @@ protected: /*Wrappers for parallelization*/ ...@@ -187,7 +187,7 @@ protected: /*Wrappers for parallelization*/
Mat &guide, &dst; Mat &guide, &dst;
ComputeIDTHor_ParBody(DTFilterCPU& dtf_, Mat& guide_, Mat& dst_); ComputeIDTHor_ParBody(DTFilterCPU& dtf_, Mat& guide_, Mat& dst_);
void operator() (const Range& range) const; void operator() (const Range& range) const CV_OVERRIDE;
Range getRange() { return Range(0, guide.rows); } Range getRange() { return Range(0, guide.rows); }
}; };
...@@ -199,7 +199,7 @@ protected: /*Wrappers for parallelization*/ ...@@ -199,7 +199,7 @@ protected: /*Wrappers for parallelization*/
IDistType maxRadius; IDistType maxRadius;
ComputeDTandIDTHor_ParBody(DTFilterCPU& dtf_, Mat& guide_, Mat& dist_, Mat& idist_); ComputeDTandIDTHor_ParBody(DTFilterCPU& dtf_, Mat& guide_, Mat& dist_, Mat& idist_);
void operator() (const Range& range) const; void operator() (const Range& range) const CV_OVERRIDE;
Range getRange() { return Range(0, guide.rows); } Range getRange() { return Range(0, guide.rows); }
}; };
...@@ -211,7 +211,7 @@ protected: /*Wrappers for parallelization*/ ...@@ -211,7 +211,7 @@ protected: /*Wrappers for parallelization*/
float lna; float lna;
ComputeA0DTHor_ParBody(DTFilterCPU& dtf_, Mat& guide_); ComputeA0DTHor_ParBody(DTFilterCPU& dtf_, Mat& guide_);
void operator() (const Range& range) const; void operator() (const Range& range) const CV_OVERRIDE;
Range getRange() { return Range(0, guide.rows); } Range getRange() { return Range(0, guide.rows); }
~ComputeA0DTHor_ParBody(); ~ComputeA0DTHor_ParBody();
}; };
...@@ -224,7 +224,7 @@ protected: /*Wrappers for parallelization*/ ...@@ -224,7 +224,7 @@ protected: /*Wrappers for parallelization*/
float lna; float lna;
ComputeA0DTVert_ParBody(DTFilterCPU& dtf_, Mat& guide_); ComputeA0DTVert_ParBody(DTFilterCPU& dtf_, Mat& guide_);
void operator() (const Range& range) const; void operator() (const Range& range) const CV_OVERRIDE;
Range getRange() const { return Range(0, guide.rows - 1); } Range getRange() const { return Range(0, guide.rows - 1); }
~ComputeA0DTVert_ParBody(); ~ComputeA0DTVert_ParBody();
}; };
......
...@@ -79,10 +79,10 @@ public: ...@@ -79,10 +79,10 @@ public:
float gamma, float gamma,
float kappa); float kappa);
virtual void getBoundingBoxes(InputArray edge_map, InputArray orientation_map, std::vector<Rect> &boxes); virtual void getBoundingBoxes(InputArray edge_map, InputArray orientation_map, std::vector<Rect> &boxes) CV_OVERRIDE;
float getAlpha() const { return _alpha; } float getAlpha() const CV_OVERRIDE { return _alpha; }
void setAlpha(float value) void setAlpha(float value) CV_OVERRIDE
{ {
_alpha = value; _alpha = value;
_sxStep = sqrt(1 / _alpha); _sxStep = sqrt(1 / _alpha);
...@@ -90,38 +90,38 @@ public: ...@@ -90,38 +90,38 @@ public:
_xyStepRatio = (1 - _alpha) / (1 + _alpha); _xyStepRatio = (1 - _alpha) / (1 + _alpha);
} }
float getBeta() const { return _beta; } float getBeta() const CV_OVERRIDE { return _beta; }
void setBeta(float value) { _beta = value; } void setBeta(float value) CV_OVERRIDE { _beta = value; }
float getEta() const { return _eta; } float getEta() const CV_OVERRIDE { return _eta; }
void setEta(float value) { _eta = value; } void setEta(float value) CV_OVERRIDE { _eta = value; }
float getMinScore() const { return _minScore; } float getMinScore() const CV_OVERRIDE { return _minScore; }
void setMinScore(float value) { _minScore = value; } void setMinScore(float value) CV_OVERRIDE { _minScore = value; }
int getMaxBoxes() const { return _maxBoxes; } int getMaxBoxes() const CV_OVERRIDE { return _maxBoxes; }
void setMaxBoxes(int value) { _maxBoxes = value; } void setMaxBoxes(int value) CV_OVERRIDE { _maxBoxes = value; }
float getEdgeMinMag() const { return _edgeMinMag; } float getEdgeMinMag() const CV_OVERRIDE { return _edgeMinMag; }
void setEdgeMinMag(float value) { _edgeMinMag = value; } void setEdgeMinMag(float value) CV_OVERRIDE { _edgeMinMag = value; }
float getEdgeMergeThr() const { return _edgeMergeThr; } float getEdgeMergeThr() const CV_OVERRIDE { return _edgeMergeThr; }
void setEdgeMergeThr(float value) { _edgeMergeThr = value; } void setEdgeMergeThr(float value) CV_OVERRIDE { _edgeMergeThr = value; }
float getClusterMinMag() const { return _clusterMinMag; } float getClusterMinMag() const CV_OVERRIDE { return _clusterMinMag; }
void setClusterMinMag(float value) { _clusterMinMag = value; } void setClusterMinMag(float value) CV_OVERRIDE { _clusterMinMag = value; }
float getMaxAspectRatio() const { return _maxAspectRatio; } float getMaxAspectRatio() const CV_OVERRIDE { return _maxAspectRatio; }
void setMaxAspectRatio(float value) { _maxAspectRatio = value; } void setMaxAspectRatio(float value) CV_OVERRIDE { _maxAspectRatio = value; }
float getMinBoxArea() const { return _minBoxArea; } float getMinBoxArea() const CV_OVERRIDE { return _minBoxArea; }
void setMinBoxArea(float value) { _minBoxArea = value; } void setMinBoxArea(float value) CV_OVERRIDE { _minBoxArea = value; }
float getGamma() const { return _gamma; } float getGamma() const CV_OVERRIDE { return _gamma; }
void setGamma(float value) { _gamma = value; } void setGamma(float value) CV_OVERRIDE { _gamma = value; }
float getKappa() const { return _kappa; } float getKappa() const CV_OVERRIDE { return _kappa; }
void setKappa(float value) void setKappa(float value) CV_OVERRIDE
{ {
_kappa = value; _kappa = value;
_scaleNorm.resize(10000); _scaleNorm.resize(10000);
......
...@@ -49,7 +49,7 @@ class FastLineDetectorImpl : public FastLineDetector ...@@ -49,7 +49,7 @@ class FastLineDetectorImpl : public FastLineDetector
* a line. Where Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 is the end. * a line. Where Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 is the end.
* Returned lines are directed so that the brighter side is placed on left. * Returned lines are directed so that the brighter side is placed on left.
*/ */
void detect(InputArray _image, OutputArray _lines); void detect(InputArray _image, OutputArray _lines) CV_OVERRIDE;
/** /**
* Draw lines on the given canvas. * Draw lines on the given canvas.
...@@ -59,7 +59,7 @@ class FastLineDetectorImpl : public FastLineDetector ...@@ -59,7 +59,7 @@ class FastLineDetectorImpl : public FastLineDetector
* @param lines The lines that need to be drawn * @param lines The lines that need to be drawn
* @param draw_arrow If true, arrow heads will be drawn * @param draw_arrow If true, arrow heads will be drawn
*/ */
void drawSegments(InputOutputArray _image, InputArray lines, bool draw_arrow = false); void drawSegments(InputOutputArray _image, InputArray lines, bool draw_arrow = false) CV_OVERRIDE;
private: private:
int imagewidth, imageheight, threshold_length; int imagewidth, imageheight, threshold_length;
......
...@@ -62,7 +62,7 @@ class FastGlobalSmootherFilterImpl : public FastGlobalSmootherFilter ...@@ -62,7 +62,7 @@ class FastGlobalSmootherFilterImpl : public FastGlobalSmootherFilter
{ {
public: public:
static Ptr<FastGlobalSmootherFilterImpl> create(InputArray guide, double lambda, double sigma_color, int num_iter,double lambda_attenuation); static Ptr<FastGlobalSmootherFilterImpl> create(InputArray guide, double lambda, double sigma_color, int num_iter,double lambda_attenuation);
void filter(InputArray src, OutputArray dst); void filter(InputArray src, OutputArray dst) CV_OVERRIDE;
protected: protected:
int w,h; int w,h;
...@@ -85,7 +85,7 @@ protected: ...@@ -85,7 +85,7 @@ protected:
int h; int h;
HorizontalPass_ParBody(FastGlobalSmootherFilterImpl &_fgs, Mat& _cur, int _nstripes, int _h); HorizontalPass_ParBody(FastGlobalSmootherFilterImpl &_fgs, Mat& _cur, int _nstripes, int _h);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
inline void process_4row_block(Mat* cur,int i); inline void process_4row_block(Mat* cur,int i);
inline void process_row(Mat* cur,int i); inline void process_row(Mat* cur,int i);
...@@ -98,7 +98,7 @@ protected: ...@@ -98,7 +98,7 @@ protected:
int w; int w;
VerticalPass_ParBody(FastGlobalSmootherFilterImpl &_fgs, Mat& _cur, int _nstripes, int _w); VerticalPass_ParBody(FastGlobalSmootherFilterImpl &_fgs, Mat& _cur, int _nstripes, int _w);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
template<get_weight_op get_weight, const int num_ch> template<get_weight_op get_weight, const int num_ch>
...@@ -110,7 +110,7 @@ protected: ...@@ -110,7 +110,7 @@ protected:
int h; int h;
ComputeHorizontalWeights_ParBody(FastGlobalSmootherFilterImpl &_fgs, Mat& _guide, int _nstripes, int _h); ComputeHorizontalWeights_ParBody(FastGlobalSmootherFilterImpl &_fgs, Mat& _guide, int _nstripes, int _h);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
template<get_weight_op get_weight, const int num_ch> template<get_weight_op get_weight, const int num_ch>
...@@ -122,7 +122,7 @@ protected: ...@@ -122,7 +122,7 @@ protected:
int w; int w;
ComputeVerticalWeights_ParBody(FastGlobalSmootherFilterImpl &_fgs, Mat& _guide, int _nstripes, int _w); ComputeVerticalWeights_ParBody(FastGlobalSmootherFilterImpl &_fgs, Mat& _guide, int _nstripes, int _w);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
struct ComputeLUT_ParBody : public ParallelLoopBody struct ComputeLUT_ParBody : public ParallelLoopBody
...@@ -133,7 +133,7 @@ protected: ...@@ -133,7 +133,7 @@ protected:
int sz; int sz;
ComputeLUT_ParBody(FastGlobalSmootherFilterImpl &_fgs, WorkType* _LUT, int _nstripes, int _sz); ComputeLUT_ParBody(FastGlobalSmootherFilterImpl &_fgs, WorkType* _LUT, int _nstripes, int _sz);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
}; };
......
...@@ -106,28 +106,28 @@ namespace cv { ...@@ -106,28 +106,28 @@ namespace cv {
name_ = "GraphSegmentation"; name_ = "GraphSegmentation";
} }
~GraphSegmentationImpl() { ~GraphSegmentationImpl() CV_OVERRIDE {
}; };
virtual void processImage(InputArray src, OutputArray dst); virtual void processImage(InputArray src, OutputArray dst) CV_OVERRIDE;
virtual void setSigma(double sigma_) { if (sigma_ <= 0) { sigma_ = 0.001; } sigma = sigma_; } virtual void setSigma(double sigma_) CV_OVERRIDE { if (sigma_ <= 0) { sigma_ = 0.001; } sigma = sigma_; }
virtual double getSigma() { return sigma; } virtual double getSigma() CV_OVERRIDE { return sigma; }
virtual void setK(float k_) { k = k_; } virtual void setK(float k_) CV_OVERRIDE { k = k_; }
virtual float getK() { return k; } virtual float getK() CV_OVERRIDE { return k; }
virtual void setMinSize(int min_size_) { min_size = min_size_; } virtual void setMinSize(int min_size_) CV_OVERRIDE { min_size = min_size_; }
virtual int getMinSize() { return min_size; } virtual int getMinSize() CV_OVERRIDE { return min_size; }
virtual void write(FileStorage& fs) const { virtual void write(FileStorage& fs) const CV_OVERRIDE {
fs << "name" << name_ fs << "name" << name_
<< "sigma" << sigma << "sigma" << sigma
<< "k" << k << "k" << k
<< "min_size" << (int)min_size; << "min_size" << (int)min_size;
} }
virtual void read(const FileNode& fn) { virtual void read(const FileNode& fn) CV_OVERRIDE {
CV_Assert( (String)fn["name"] == name_ ); CV_Assert( (String)fn["name"] == name_ );
sigma = (double)fn["sigma"]; sigma = (double)fn["sigma"];
......
...@@ -130,7 +130,7 @@ public: ...@@ -130,7 +130,7 @@ public:
static Ptr<GuidedFilterImpl> create(InputArray guide, int radius, double eps); static Ptr<GuidedFilterImpl> create(InputArray guide, int radius, double eps);
void filter(InputArray src, OutputArray dst, int dDepth = -1); void filter(InputArray src, OutputArray dst, int dDepth = -1) CV_OVERRIDE;
protected: protected:
...@@ -181,7 +181,7 @@ private: /*Routines to parallelize boxFilter and convertTo*/ ...@@ -181,7 +181,7 @@ private: /*Routines to parallelize boxFilter and convertTo*/
GFTransform_ParBody(GuidedFilterImpl& gf_, vector<Mat>& srcv, vector<Mat>& dstv, TransformFunc func_); GFTransform_ParBody(GuidedFilterImpl& gf_, vector<Mat>& srcv, vector<Mat>& dstv, TransformFunc func_);
GFTransform_ParBody(GuidedFilterImpl& gf_, vector<vector<Mat> >& srcvv, vector<vector<Mat> >& dstvv, TransformFunc func_); GFTransform_ParBody(GuidedFilterImpl& gf_, vector<vector<Mat> >& srcvv, vector<vector<Mat> >& dstvv, TransformFunc func_);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
Range getRange() const Range getRange() const
{ {
...@@ -218,7 +218,7 @@ private: /*Parallel body classes*/ ...@@ -218,7 +218,7 @@ private: /*Parallel body classes*/
MulChannelsGuide_ParBody(GuidedFilterImpl& gf_, SymArray2D<Mat>& covars_) MulChannelsGuide_ParBody(GuidedFilterImpl& gf_, SymArray2D<Mat>& covars_)
: gf(gf_), covars(covars_) {} : gf(gf_), covars(covars_) {}
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
struct ComputeCovGuideFromChannelsMul_ParBody : public ParallelLoopBody struct ComputeCovGuideFromChannelsMul_ParBody : public ParallelLoopBody
...@@ -229,7 +229,7 @@ private: /*Parallel body classes*/ ...@@ -229,7 +229,7 @@ private: /*Parallel body classes*/
ComputeCovGuideFromChannelsMul_ParBody(GuidedFilterImpl& gf_, SymArray2D<Mat>& covars_) ComputeCovGuideFromChannelsMul_ParBody(GuidedFilterImpl& gf_, SymArray2D<Mat>& covars_)
: gf(gf_), covars(covars_) {} : gf(gf_), covars(covars_) {}
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
struct ComputeCovGuideInv_ParBody : public ParallelLoopBody struct ComputeCovGuideInv_ParBody : public ParallelLoopBody
...@@ -239,7 +239,7 @@ private: /*Parallel body classes*/ ...@@ -239,7 +239,7 @@ private: /*Parallel body classes*/
ComputeCovGuideInv_ParBody(GuidedFilterImpl& gf_, SymArray2D<Mat>& covars_); ComputeCovGuideInv_ParBody(GuidedFilterImpl& gf_, SymArray2D<Mat>& covars_);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
...@@ -252,7 +252,7 @@ private: /*Parallel body classes*/ ...@@ -252,7 +252,7 @@ private: /*Parallel body classes*/
MulChannelsGuideAndSrc_ParBody(GuidedFilterImpl& gf_, vector<Mat>& srcCn_, vector<vector<Mat> >& cov_) MulChannelsGuideAndSrc_ParBody(GuidedFilterImpl& gf_, vector<Mat>& srcCn_, vector<vector<Mat> >& cov_)
: gf(gf_), cov(cov_), srcCn(srcCn_) {} : gf(gf_), cov(cov_), srcCn(srcCn_) {}
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
struct ComputeCovFromSrcChannelsMul_ParBody : public ParallelLoopBody struct ComputeCovFromSrcChannelsMul_ParBody : public ParallelLoopBody
...@@ -264,7 +264,7 @@ private: /*Parallel body classes*/ ...@@ -264,7 +264,7 @@ private: /*Parallel body classes*/
ComputeCovFromSrcChannelsMul_ParBody(GuidedFilterImpl& gf_, vector<Mat>& srcCnMean_, vector<vector<Mat> >& cov_) ComputeCovFromSrcChannelsMul_ParBody(GuidedFilterImpl& gf_, vector<Mat>& srcCnMean_, vector<vector<Mat> >& cov_)
: gf(gf_), cov(cov_), srcCnMean(srcCnMean_) {} : gf(gf_), cov(cov_), srcCnMean(srcCnMean_) {}
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
struct ComputeAlpha_ParBody : public ParallelLoopBody struct ComputeAlpha_ParBody : public ParallelLoopBody
...@@ -276,7 +276,7 @@ private: /*Parallel body classes*/ ...@@ -276,7 +276,7 @@ private: /*Parallel body classes*/
ComputeAlpha_ParBody(GuidedFilterImpl& gf_, vector<vector<Mat> >& alpha_, vector<vector<Mat> >& covSrc_) ComputeAlpha_ParBody(GuidedFilterImpl& gf_, vector<vector<Mat> >& alpha_, vector<vector<Mat> >& covSrc_)
: gf(gf_), alpha(alpha_), covSrc(covSrc_) {} : gf(gf_), alpha(alpha_), covSrc(covSrc_) {}
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
struct ComputeBeta_ParBody : public ParallelLoopBody struct ComputeBeta_ParBody : public ParallelLoopBody
...@@ -289,7 +289,7 @@ private: /*Parallel body classes*/ ...@@ -289,7 +289,7 @@ private: /*Parallel body classes*/
ComputeBeta_ParBody(GuidedFilterImpl& gf_, vector<vector<Mat> >& alpha_, vector<Mat>& srcCnMean_, vector<Mat>& beta_) ComputeBeta_ParBody(GuidedFilterImpl& gf_, vector<vector<Mat> >& alpha_, vector<Mat>& srcCnMean_, vector<Mat>& beta_)
: gf(gf_), alpha(alpha_), srcCnMean(srcCnMean_), beta(beta_) {} : gf(gf_), alpha(alpha_), srcCnMean(srcCnMean_), beta(beta_) {}
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
struct ApplyTransform_ParBody : public ParallelLoopBody struct ApplyTransform_ParBody : public ParallelLoopBody
...@@ -301,7 +301,7 @@ private: /*Parallel body classes*/ ...@@ -301,7 +301,7 @@ private: /*Parallel body classes*/
ApplyTransform_ParBody(GuidedFilterImpl& gf_, vector<vector<Mat> >& alpha_, vector<Mat>& beta_) ApplyTransform_ParBody(GuidedFilterImpl& gf_, vector<vector<Mat> >& alpha_, vector<Mat>& beta_)
: gf(gf_), alpha(alpha_), beta(beta_) {} : gf(gf_), alpha(alpha_), beta(beta_) {}
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
}; };
......
...@@ -82,7 +82,7 @@ public: ...@@ -82,7 +82,7 @@ public:
CV_DbgAssert(joint.cols == src.cols && src.cols == dst.cols + 2*radius); CV_DbgAssert(joint.cols == src.cols && src.cols == dst.cols + 2*radius);
} }
void operator () (const Range& range) const void operator () (const Range& range) const CV_OVERRIDE
{ {
for (int i = radius + range.start; i < radius + range.end; i++) for (int i = radius + range.start; i < radius + range.end; i++)
{ {
...@@ -228,7 +228,7 @@ public: ...@@ -228,7 +228,7 @@ public:
CV_DbgAssert(joint.cols == src.cols && src.cols == dst.cols + 2 * radius); CV_DbgAssert(joint.cols == src.cols && src.cols == dst.cols + 2 * radius);
} }
void operator () (const Range& range) const void operator () (const Range& range) const CV_OVERRIDE
{ {
typedef Vec<int, JointVec::channels> JointVeci; typedef Vec<int, JointVec::channels> JointVeci;
typedef Vec<float, SrcVec::channels> SrcVecf; typedef Vec<float, SrcVec::channels> SrcVecf;
......
...@@ -54,7 +54,7 @@ namespace ...@@ -54,7 +54,7 @@ namespace
{ {
src_ = s; src_ = s;
} }
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++)
{ {
...@@ -72,7 +72,7 @@ namespace ...@@ -72,7 +72,7 @@ namespace
{ {
src_ = s; src_ = s;
} }
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++)
{ {
...@@ -95,7 +95,7 @@ namespace ...@@ -95,7 +95,7 @@ namespace
denom_ = denom; denom_ = denom;
dst_ = dst; dst_ = dst;
} }
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++)
{ {
......
...@@ -59,22 +59,22 @@ public: ...@@ -59,22 +59,22 @@ public:
SuperpixelLSCImpl( InputArray image, int region_size, float ratio ); SuperpixelLSCImpl( InputArray image, int region_size, float ratio );
virtual ~SuperpixelLSCImpl(); virtual ~SuperpixelLSCImpl() CV_OVERRIDE;
// perform amount of iteration // perform amount of iteration
virtual void iterate( int num_iterations = 10 ); virtual void iterate( int num_iterations = 10 ) CV_OVERRIDE;
// get amount of superpixels // get amount of superpixels
virtual int getNumberOfSuperpixels() const; virtual int getNumberOfSuperpixels() const CV_OVERRIDE;
// get image with labels // get image with labels
virtual void getLabels( OutputArray labels_out ) const; virtual void getLabels( OutputArray labels_out ) const CV_OVERRIDE;
// get mask image with contour // get mask image with contour
virtual void getLabelContourMask( OutputArray image, bool thick_line = true ) const; virtual void getLabelContourMask( OutputArray image, bool thick_line = true ) const CV_OVERRIDE;
// enforce connectivity over labels // enforce connectivity over labels
virtual void enforceLabelConnectivity( int min_element_size ); virtual void enforceLabelConnectivity( int min_element_size ) CV_OVERRIDE;
protected: protected:
...@@ -1075,7 +1075,7 @@ struct FeatureSpaceWeights : ParallelLoopBody ...@@ -1075,7 +1075,7 @@ struct FeatureSpaceWeights : ParallelLoopBody
sigmaC1 = _sigmaC1; sigmaC2 = _sigmaC2; sigmaC1 = _sigmaC1; sigmaC2 = _sigmaC2;
} }
void operator()( const Range& range ) const void operator()( const Range& range ) const CV_OVERRIDE
{ {
for( int x = range.start; x < range.end; x++ ) for( int x = range.start; x < range.end; x++ )
{ {
...@@ -1222,7 +1222,7 @@ struct FeatureSpaceCenters : ParallelLoopBody ...@@ -1222,7 +1222,7 @@ struct FeatureSpaceCenters : ParallelLoopBody
centerC1 = _centerC1; centerC2 = _centerC2; centerC1 = _centerC1; centerC2 = _centerC2;
} }
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++ )
{ {
...@@ -1364,7 +1364,7 @@ struct FeatureSpaceKmeans : ParallelLoopBody ...@@ -1364,7 +1364,7 @@ struct FeatureSpaceKmeans : ParallelLoopBody
centerC1 = _centerC1; centerC2 = _centerC2; centerC1 = _centerC1; centerC2 = _centerC2;
} }
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++ )
{ {
...@@ -1693,7 +1693,7 @@ struct FeatureNormals : ParallelLoopBody ...@@ -1693,7 +1693,7 @@ struct FeatureNormals : ParallelLoopBody
centerC1 = _centerC1; centerC2 = _centerC2; centerC1 = _centerC1; centerC2 = _centerC2;
} }
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++ )
{ {
......
...@@ -145,7 +145,7 @@ public: ...@@ -145,7 +145,7 @@ public:
verbose(false) verbose(false)
{} {}
void Verbose(bool b){verbose=b;} void Verbose(bool b){verbose=b;}
virtual void operator()(const Range& range) const virtual void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_Assert(img.depth()==CV_8UC1 || img.depth()==CV_16SC1 || img.depth()==CV_16UC1); CV_Assert(img.depth()==CV_8UC1 || img.depth()==CV_16SC1 || img.depth()==CV_16UC1);
CV_Assert(dst.depth()==CV_32FC1); CV_Assert(dst.depth()==CV_32FC1);
...@@ -193,7 +193,7 @@ public: ...@@ -193,7 +193,7 @@ public:
verbose(false) verbose(false)
{} {}
void Verbose(bool b){verbose=b;} void Verbose(bool b){verbose=b;}
virtual void operator()(const Range& range) const virtual void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_Assert(img.depth()==CV_32FC1); CV_Assert(img.depth()==CV_32FC1);
if (verbose) if (verbose)
...@@ -263,7 +263,7 @@ public: ...@@ -263,7 +263,7 @@ public:
verbose(false) verbose(false)
{} {}
void Verbose(bool b){verbose=b;} void Verbose(bool b){verbose=b;}
virtual void operator()(const Range& range) const virtual void operator()(const Range& range) const CV_OVERRIDE
{ {
CV_Assert(img.depth()==CV_32FC1); CV_Assert(img.depth()==CV_32FC1);
if (verbose) if (verbose)
...@@ -333,7 +333,7 @@ public: ...@@ -333,7 +333,7 @@ public:
verbose(false) verbose(false)
{} {}
void Verbose(bool b){verbose=b;} void Verbose(bool b){verbose=b;}
virtual void operator()(const Range& range) const virtual void operator()(const Range& range) const CV_OVERRIDE
{ {
if (verbose) if (verbose)
std::cout << getThreadNum()<<"# :Start from row " << range.start << " to " << range.end-1<<" ("<<range.end-range.start<<" loops)" << std::endl; std::cout << getThreadNum()<<"# :Start from row " << range.start << " to " << range.end-1<<" ("<<range.end-range.start<<" loops)" << std::endl;
......
...@@ -28,7 +28,7 @@ public: ...@@ -28,7 +28,7 @@ public:
_borderType = borderType; _borderType = borderType;
_out_dtype = out_dtype; _out_dtype = out_dtype;
} }
virtual void getRidgeFilteredImage(InputArray _img, OutputArray out); virtual void getRidgeFilteredImage(InputArray _img, OutputArray out) CV_OVERRIDE;
}; };
void RidgeDetectionFilterImpl::getRidgeFilteredImage(InputArray _img, OutputArray out) void RidgeDetectionFilterImpl::getRidgeFilteredImage(InputArray _img, OutputArray out)
......
...@@ -79,13 +79,13 @@ public: ...@@ -79,13 +79,13 @@ public:
virtual ~SuperpixelSEEDSImpl(); virtual ~SuperpixelSEEDSImpl();
virtual int getNumberOfSuperpixels() { return nrLabels(seeds_top_level); } virtual int getNumberOfSuperpixels() CV_OVERRIDE { return nrLabels(seeds_top_level); }
virtual void iterate(InputArray img, int num_iterations = 4); virtual void iterate(InputArray img, int num_iterations = 4) CV_OVERRIDE;
virtual void getLabels(OutputArray labels_out); virtual void getLabels(OutputArray labels_out) CV_OVERRIDE;
virtual void getLabelContourMask(OutputArray image, bool thick_line = false); virtual void getLabelContourMask(OutputArray image, bool thick_line = false) CV_OVERRIDE;
private: private:
/* initialization */ /* initialization */
......
...@@ -113,16 +113,16 @@ namespace cv { ...@@ -113,16 +113,16 @@ namespace cv {
* Stragegy / Color * Stragegy / Color
***************************************/ ***************************************/
class SelectiveSearchSegmentationStrategyColorImpl : public SelectiveSearchSegmentationStrategyColor { class SelectiveSearchSegmentationStrategyColorImpl CV_FINAL : public SelectiveSearchSegmentationStrategyColor {
public: public:
SelectiveSearchSegmentationStrategyColorImpl() { SelectiveSearchSegmentationStrategyColorImpl() {
name_ = "SelectiveSearchSegmentationStrategyColor"; name_ = "SelectiveSearchSegmentationStrategyColor";
last_image_id = -1; last_image_id = -1;
} }
virtual void setImage(InputArray img, InputArray regions, InputArray sizes, int image_id = -1); virtual void setImage(InputArray img, InputArray regions, InputArray sizes, int image_id = -1) CV_OVERRIDE;
virtual float get(int r1, int r2); virtual float get(int r1, int r2) CV_OVERRIDE;
virtual void merge(int r1, int r2); virtual void merge(int r1, int r2) CV_OVERRIDE;
private: private:
String name_; String name_;
...@@ -242,19 +242,19 @@ namespace cv { ...@@ -242,19 +242,19 @@ namespace cv {
* Stragegy / Multiple * Stragegy / Multiple
***************************************/ ***************************************/
class SelectiveSearchSegmentationStrategyMultipleImpl : public SelectiveSearchSegmentationStrategyMultiple { class SelectiveSearchSegmentationStrategyMultipleImpl CV_FINAL : public SelectiveSearchSegmentationStrategyMultiple {
public: public:
SelectiveSearchSegmentationStrategyMultipleImpl() { SelectiveSearchSegmentationStrategyMultipleImpl() {
name_ = "SelectiveSearchSegmentationStrategyMultiple"; name_ = "SelectiveSearchSegmentationStrategyMultiple";
weights_total = 0; weights_total = 0;
} }
virtual void setImage(InputArray img, InputArray regions, InputArray sizes, int image_id = -1); virtual void setImage(InputArray img, InputArray regions, InputArray sizes, int image_id = -1) CV_OVERRIDE;
virtual float get(int r1, int r2); virtual float get(int r1, int r2) CV_OVERRIDE;
virtual void merge(int r1, int r2); virtual void merge(int r1, int r2) CV_OVERRIDE;
virtual void addStrategy(Ptr<SelectiveSearchSegmentationStrategy> g, float weight); virtual void addStrategy(Ptr<SelectiveSearchSegmentationStrategy> g, float weight) CV_OVERRIDE;
virtual void clearStrategies(); virtual void clearStrategies() CV_OVERRIDE;
private: private:
String name_; String name_;
...@@ -346,15 +346,15 @@ namespace cv { ...@@ -346,15 +346,15 @@ namespace cv {
* Stragegy / Size * Stragegy / Size
***************************************/ ***************************************/
class SelectiveSearchSegmentationStrategySizeImpl : public SelectiveSearchSegmentationStrategySize { class SelectiveSearchSegmentationStrategySizeImpl CV_FINAL : public SelectiveSearchSegmentationStrategySize {
public: public:
SelectiveSearchSegmentationStrategySizeImpl() { SelectiveSearchSegmentationStrategySizeImpl() {
name_ = "SelectiveSearchSegmentationStrategySize"; name_ = "SelectiveSearchSegmentationStrategySize";
} }
virtual void setImage(InputArray img, InputArray regions, InputArray sizes, int image_id = -1); virtual void setImage(InputArray img, InputArray regions, InputArray sizes, int image_id = -1) CV_OVERRIDE;
virtual float get(int r1, int r2); virtual float get(int r1, int r2) CV_OVERRIDE;
virtual void merge(int r1, int r2); virtual void merge(int r1, int r2) CV_OVERRIDE;
private: private:
String name_; String name_;
...@@ -393,15 +393,15 @@ namespace cv { ...@@ -393,15 +393,15 @@ namespace cv {
* Stragegy / Fill * Stragegy / Fill
***************************************/ ***************************************/
class SelectiveSearchSegmentationStrategyFillImpl : public SelectiveSearchSegmentationStrategyFill { class SelectiveSearchSegmentationStrategyFillImpl CV_FINAL : public SelectiveSearchSegmentationStrategyFill {
public: public:
SelectiveSearchSegmentationStrategyFillImpl() { SelectiveSearchSegmentationStrategyFillImpl() {
name_ = "SelectiveSearchSegmentationStrategyFill"; name_ = "SelectiveSearchSegmentationStrategyFill";
} }
virtual void setImage(InputArray img, InputArray regions, InputArray sizes, int image_id = -1); virtual void setImage(InputArray img, InputArray regions, InputArray sizes, int image_id = -1) CV_OVERRIDE;
virtual float get(int r1, int r2); virtual float get(int r1, int r2) CV_OVERRIDE;
virtual void merge(int r1, int r2); virtual void merge(int r1, int r2) CV_OVERRIDE;
private: private:
String name_; String name_;
...@@ -471,16 +471,16 @@ namespace cv { ...@@ -471,16 +471,16 @@ namespace cv {
* Stragegy / Texture * Stragegy / Texture
***************************************/ ***************************************/
class SelectiveSearchSegmentationStrategyTextureImpl : public SelectiveSearchSegmentationStrategyTexture { class SelectiveSearchSegmentationStrategyTextureImpl CV_FINAL : public SelectiveSearchSegmentationStrategyTexture {
public: public:
SelectiveSearchSegmentationStrategyTextureImpl() { SelectiveSearchSegmentationStrategyTextureImpl() {
name_ = "SelectiveSearchSegmentationStrategyTexture"; name_ = "SelectiveSearchSegmentationStrategyTexture";
last_image_id = -1; last_image_id = -1;
} }
virtual void setImage(InputArray img, InputArray regions, InputArray sizes, int image_id = -1); virtual void setImage(InputArray img, InputArray regions, InputArray sizes, int image_id = -1) CV_OVERRIDE;
virtual float get(int r1, int r2); virtual float get(int r1, int r2) CV_OVERRIDE;
virtual void merge(int r1, int r2); virtual void merge(int r1, int r2) CV_OVERRIDE;
private: private:
String name_; String name_;
...@@ -678,39 +678,39 @@ namespace cv { ...@@ -678,39 +678,39 @@ namespace cv {
// Core // Core
class SelectiveSearchSegmentationImpl : public SelectiveSearchSegmentation { class SelectiveSearchSegmentationImpl CV_FINAL : public SelectiveSearchSegmentation {
public: public:
SelectiveSearchSegmentationImpl() { SelectiveSearchSegmentationImpl() {
name_ = "SelectiveSearchSegmentation"; name_ = "SelectiveSearchSegmentation";
} }
~SelectiveSearchSegmentationImpl() { ~SelectiveSearchSegmentationImpl() CV_OVERRIDE {
}; };
virtual void write(FileStorage& fs) const { virtual void write(FileStorage& fs) const CV_OVERRIDE {
fs << "name" << name_; fs << "name" << name_;
} }
virtual void read(const FileNode& fn) { virtual void read(const FileNode& fn) CV_OVERRIDE {
CV_Assert( (String)fn["name"] == name_); CV_Assert( (String)fn["name"] == name_);
} }
virtual void setBaseImage(InputArray img); virtual void setBaseImage(InputArray img) CV_OVERRIDE;
virtual void switchToSingleStrategy(int k = 200, float sigma = 0.8); virtual void switchToSingleStrategy(int k = 200, float sigma = 0.8) CV_OVERRIDE;
virtual void switchToSelectiveSearchFast(int base_k = 150, int inc_k = 150, float sigma = 0.8); virtual void switchToSelectiveSearchFast(int base_k = 150, int inc_k = 150, float sigma = 0.8) CV_OVERRIDE;
virtual void switchToSelectiveSearchQuality(int base_k = 150, int inc_k = 150, float sigma = 0.8); virtual void switchToSelectiveSearchQuality(int base_k = 150, int inc_k = 150, float sigma = 0.8) CV_OVERRIDE;
virtual void addImage(InputArray img); virtual void addImage(InputArray img) CV_OVERRIDE;
virtual void clearImages(); virtual void clearImages() CV_OVERRIDE;
virtual void addGraphSegmentation(Ptr<GraphSegmentation> g); virtual void addGraphSegmentation(Ptr<GraphSegmentation> g) CV_OVERRIDE;
virtual void clearGraphSegmentations(); virtual void clearGraphSegmentations() CV_OVERRIDE;
virtual void addStrategy(Ptr<SelectiveSearchSegmentationStrategy> s); virtual void addStrategy(Ptr<SelectiveSearchSegmentationStrategy> s) CV_OVERRIDE;
virtual void clearStrategies(); virtual void clearStrategies() CV_OVERRIDE;
virtual void process(std::vector<Rect>& rects); virtual void process(std::vector<Rect>& rects) CV_OVERRIDE;
private: private:
......
...@@ -72,22 +72,22 @@ public: ...@@ -72,22 +72,22 @@ public:
SuperpixelSLICImpl( InputArray image, int algorithm, int region_size, float ruler ); SuperpixelSLICImpl( InputArray image, int algorithm, int region_size, float ruler );
virtual ~SuperpixelSLICImpl(); virtual ~SuperpixelSLICImpl() CV_OVERRIDE;
// perform amount of iteration // perform amount of iteration
virtual void iterate( int num_iterations = 10 ); virtual void iterate( int num_iterations = 10 ) CV_OVERRIDE;
// get amount of superpixels // get amount of superpixels
virtual int getNumberOfSuperpixels() const; virtual int getNumberOfSuperpixels() const CV_OVERRIDE;
// get image with labels // get image with labels
virtual void getLabels( OutputArray labels_out ) const; virtual void getLabels( OutputArray labels_out ) const CV_OVERRIDE;
// get mask image with contour // get mask image with contour
virtual void getLabelContourMask( OutputArray image, bool thick_line = true ) const; virtual void getLabelContourMask( OutputArray image, bool thick_line = true ) const CV_OVERRIDE;
// enforce connectivity over labels // enforce connectivity over labels
virtual void enforceLabelConnectivity( int min_element_size = 25 ); virtual void enforceLabelConnectivity( int min_element_size = 25 ) CV_OVERRIDE;
protected: protected:
...@@ -840,7 +840,7 @@ struct SeedNormInvoker : ParallelLoopBody ...@@ -840,7 +840,7 @@ struct SeedNormInvoker : ParallelLoopBody
clustersize = _clustersize; clustersize = _clustersize;
} }
void operator ()(const cv::Range& range) const void operator ()(const cv::Range& range) const CV_OVERRIDE
{ {
for (int k = range.start; k < range.end; ++k) for (int k = range.start; k < range.end; ++k)
{ {
...@@ -1009,7 +1009,7 @@ struct SLICOGrowInvoker : ParallelLoopBody ...@@ -1009,7 +1009,7 @@ struct SLICOGrowInvoker : ParallelLoopBody
nr_channels = _nr_channels; nr_channels = _nr_channels;
} }
void operator ()(const cv::Range& range) const void operator ()(const cv::Range& range) const CV_OVERRIDE
{ {
int cols = klabels->cols; int cols = klabels->cols;
int rows = klabels->rows; int rows = klabels->rows;
...@@ -1221,7 +1221,7 @@ struct SLICGrowInvoker : ParallelLoopBody ...@@ -1221,7 +1221,7 @@ struct SLICGrowInvoker : ParallelLoopBody
nr_channels = _nr_channels; nr_channels = _nr_channels;
} }
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) for (int y = range.start; y < range.end; ++y)
{ {
......
...@@ -69,11 +69,11 @@ struct node ...@@ -69,11 +69,11 @@ struct node
node(short l,float d): dist(d), label(l) {} node(short l,float d): dist(d), label(l) {}
}; };
class EdgeAwareInterpolatorImpl : public EdgeAwareInterpolator class EdgeAwareInterpolatorImpl CV_FINAL : public EdgeAwareInterpolator
{ {
public: public:
static Ptr<EdgeAwareInterpolatorImpl> create(); static Ptr<EdgeAwareInterpolatorImpl> create();
void interpolate(InputArray from_image, InputArray from_points, InputArray to_image, InputArray to_points, OutputArray dense_flow); void interpolate(InputArray from_image, InputArray from_points, InputArray to_image, InputArray to_points, OutputArray dense_flow) CV_OVERRIDE;
protected: protected:
int w,h; int w,h;
...@@ -115,7 +115,7 @@ protected: ...@@ -115,7 +115,7 @@ protected:
int stripe_sz; int stripe_sz;
GetKNNMatches_ParBody(EdgeAwareInterpolatorImpl& _inst, int _num_stripes); GetKNNMatches_ParBody(EdgeAwareInterpolatorImpl& _inst, int _num_stripes);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
struct RansacInterpolation_ParBody : public ParallelLoopBody struct RansacInterpolation_ParBody : public ParallelLoopBody
...@@ -130,22 +130,22 @@ protected: ...@@ -130,22 +130,22 @@ protected:
int inc; int inc;
RansacInterpolation_ParBody(EdgeAwareInterpolatorImpl& _inst, Mat* _transforms, float* _weighted_inlier_nums, float* _eps, SparseMatch* _matches, int _num_stripes, int _inc); RansacInterpolation_ParBody(EdgeAwareInterpolatorImpl& _inst, Mat* _transforms, float* _weighted_inlier_nums, float* _eps, SparseMatch* _matches, int _num_stripes, int _inc);
void operator () (const Range& range) const; void operator () (const Range& range) const CV_OVERRIDE;
}; };
public: public:
void setK(int _k) {k=_k;} void setK(int _k) CV_OVERRIDE {k=_k;}
int getK() {return k;} int getK() CV_OVERRIDE {return k;}
void setSigma(float _sigma) {sigma=_sigma;} void setSigma(float _sigma) CV_OVERRIDE {sigma=_sigma;}
float getSigma() {return sigma;} float getSigma() CV_OVERRIDE {return sigma;}
void setLambda(float _lambda) {lambda=_lambda;} void setLambda(float _lambda) CV_OVERRIDE {lambda=_lambda;}
float getLambda() {return lambda;} float getLambda() CV_OVERRIDE {return lambda;}
void setUsePostProcessing(bool _use_post_proc) {use_post_proc=_use_post_proc;} void setUsePostProcessing(bool _use_post_proc) CV_OVERRIDE {use_post_proc=_use_post_proc;}
bool getUsePostProcessing() {return use_post_proc;} bool getUsePostProcessing() CV_OVERRIDE {return use_post_proc;}
void setFGSLambda(float _lambda) {fgs_lambda=_lambda;} void setFGSLambda(float _lambda) CV_OVERRIDE {fgs_lambda=_lambda;}
float getFGSLambda() {return fgs_lambda;} float getFGSLambda() CV_OVERRIDE {return fgs_lambda;}
void setFGSSigma(float _sigma) {fgs_sigma = _sigma;} void setFGSSigma(float _sigma) CV_OVERRIDE {fgs_sigma = _sigma;}
float getFGSSigma() {return fgs_sigma;} float getFGSSigma() CV_OVERRIDE {return fgs_sigma;}
}; };
void EdgeAwareInterpolatorImpl::init() void EdgeAwareInterpolatorImpl::init()
......
...@@ -281,7 +281,7 @@ public: ...@@ -281,7 +281,7 @@ public:
{ {
} }
void operator()(const cv::Range &range) const void operator()(const cv::Range &range) const CV_OVERRIDE
{ {
for (int x = range.start; x < range.end; x++) for (int x = range.start; x < range.end; x++)
{ {
...@@ -359,7 +359,7 @@ public: ...@@ -359,7 +359,7 @@ public:
* \param gradNum : __rf.options.numberOfGradientOrientations * \param gradNum : __rf.options.numberOfGradientOrientations
*/ */
virtual void getFeatures(const Mat &src, Mat &features, const int gnrmRad, const int gsmthRad, virtual void getFeatures(const Mat &src, Mat &features, const int gnrmRad, const int gsmthRad,
const int shrink, const int outNum, const int gradNum) const const int shrink, const int outNum, const int gradNum) const CV_OVERRIDE
{ {
cv::Mat luvImg = rgb2luv(src); cv::Mat luvImg = rgb2luv(src);
...@@ -524,7 +524,7 @@ public: ...@@ -524,7 +524,7 @@ public:
* \param _dst : destination image (grayscale, float, in [0;1]) * \param _dst : destination image (grayscale, float, in [0;1])
* where edges are drawn * where edges are drawn
*/ */
void detectEdges(cv::InputArray _src, cv::OutputArray _dst) const void detectEdges(cv::InputArray _src, cv::OutputArray _dst) const CV_OVERRIDE
{ {
CV_Assert( _src.type() == CV_32FC3 ); CV_Assert( _src.type() == CV_32FC3 );
...@@ -556,7 +556,7 @@ public: ...@@ -556,7 +556,7 @@ public:
* \param dst : orientation image. * \param dst : orientation image.
* \param r : filter radius. * \param r : filter radius.
*/ */
void computeOrientation(cv::InputArray _src, cv::OutputArray _dst) const void computeOrientation(cv::InputArray _src, cv::OutputArray _dst) const CV_OVERRIDE
{ {
CV_Assert( _src.type() == CV_32FC1 ); CV_Assert( _src.type() == CV_32FC1 );
...@@ -596,7 +596,7 @@ public: ...@@ -596,7 +596,7 @@ public:
* \param m : multiplier for conservative suppression. * \param m : multiplier for conservative suppression.
* \param isParallel: enables/disables parallel computing. * \param isParallel: enables/disables parallel computing.
*/ */
void edgesNms(cv::InputArray edge_image, cv::InputArray orientation_image, cv::OutputArray _dst, int r, int s, float m, bool isParallel) const void edgesNms(cv::InputArray edge_image, cv::InputArray orientation_image, cv::OutputArray _dst, int r, int s, float m, bool isParallel) const CV_OVERRIDE
{ {
CV_Assert(edge_image.type() == CV_32FC1); CV_Assert(edge_image.type() == CV_32FC1);
CV_Assert(orientation_image.type() == CV_32FC1); CV_Assert(orientation_image.type() == CV_32FC1);
......
...@@ -149,12 +149,18 @@ using namespace cv::ximgproc; ...@@ -149,12 +149,18 @@ using namespace cv::ximgproc;
void collectGarbage(); void collectGarbage();
CV_IMPL_PROPERTY(double, SigmaS, sigma_s_) inline double getSigmaS() const CV_OVERRIDE { return sigma_s_; }
CV_IMPL_PROPERTY(double, SigmaR, sigma_r_) inline void setSigmaS(double val) CV_OVERRIDE { sigma_s_ = val; }
CV_IMPL_PROPERTY(int, TreeHeight, tree_height_) inline double getSigmaR() const CV_OVERRIDE { return sigma_r_; }
CV_IMPL_PROPERTY(int, PCAIterations, num_pca_iterations_) inline void setSigmaR(double val) CV_OVERRIDE { sigma_r_ = val; }
CV_IMPL_PROPERTY(bool, AdjustOutliers, adjust_outliers_) inline int getTreeHeight() const CV_OVERRIDE { return tree_height_; }
CV_IMPL_PROPERTY(bool, UseRNG, useRNG) inline void setTreeHeight(int val) CV_OVERRIDE { tree_height_ = val; }
inline int getPCAIterations() const CV_OVERRIDE { return num_pca_iterations_; }
inline void setPCAIterations(int val) CV_OVERRIDE { num_pca_iterations_ = val; }
inline bool getAdjustOutliers() const CV_OVERRIDE { return adjust_outliers_; }
inline void setAdjustOutliers(bool val) CV_OVERRIDE { adjust_outliers_ = val; }
inline bool getUseRNG() const CV_OVERRIDE { return useRNG; }
inline void setUseRNG(bool val) CV_OVERRIDE { useRNG = val; }
protected: protected:
bool adjust_outliers_; bool adjust_outliers_;
......
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