diff --git a/modules/photo/include/opencv2/photo.hpp b/modules/photo/include/opencv2/photo.hpp index 487b720fe0..8cd1971899 100644 --- a/modules/photo/include/opencv2/photo.hpp +++ b/modules/photo/include/opencv2/photo.hpp @@ -502,7 +502,7 @@ class CV_EXPORTS_W AlignMTB : public AlignExposures { public: CV_WRAP virtual void process(InputArrayOfArrays src, std::vector& dst, - InputArray times, InputArray response) = 0; + InputArray times, InputArray response) CV_OVERRIDE = 0; /** @brief Short version of process, that doesn't take extra arguments. @@ -646,7 +646,7 @@ class CV_EXPORTS_W MergeDebevec : public MergeExposures { public: CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst, - InputArray times, InputArray response) = 0; + InputArray times, InputArray response) CV_OVERRIDE = 0; CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst, InputArray times) = 0; }; @@ -669,7 +669,7 @@ class CV_EXPORTS_W MergeMertens : public MergeExposures { public: CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst, - InputArray times, InputArray response) = 0; + InputArray times, InputArray response) CV_OVERRIDE = 0; /** @brief Short version of process, that doesn't take extra arguments. @param src vector of input images @@ -705,7 +705,7 @@ class CV_EXPORTS_W MergeRobertson : public MergeExposures { public: CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst, - InputArray times, InputArray response) = 0; + InputArray times, InputArray response) CV_OVERRIDE = 0; CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst, InputArray times) = 0; }; diff --git a/modules/photo/src/align.cpp b/modules/photo/src/align.cpp index 02087117e1..cfb8a5d84b 100644 --- a/modules/photo/src/align.cpp +++ b/modules/photo/src/align.cpp @@ -47,7 +47,7 @@ namespace cv { -class AlignMTBImpl : public AlignMTB +class AlignMTBImpl CV_FINAL : public AlignMTB { public: AlignMTBImpl(int _max_bits, int _exclude_range, bool _cut) : @@ -59,14 +59,14 @@ public: } void process(InputArrayOfArrays src, std::vector& dst, - InputArray, InputArray) + InputArray, InputArray) CV_OVERRIDE { CV_INSTRUMENT_REGION() process(src, dst); } - void process(InputArrayOfArrays _src, std::vector& dst) + void process(InputArrayOfArrays _src, std::vector& dst) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -116,7 +116,7 @@ public: } } - Point calculateShift(InputArray _img0, InputArray _img1) + Point calculateShift(InputArray _img0, InputArray _img1) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -164,7 +164,7 @@ public: return shift; } - void shiftMat(InputArray _src, OutputArray _dst, const Point shift) + void shiftMat(InputArray _src, OutputArray _dst, const Point shift) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -181,16 +181,16 @@ public: res.copyTo(dst); } - int getMaxBits() const { return max_bits; } - void setMaxBits(int val) { max_bits = val; } + int getMaxBits() const CV_OVERRIDE { return max_bits; } + void setMaxBits(int val) CV_OVERRIDE { max_bits = val; } - int getExcludeRange() const { return exclude_range; } - void setExcludeRange(int val) { exclude_range = val; } + int getExcludeRange() const CV_OVERRIDE { return exclude_range; } + void setExcludeRange(int val) CV_OVERRIDE { exclude_range = val; } - bool getCut() const { return cut; } - void setCut(bool val) { cut = val; } + bool getCut() const CV_OVERRIDE { return cut; } + void setCut(bool val) CV_OVERRIDE { cut = val; } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "name" << name @@ -199,7 +199,7 @@ public: << "cut" << static_cast(cut); } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); @@ -209,7 +209,7 @@ public: cut = (cut_val != 0); } - void computeBitmaps(InputArray _img, OutputArray _tb, OutputArray _eb) + void computeBitmaps(InputArray _img, OutputArray _tb, OutputArray _eb) CV_OVERRIDE { CV_INSTRUMENT_REGION() diff --git a/modules/photo/src/calibrate.cpp b/modules/photo/src/calibrate.cpp index a17f138bd3..088cfbb6e0 100644 --- a/modules/photo/src/calibrate.cpp +++ b/modules/photo/src/calibrate.cpp @@ -48,7 +48,7 @@ namespace cv { -class CalibrateDebevecImpl : public CalibrateDebevec +class CalibrateDebevecImpl CV_FINAL : public CalibrateDebevec { public: CalibrateDebevecImpl(int _samples, float _lambda, bool _random) : @@ -60,7 +60,7 @@ public: { } - void process(InputArrayOfArrays src, OutputArray dst, InputArray _times) + void process(InputArrayOfArrays src, OutputArray dst, InputArray _times) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -158,16 +158,16 @@ public: exp(result, result); } - int getSamples() const { return samples; } - void setSamples(int val) { samples = val; } + int getSamples() const CV_OVERRIDE { return samples; } + void setSamples(int val) CV_OVERRIDE { samples = val; } - float getLambda() const { return lambda; } - void setLambda(float val) { lambda = val; } + float getLambda() const CV_OVERRIDE { return lambda; } + void setLambda(float val) CV_OVERRIDE { lambda = val; } - bool getRandom() const { return random; } - void setRandom(bool val) { random = val; } + bool getRandom() const CV_OVERRIDE { return random; } + void setRandom(bool val) CV_OVERRIDE { random = val; } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "name" << name @@ -176,7 +176,7 @@ public: << "random" << static_cast(random); } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); @@ -199,7 +199,7 @@ Ptr createCalibrateDebevec(int samples, float lambda, bool ran return makePtr(samples, lambda, random); } -class CalibrateRobertsonImpl : public CalibrateRobertson +class CalibrateRobertsonImpl CV_FINAL : public CalibrateRobertson { public: CalibrateRobertsonImpl(int _max_iter, float _threshold) : @@ -210,7 +210,7 @@ public: { } - void process(InputArrayOfArrays src, OutputArray dst, InputArray _times) + void process(InputArrayOfArrays src, OutputArray dst, InputArray _times) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -272,15 +272,15 @@ public: } } - int getMaxIter() const { return max_iter; } - void setMaxIter(int val) { max_iter = val; } + int getMaxIter() const CV_OVERRIDE { return max_iter; } + void setMaxIter(int val) CV_OVERRIDE { max_iter = val; } - float getThreshold() const { return threshold; } - void setThreshold(float val) { threshold = val; } + float getThreshold() const CV_OVERRIDE { return threshold; } + void setThreshold(float val) CV_OVERRIDE { threshold = val; } - Mat getRadiance() const { return radiance; } + Mat getRadiance() const CV_OVERRIDE { return radiance; } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "name" << name @@ -288,7 +288,7 @@ public: << "threshold" << threshold; } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); diff --git a/modules/photo/src/fast_nlmeans_denoising_invoker.hpp b/modules/photo/src/fast_nlmeans_denoising_invoker.hpp index b875ebc92d..1c71e107de 100644 --- a/modules/photo/src/fast_nlmeans_denoising_invoker.hpp +++ b/modules/photo/src/fast_nlmeans_denoising_invoker.hpp @@ -58,7 +58,7 @@ public: FastNlMeansDenoisingInvoker(const Mat& src, Mat& dst, int template_window_size, int search_window_size, const float *h); - void operator() (const Range& range) const; + void operator() (const Range& range) const CV_OVERRIDE; private: void operator= (const FastNlMeansDenoisingInvoker&); diff --git a/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp b/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp index 3f13f400d5..4c0c784eec 100644 --- a/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp +++ b/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp @@ -59,7 +59,7 @@ public: int temporalWindowSize, Mat& dst, int template_window_size, int search_window_size, const float *h); - void operator() (const Range& range) const; + void operator() (const Range& range) const CV_OVERRIDE; private: void operator= (const FastNlMeansMultiDenoisingInvoker&); diff --git a/modules/photo/src/merge.cpp b/modules/photo/src/merge.cpp index d04e7b8acc..77f919c11d 100644 --- a/modules/photo/src/merge.cpp +++ b/modules/photo/src/merge.cpp @@ -47,7 +47,7 @@ namespace cv { -class MergeDebevecImpl : public MergeDebevec +class MergeDebevecImpl CV_FINAL : public MergeDebevec { public: MergeDebevecImpl() : @@ -56,7 +56,7 @@ public: { } - void process(InputArrayOfArrays src, OutputArray dst, InputArray _times, InputArray input_response) + void process(InputArrayOfArrays src, OutputArray dst, InputArray _times, InputArray input_response) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -122,7 +122,7 @@ public: exp(result, result); } - void process(InputArrayOfArrays src, OutputArray dst, InputArray times) + void process(InputArrayOfArrays src, OutputArray dst, InputArray times) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -139,7 +139,7 @@ Ptr createMergeDebevec() return makePtr(); } -class MergeMertensImpl : public MergeMertens +class MergeMertensImpl CV_FINAL : public MergeMertens { public: MergeMertensImpl(float _wcon, float _wsat, float _wexp) : @@ -150,14 +150,14 @@ public: { } - void process(InputArrayOfArrays src, OutputArrayOfArrays dst, InputArray, InputArray) + void process(InputArrayOfArrays src, OutputArrayOfArrays dst, InputArray, InputArray) CV_OVERRIDE { CV_INSTRUMENT_REGION() process(src, dst); } - void process(InputArrayOfArrays src, OutputArray dst) + void process(InputArrayOfArrays src, OutputArray dst) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -262,16 +262,16 @@ public: res_pyr[0].copyTo(dst.getMat()); } - float getContrastWeight() const { return wcon; } - void setContrastWeight(float val) { wcon = val; } + float getContrastWeight() const CV_OVERRIDE { return wcon; } + void setContrastWeight(float val) CV_OVERRIDE { wcon = val; } - float getSaturationWeight() const { return wsat; } - void setSaturationWeight(float val) { wsat = val; } + float getSaturationWeight() const CV_OVERRIDE { return wsat; } + void setSaturationWeight(float val) CV_OVERRIDE { wsat = val; } - float getExposureWeight() const { return wexp; } - void setExposureWeight(float val) { wexp = val; } + float getExposureWeight() const CV_OVERRIDE { return wexp; } + void setExposureWeight(float val) CV_OVERRIDE { wexp = val; } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "name" << name @@ -280,7 +280,7 @@ public: << "exposure_weight" << wexp; } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); @@ -299,7 +299,7 @@ Ptr createMergeMertens(float wcon, float wsat, float wexp) return makePtr(wcon, wsat, wexp); } -class MergeRobertsonImpl : public MergeRobertson +class MergeRobertsonImpl CV_FINAL : public MergeRobertson { public: MergeRobertsonImpl() : @@ -308,7 +308,7 @@ public: { } - void process(InputArrayOfArrays src, OutputArray dst, InputArray _times, InputArray input_response) + void process(InputArrayOfArrays src, OutputArray dst, InputArray _times, InputArray input_response) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -347,7 +347,7 @@ public: result = result.mul(1 / wsum); } - void process(InputArrayOfArrays src, OutputArray dst, InputArray times) + void process(InputArrayOfArrays src, OutputArray dst, InputArray times) CV_OVERRIDE { CV_INSTRUMENT_REGION() diff --git a/modules/photo/src/tonemap.cpp b/modules/photo/src/tonemap.cpp index 4907c1ef12..2911fc55c8 100644 --- a/modules/photo/src/tonemap.cpp +++ b/modules/photo/src/tonemap.cpp @@ -53,14 +53,14 @@ inline void log_(const Mat& src, Mat& dst) log(dst, dst); } -class TonemapImpl : public Tonemap +class TonemapImpl CV_FINAL : public Tonemap { public: TonemapImpl(float _gamma) : name("Tonemap"), gamma(_gamma) { } - void process(InputArray _src, OutputArray _dst) + void process(InputArray _src, OutputArray _dst) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -80,17 +80,17 @@ public: pow(dst, 1.0f / gamma, dst); } - float getGamma() const { return gamma; } - void setGamma(float val) { gamma = val; } + float getGamma() const CV_OVERRIDE { return gamma; } + void setGamma(float val) CV_OVERRIDE { gamma = val; } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "name" << name << "gamma" << gamma; } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); @@ -107,7 +107,7 @@ Ptr createTonemap(float gamma) return makePtr(gamma); } -class TonemapDragoImpl : public TonemapDrago +class TonemapDragoImpl CV_FINAL : public TonemapDrago { public: TonemapDragoImpl(float _gamma, float _saturation, float _bias) : @@ -118,7 +118,7 @@ public: { } - void process(InputArray _src, OutputArray _dst) + void process(InputArray _src, OutputArray _dst) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -155,16 +155,16 @@ public: linear->process(img, img); } - float getGamma() const { return gamma; } - void setGamma(float val) { gamma = val; } + float getGamma() const CV_OVERRIDE { return gamma; } + void setGamma(float val) CV_OVERRIDE { gamma = val; } - float getSaturation() const { return saturation; } - void setSaturation(float val) { saturation = val; } + float getSaturation() const CV_OVERRIDE { return saturation; } + void setSaturation(float val) CV_OVERRIDE { saturation = val; } - float getBias() const { return bias; } - void setBias(float val) { bias = val; } + float getBias() const CV_OVERRIDE { return bias; } + void setBias(float val) CV_OVERRIDE { bias = val; } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "name" << name @@ -173,7 +173,7 @@ public: << "saturation" << saturation; } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); @@ -192,7 +192,7 @@ Ptr createTonemapDrago(float gamma, float saturation, float bias) return makePtr(gamma, saturation, bias); } -class TonemapDurandImpl : public TonemapDurand +class TonemapDurandImpl CV_FINAL : public TonemapDurand { public: TonemapDurandImpl(float _gamma, float _contrast, float _saturation, float _sigma_color, float _sigma_space) : @@ -205,7 +205,7 @@ public: { } - void process(InputArray _src, OutputArray _dst) + void process(InputArray _src, OutputArray _dst) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -233,22 +233,22 @@ public: pow(img, 1.0f / gamma, img); } - float getGamma() const { return gamma; } - void setGamma(float val) { gamma = val; } + float getGamma() const CV_OVERRIDE { return gamma; } + void setGamma(float val) CV_OVERRIDE { gamma = val; } - float getSaturation() const { return saturation; } - void setSaturation(float val) { saturation = val; } + float getSaturation() const CV_OVERRIDE { return saturation; } + void setSaturation(float val) CV_OVERRIDE { saturation = val; } - float getContrast() const { return contrast; } - void setContrast(float val) { contrast = val; } + float getContrast() const CV_OVERRIDE { return contrast; } + void setContrast(float val) CV_OVERRIDE { contrast = val; } - float getSigmaColor() const { return sigma_color; } - void setSigmaColor(float val) { sigma_color = val; } + float getSigmaColor() const CV_OVERRIDE { return sigma_color; } + void setSigmaColor(float val) CV_OVERRIDE { sigma_color = val; } - float getSigmaSpace() const { return sigma_space; } - void setSigmaSpace(float val) { sigma_space = val; } + float getSigmaSpace() const CV_OVERRIDE { return sigma_space; } + void setSigmaSpace(float val) CV_OVERRIDE { sigma_space = val; } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "name" << name @@ -259,7 +259,7 @@ public: << "saturation" << saturation; } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); @@ -280,7 +280,7 @@ Ptr createTonemapDurand(float gamma, float contrast, float satura return makePtr(gamma, contrast, saturation, sigma_color, sigma_space); } -class TonemapReinhardImpl : public TonemapReinhard +class TonemapReinhardImpl CV_FINAL : public TonemapReinhard { public: TonemapReinhardImpl(float _gamma, float _intensity, float _light_adapt, float _color_adapt) : @@ -292,7 +292,7 @@ public: { } - void process(InputArray _src, OutputArray _dst) + void process(InputArray _src, OutputArray _dst) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -336,19 +336,19 @@ public: linear->process(img, img); } - float getGamma() const { return gamma; } - void setGamma(float val) { gamma = val; } + float getGamma() const CV_OVERRIDE { return gamma; } + void setGamma(float val) CV_OVERRIDE { gamma = val; } - float getIntensity() const { return intensity; } - void setIntensity(float val) { intensity = val; } + float getIntensity() const CV_OVERRIDE { return intensity; } + void setIntensity(float val) CV_OVERRIDE { intensity = val; } - float getLightAdaptation() const { return light_adapt; } - void setLightAdaptation(float val) { light_adapt = val; } + float getLightAdaptation() const CV_OVERRIDE { return light_adapt; } + void setLightAdaptation(float val) CV_OVERRIDE { light_adapt = val; } - float getColorAdaptation() const { return color_adapt; } - void setColorAdaptation(float val) { color_adapt = val; } + float getColorAdaptation() const CV_OVERRIDE { return color_adapt; } + void setColorAdaptation(float val) CV_OVERRIDE { color_adapt = val; } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "name" << name @@ -358,7 +358,7 @@ public: << "color_adapt" << color_adapt; } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); @@ -378,7 +378,7 @@ Ptr createTonemapReinhard(float gamma, float contrast, float si return makePtr(gamma, contrast, sigma_color, sigma_space); } -class TonemapMantiukImpl : public TonemapMantiuk +class TonemapMantiukImpl CV_FINAL : public TonemapMantiuk { public: TonemapMantiukImpl(float _gamma, float _scale, float _saturation) : @@ -389,7 +389,7 @@ public: { } - void process(InputArray _src, OutputArray _dst) + void process(InputArray _src, OutputArray _dst) CV_OVERRIDE { CV_INSTRUMENT_REGION() @@ -449,16 +449,16 @@ public: linear->process(img, img); } - float getGamma() const { return gamma; } - void setGamma(float val) { gamma = val; } + float getGamma() const CV_OVERRIDE { return gamma; } + void setGamma(float val) CV_OVERRIDE { gamma = val; } - float getScale() const { return scale; } - void setScale(float val) { scale = val; } + float getScale() const CV_OVERRIDE { return scale; } + void setScale(float val) CV_OVERRIDE { scale = val; } - float getSaturation() const { return saturation; } - void setSaturation(float val) { saturation = val; } + float getSaturation() const CV_OVERRIDE { return saturation; } + void setSaturation(float val) CV_OVERRIDE { saturation = val; } - void write(FileStorage& fs) const + void write(FileStorage& fs) const CV_OVERRIDE { writeFormat(fs); fs << "name" << name @@ -467,7 +467,7 @@ public: << "saturation" << saturation; } - void read(const FileNode& fn) + void read(const FileNode& fn) CV_OVERRIDE { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name);