mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
Merge pull request #11093 from alalek:cv_override_final
This commit is contained in:
commit
7dc88f26f2
1
3rdparty/openexr/CMakeLists.txt
vendored
1
3rdparty/openexr/CMakeLists.txt
vendored
@ -44,6 +44,7 @@ source_group("Src" FILES ${lib_srcs})
|
||||
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -Wmissing-declarations -Wuninitialized -Wswitch -Wparentheses -Warray-bounds -Wextra
|
||||
-Wdeprecated-declarations -Wmisleading-indentation -Wdeprecated
|
||||
-Wsuggest-override -Winconsistent-missing-override
|
||||
)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4099 /wd4100 /wd4101 /wd4127 /wd4189 /wd4245 /wd4305 /wd4389 /wd4512 /wd4701 /wd4702 /wd4706 /wd4800) # vs2005
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4334) # vs2005 Win64
|
||||
|
1
3rdparty/protobuf/CMakeLists.txt
vendored
1
3rdparty/protobuf/CMakeLists.txt
vendored
@ -20,6 +20,7 @@ else()
|
||||
-Wundef -Wtautological-undefined-compare -Wignored-qualifiers -Wextra
|
||||
-Wunused-function -Wunused-const-variable -Wshorten-64-to-32 -Wno-invalid-offsetof
|
||||
-Wenum-compare-switch
|
||||
-Wsuggest-override -Winconsistent-missing-override
|
||||
)
|
||||
endif()
|
||||
if(CV_ICC)
|
||||
|
@ -61,10 +61,10 @@ protected:
|
||||
|
||||
public:
|
||||
CalibProcessor(cv::Ptr<calibrationData> data, captureParameters& capParams);
|
||||
virtual cv::Mat processFrame(const cv::Mat& frame);
|
||||
virtual bool isProcessed() const;
|
||||
virtual void resetState();
|
||||
~CalibProcessor();
|
||||
virtual cv::Mat processFrame(const cv::Mat& frame) CV_OVERRIDE;
|
||||
virtual bool isProcessed() const CV_OVERRIDE;
|
||||
virtual void resetState() CV_OVERRIDE;
|
||||
~CalibProcessor() CV_OVERRIDE;
|
||||
};
|
||||
|
||||
enum visualisationMode {Grid, Window};
|
||||
@ -84,9 +84,9 @@ protected:
|
||||
void drawGridPoints(const cv::Mat& frame);
|
||||
public:
|
||||
ShowProcessor(cv::Ptr<calibrationData> data, cv::Ptr<calibController> controller, TemplateType board);
|
||||
virtual cv::Mat processFrame(const cv::Mat& frame);
|
||||
virtual bool isProcessed() const;
|
||||
virtual void resetState();
|
||||
virtual cv::Mat processFrame(const cv::Mat& frame) CV_OVERRIDE;
|
||||
virtual bool isProcessed() const CV_OVERRIDE;
|
||||
virtual void resetState() CV_OVERRIDE;
|
||||
|
||||
void setVisualizationMode(visualisationMode mode);
|
||||
void switchVisualizationMode();
|
||||
@ -95,7 +95,7 @@ public:
|
||||
|
||||
void switchUndistort();
|
||||
void setUndistort(bool isEnabled);
|
||||
~ShowProcessor();
|
||||
~ShowProcessor() CV_OVERRIDE;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -8,7 +8,9 @@ endif()
|
||||
project(traincascade)
|
||||
set(the_target opencv_traincascade)
|
||||
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Woverloaded-virtual)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Woverloaded-virtual
|
||||
-Winconsistent-missing-override -Wsuggest-override
|
||||
)
|
||||
|
||||
ocv_target_include_directories(${the_target} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv")
|
||||
ocv_target_include_modules_recurse(${the_target} ${OPENCV_TRAINCASCADE_DEPS})
|
||||
|
@ -103,6 +103,13 @@ if(CV_GCC OR CV_CLANG)
|
||||
add_extra_compiler_option(-Wsign-promo)
|
||||
add_extra_compiler_option(-Wuninitialized)
|
||||
add_extra_compiler_option(-Winit-self)
|
||||
if(HAVE_CXX11)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_extra_compiler_option(-Wsuggest-override)
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
add_extra_compiler_option(-Winconsistent-missing-override)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_NOISY_WARNINGS)
|
||||
add_extra_compiler_option(-Wcast-align)
|
||||
|
@ -51,7 +51,7 @@ else()
|
||||
add_library(libprotobuf UNKNOWN IMPORTED)
|
||||
set_target_properties(libprotobuf PROPERTIES
|
||||
IMPORTED_LOCATION "${Protobuf_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}"
|
||||
INTERFACE_INCLUDE_SYSTEM_DIRECTORIES "${Protobuf_INCLUDE_DIR}"
|
||||
)
|
||||
get_protobuf_version(Protobuf_VERSION "${Protobuf_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
@ -565,6 +565,24 @@ macro(ocv_append_build_options var_prefix pkg_prefix)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
function(ocv_append_source_files_cxx_compiler_options files_var)
|
||||
set(__flags "${ARGN}")
|
||||
ocv_check_flag_support(CXX "${__flags}" __HAVE_COMPILER_OPTIONS_VAR "")
|
||||
if(${__HAVE_COMPILER_OPTIONS_VAR})
|
||||
foreach(source ${${files_var}})
|
||||
if("${source}" MATCHES "\\.(cpp|cc|cxx)$")
|
||||
get_source_file_property(flags "${source}" COMPILE_FLAGS)
|
||||
if(flags)
|
||||
set(flags "${flags} ${__flags}")
|
||||
else()
|
||||
set(flags "${__flags}")
|
||||
endif()
|
||||
set_source_files_properties("${source}" PROPERTIES COMPILE_FLAGS "${flags}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Usage is similar to CMake 'pkg_check_modules' command
|
||||
# It additionally controls HAVE_${define} and ${define}_${modname}_FOUND variables
|
||||
macro(ocv_check_modules define)
|
||||
|
@ -34,10 +34,10 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class EMEstimatorCallback : public PointSetRegistrator::Callback
|
||||
class EMEstimatorCallback CV_FINAL : public PointSetRegistrator::Callback
|
||||
{
|
||||
public:
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const CV_OVERRIDE
|
||||
{
|
||||
Mat q1 = _m1.getMat(), q2 = _m2.getMat();
|
||||
Mat Q1 = q1.reshape(1, (int)q1.total());
|
||||
@ -370,7 +370,7 @@ protected:
|
||||
}
|
||||
|
||||
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const CV_OVERRIDE
|
||||
{
|
||||
Mat X1 = _m1.getMat(), X2 = _m2.getMat(), model = _model.getMat();
|
||||
const Point2d* x1ptr = X1.ptr<Point2d>();
|
||||
|
@ -59,10 +59,10 @@ namespace cv
|
||||
* where \f$\lambda \in \mathbb{R} \f$.
|
||||
*
|
||||
*/
|
||||
class HomographyEstimatorCallback : public PointSetRegistrator::Callback
|
||||
class HomographyEstimatorCallback CV_FINAL : public PointSetRegistrator::Callback
|
||||
{
|
||||
public:
|
||||
bool checkSubset( InputArray _ms1, InputArray _ms2, int count ) const
|
||||
bool checkSubset( InputArray _ms1, InputArray _ms2, int count ) const CV_OVERRIDE
|
||||
{
|
||||
Mat ms1 = _ms1.getMat(), ms2 = _ms2.getMat();
|
||||
if( haveCollinearPoints(ms1, count) || haveCollinearPoints(ms2, count) )
|
||||
@ -113,7 +113,7 @@ public:
|
||||
* 2 columns 1 channel
|
||||
* @param _model, CV_64FC1, 3x3, normalized, i.e., the last element is 1
|
||||
*/
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const CV_OVERRIDE
|
||||
{
|
||||
Mat m1 = _m1.getMat(), m2 = _m2.getMat();
|
||||
int i, count = m1.checkVector(2);
|
||||
@ -188,7 +188,7 @@ public:
|
||||
* @param _model CV_64FC1, 3x3
|
||||
* @param _err, output, CV_32FC1, square of the L2 norm
|
||||
*/
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const CV_OVERRIDE
|
||||
{
|
||||
Mat m1 = _m1.getMat(), m2 = _m2.getMat(), model = _model.getMat();
|
||||
int i, count = m1.checkVector(2);
|
||||
@ -211,7 +211,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class HomographyRefineCallback : public LMSolver::Callback
|
||||
class HomographyRefineCallback CV_FINAL : public LMSolver::Callback
|
||||
{
|
||||
public:
|
||||
HomographyRefineCallback(InputArray _src, InputArray _dst)
|
||||
@ -220,7 +220,7 @@ public:
|
||||
dst = _dst.getMat();
|
||||
}
|
||||
|
||||
bool compute(InputArray _param, OutputArray _err, OutputArray _Jac) const
|
||||
bool compute(InputArray _param, OutputArray _err, OutputArray _Jac) const CV_OVERRIDE
|
||||
{
|
||||
int i, count = src.checkVector(2);
|
||||
Mat param = _param.getMat();
|
||||
@ -700,16 +700,16 @@ static int run8Point( const Mat& _m1, const Mat& _m2, Mat& _fmatrix )
|
||||
}
|
||||
|
||||
|
||||
class FMEstimatorCallback : public PointSetRegistrator::Callback
|
||||
class FMEstimatorCallback CV_FINAL : public PointSetRegistrator::Callback
|
||||
{
|
||||
public:
|
||||
bool checkSubset( InputArray _ms1, InputArray _ms2, int count ) const
|
||||
bool checkSubset( InputArray _ms1, InputArray _ms2, int count ) const CV_OVERRIDE
|
||||
{
|
||||
Mat ms1 = _ms1.getMat(), ms2 = _ms2.getMat();
|
||||
return !haveCollinearPoints(ms1, count) && !haveCollinearPoints(ms2, count);
|
||||
}
|
||||
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const CV_OVERRIDE
|
||||
{
|
||||
double f[9*3];
|
||||
Mat m1 = _m1.getMat(), m2 = _m2.getMat();
|
||||
@ -725,7 +725,7 @@ public:
|
||||
return n;
|
||||
}
|
||||
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const CV_OVERRIDE
|
||||
{
|
||||
Mat __m1 = _m1.getMat(), __m2 = _m2.getMat(), __model = _model.getMat();
|
||||
int i, count = __m1.checkVector(2);
|
||||
|
@ -99,25 +99,25 @@ private:
|
||||
cv::Matx33d _Hnorm;
|
||||
};
|
||||
|
||||
class HomographyDecompZhang : public HomographyDecomp {
|
||||
class HomographyDecompZhang CV_FINAL : public HomographyDecomp {
|
||||
|
||||
public:
|
||||
HomographyDecompZhang():HomographyDecomp() {}
|
||||
virtual ~HomographyDecompZhang() {}
|
||||
|
||||
private:
|
||||
virtual void decompose(std::vector<CameraMotion>& camMotions);
|
||||
virtual void decompose(std::vector<CameraMotion>& camMotions) CV_OVERRIDE;
|
||||
bool findMotionFrom_tstar_n(const cv::Vec3d& tstar, const cv::Vec3d& n, CameraMotion& motion);
|
||||
};
|
||||
|
||||
class HomographyDecompInria : public HomographyDecomp {
|
||||
class HomographyDecompInria CV_FINAL : public HomographyDecomp {
|
||||
|
||||
public:
|
||||
HomographyDecompInria():HomographyDecomp() {}
|
||||
virtual ~HomographyDecompInria() {}
|
||||
|
||||
private:
|
||||
virtual void decompose(std::vector<CameraMotion>& camMotions);
|
||||
virtual void decompose(std::vector<CameraMotion>& camMotions) CV_OVERRIDE;
|
||||
double oppositeOfMinor(const cv::Matx33d& M, const int row, const int col);
|
||||
void findRmatFrom_tstar_n(const cv::Vec3d& tstar, const cv::Vec3d& n, const double v, cv::Matx33d& R);
|
||||
};
|
||||
|
@ -77,7 +77,7 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class LMSolverImpl : public LMSolver
|
||||
class LMSolverImpl CV_FINAL : public LMSolver
|
||||
{
|
||||
public:
|
||||
LMSolverImpl() : maxIters(100) { init(); }
|
||||
@ -89,7 +89,7 @@ public:
|
||||
printInterval = 0;
|
||||
}
|
||||
|
||||
int run(InputOutputArray _param0) const
|
||||
int run(InputOutputArray _param0) const CV_OVERRIDE
|
||||
{
|
||||
Mat param0 = _param0.getMat(), x, xd, r, rd, J, A, Ap, v, temp_d, d;
|
||||
int ptype = param0.type();
|
||||
@ -198,7 +198,7 @@ public:
|
||||
return iter;
|
||||
}
|
||||
|
||||
void setCallback(const Ptr<LMSolver::Callback>& _cb) { cb = _cb; }
|
||||
void setCallback(const Ptr<LMSolver::Callback>& _cb) CV_OVERRIDE { cb = _cb; }
|
||||
|
||||
Ptr<LMSolver::Callback> cb;
|
||||
|
||||
|
@ -161,7 +161,7 @@ public:
|
||||
return i == modelPoints && iters < maxAttempts;
|
||||
}
|
||||
|
||||
bool run(InputArray _m1, InputArray _m2, OutputArray _model, OutputArray _mask) const
|
||||
bool run(InputArray _m1, InputArray _m2, OutputArray _model, OutputArray _mask) const CV_OVERRIDE
|
||||
{
|
||||
bool result = false;
|
||||
Mat m1 = _m1.getMat(), m2 = _m2.getMat();
|
||||
@ -257,7 +257,7 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
void setCallback(const Ptr<PointSetRegistrator::Callback>& _cb) { cb = _cb; }
|
||||
void setCallback(const Ptr<PointSetRegistrator::Callback>& _cb) CV_OVERRIDE { cb = _cb; }
|
||||
|
||||
Ptr<PointSetRegistrator::Callback> cb;
|
||||
int modelPoints;
|
||||
@ -274,7 +274,7 @@ public:
|
||||
int _modelPoints=0, double _confidence=0.99, int _maxIters=1000)
|
||||
: RANSACPointSetRegistrator(_cb, _modelPoints, 0, _confidence, _maxIters) {}
|
||||
|
||||
bool run(InputArray _m1, InputArray _m2, OutputArray _model, OutputArray _mask) const
|
||||
bool run(InputArray _m1, InputArray _m2, OutputArray _model, OutputArray _mask) const CV_OVERRIDE
|
||||
{
|
||||
const double outlierRatio = 0.45;
|
||||
bool result = false;
|
||||
@ -412,7 +412,7 @@ Ptr<PointSetRegistrator> createLMeDSPointSetRegistrator(const Ptr<PointSetRegist
|
||||
class Affine3DEstimatorCallback : public PointSetRegistrator::Callback
|
||||
{
|
||||
public:
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const CV_OVERRIDE
|
||||
{
|
||||
Mat m1 = _m1.getMat(), m2 = _m2.getMat();
|
||||
const Point3f* from = m1.ptr<Point3f>();
|
||||
@ -450,7 +450,7 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const CV_OVERRIDE
|
||||
{
|
||||
Mat m1 = _m1.getMat(), m2 = _m2.getMat(), model = _model.getMat();
|
||||
const Point3f* from = m1.ptr<Point3f>();
|
||||
@ -477,7 +477,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool checkSubset( InputArray _ms1, InputArray _ms2, int count ) const
|
||||
bool checkSubset( InputArray _ms1, InputArray _ms2, int count ) const CV_OVERRIDE
|
||||
{
|
||||
const float threshold = 0.996f;
|
||||
Mat ms1 = _ms1.getMat(), ms2 = _ms2.getMat();
|
||||
@ -527,7 +527,7 @@ public:
|
||||
class Affine2DEstimatorCallback : public PointSetRegistrator::Callback
|
||||
{
|
||||
public:
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const CV_OVERRIDE
|
||||
{
|
||||
Mat m1 = _m1.getMat(), m2 = _m2.getMat();
|
||||
const Point2f* from = m1.ptr<Point2f>();
|
||||
@ -587,7 +587,7 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const CV_OVERRIDE
|
||||
{
|
||||
Mat m1 = _m1.getMat(), m2 = _m2.getMat(), model = _model.getMat();
|
||||
const Point2f* from = m1.ptr<Point2f>();
|
||||
@ -616,7 +616,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool checkSubset( InputArray _ms1, InputArray _ms2, int count ) const
|
||||
bool checkSubset( InputArray _ms1, InputArray _ms2, int count ) const CV_OVERRIDE
|
||||
{
|
||||
Mat ms1 = _ms1.getMat();
|
||||
Mat ms2 = _ms2.getMat();
|
||||
@ -640,7 +640,7 @@ public:
|
||||
class AffinePartial2DEstimatorCallback : public Affine2DEstimatorCallback
|
||||
{
|
||||
public:
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const CV_OVERRIDE
|
||||
{
|
||||
Mat m1 = _m1.getMat(), m2 = _m2.getMat();
|
||||
const Point2f* from = m1.ptr<Point2f>();
|
||||
@ -696,7 +696,7 @@ public:
|
||||
dst = _dst.getMat();
|
||||
}
|
||||
|
||||
bool compute(InputArray _param, OutputArray _err, OutputArray _Jac) const
|
||||
bool compute(InputArray _param, OutputArray _err, OutputArray _Jac) const CV_OVERRIDE
|
||||
{
|
||||
int i, count = src.checkVector(2);
|
||||
Mat param = _param.getMat();
|
||||
@ -754,7 +754,7 @@ public:
|
||||
dst = _dst.getMat();
|
||||
}
|
||||
|
||||
bool compute(InputArray _param, OutputArray _err, OutputArray _Jac) const
|
||||
bool compute(InputArray _param, OutputArray _err, OutputArray _Jac) const CV_OVERRIDE
|
||||
{
|
||||
int i, count = src.checkVector(2);
|
||||
Mat param = _param.getMat();
|
||||
|
@ -336,9 +336,9 @@ struct RHO_HEST_REFC : RHO_HEST{
|
||||
~RHO_HEST_REFC();
|
||||
|
||||
/* Methods to implement external interface */
|
||||
inline int initialize(void);
|
||||
inline void finalize(void);
|
||||
inline int ensureCapacity(unsigned N, double beta);
|
||||
inline int initialize(void) CV_OVERRIDE;
|
||||
inline void finalize(void) CV_OVERRIDE;
|
||||
inline int ensureCapacity(unsigned N, double beta) CV_OVERRIDE;
|
||||
unsigned rhoHest(const float* src, /* Source points */
|
||||
const float* dst, /* Destination points */
|
||||
char* inl, /* Inlier mask */
|
||||
@ -351,7 +351,8 @@ struct RHO_HEST_REFC : RHO_HEST{
|
||||
double beta, /* Works: 0.35 */
|
||||
unsigned flags, /* Works: 0 */
|
||||
const float* guessH, /* Extrinsic guess, NULL if none provided */
|
||||
float* finalH); /* Final result. */
|
||||
float* finalH /* Final result. */
|
||||
) CV_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@ -169,7 +169,7 @@ bool solvePnP( InputArray _opoints, InputArray _ipoints,
|
||||
return result;
|
||||
}
|
||||
|
||||
class PnPRansacCallback : public PointSetRegistrator::Callback
|
||||
class PnPRansacCallback CV_FINAL : public PointSetRegistrator::Callback
|
||||
{
|
||||
|
||||
public:
|
||||
@ -181,7 +181,7 @@ public:
|
||||
|
||||
/* Pre: True */
|
||||
/* Post: compute _model with given points and return number of found models */
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const
|
||||
int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const CV_OVERRIDE
|
||||
{
|
||||
Mat opoints = _m1.getMat(), ipoints = _m2.getMat();
|
||||
|
||||
@ -197,7 +197,7 @@ public:
|
||||
|
||||
/* Pre: True */
|
||||
/* Post: fill _err with projection errors */
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const
|
||||
void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const CV_OVERRIDE
|
||||
{
|
||||
|
||||
Mat opoints = _m1.getMat(), ipoints = _m2.getMat(), model = _model.getMat();
|
||||
|
@ -889,7 +889,7 @@ struct PrefilterInvoker : public ParallelLoopBody
|
||||
state = _state;
|
||||
}
|
||||
|
||||
void operator()( const Range& range ) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for( int i = range.start; i < range.end; i++ )
|
||||
{
|
||||
@ -974,7 +974,7 @@ struct FindStereoCorrespInvoker : public ParallelLoopBody
|
||||
#endif
|
||||
}
|
||||
|
||||
void operator()( const Range& range ) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
int cols = left->cols, rows = left->rows;
|
||||
int _row0 = std::min(cvRound(range.start * rows / nstripes), rows);
|
||||
@ -1046,7 +1046,7 @@ protected:
|
||||
bool useSIMD;
|
||||
};
|
||||
|
||||
class StereoBMImpl : public StereoBM
|
||||
class StereoBMImpl CV_FINAL : public StereoBM
|
||||
{
|
||||
public:
|
||||
StereoBMImpl()
|
||||
@ -1059,7 +1059,7 @@ public:
|
||||
params = StereoBMParams(_numDisparities, _SADWindowSize);
|
||||
}
|
||||
|
||||
void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr )
|
||||
void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr ) CV_OVERRIDE
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
@ -1201,49 +1201,49 @@ public:
|
||||
disp.convertTo(disp0, disp0.type(), 1./(1 << disp_shift), 0);
|
||||
}
|
||||
|
||||
int getMinDisparity() const { return params.minDisparity; }
|
||||
void setMinDisparity(int minDisparity) { params.minDisparity = minDisparity; }
|
||||
int getMinDisparity() const CV_OVERRIDE { return params.minDisparity; }
|
||||
void setMinDisparity(int minDisparity) CV_OVERRIDE { params.minDisparity = minDisparity; }
|
||||
|
||||
int getNumDisparities() const { return params.numDisparities; }
|
||||
void setNumDisparities(int numDisparities) { params.numDisparities = numDisparities; }
|
||||
int getNumDisparities() const CV_OVERRIDE { return params.numDisparities; }
|
||||
void setNumDisparities(int numDisparities) CV_OVERRIDE { params.numDisparities = numDisparities; }
|
||||
|
||||
int getBlockSize() const { return params.SADWindowSize; }
|
||||
void setBlockSize(int blockSize) { params.SADWindowSize = blockSize; }
|
||||
int getBlockSize() const CV_OVERRIDE { return params.SADWindowSize; }
|
||||
void setBlockSize(int blockSize) CV_OVERRIDE { params.SADWindowSize = blockSize; }
|
||||
|
||||
int getSpeckleWindowSize() const { return params.speckleWindowSize; }
|
||||
void setSpeckleWindowSize(int speckleWindowSize) { params.speckleWindowSize = speckleWindowSize; }
|
||||
int getSpeckleWindowSize() const CV_OVERRIDE { return params.speckleWindowSize; }
|
||||
void setSpeckleWindowSize(int speckleWindowSize) CV_OVERRIDE { params.speckleWindowSize = speckleWindowSize; }
|
||||
|
||||
int getSpeckleRange() const { return params.speckleRange; }
|
||||
void setSpeckleRange(int speckleRange) { params.speckleRange = speckleRange; }
|
||||
int getSpeckleRange() const CV_OVERRIDE { return params.speckleRange; }
|
||||
void setSpeckleRange(int speckleRange) CV_OVERRIDE { params.speckleRange = speckleRange; }
|
||||
|
||||
int getDisp12MaxDiff() const { return params.disp12MaxDiff; }
|
||||
void setDisp12MaxDiff(int disp12MaxDiff) { params.disp12MaxDiff = disp12MaxDiff; }
|
||||
int getDisp12MaxDiff() const CV_OVERRIDE { return params.disp12MaxDiff; }
|
||||
void setDisp12MaxDiff(int disp12MaxDiff) CV_OVERRIDE { params.disp12MaxDiff = disp12MaxDiff; }
|
||||
|
||||
int getPreFilterType() const { return params.preFilterType; }
|
||||
void setPreFilterType(int preFilterType) { params.preFilterType = preFilterType; }
|
||||
int getPreFilterType() const CV_OVERRIDE { return params.preFilterType; }
|
||||
void setPreFilterType(int preFilterType) CV_OVERRIDE { params.preFilterType = preFilterType; }
|
||||
|
||||
int getPreFilterSize() const { return params.preFilterSize; }
|
||||
void setPreFilterSize(int preFilterSize) { params.preFilterSize = preFilterSize; }
|
||||
int getPreFilterSize() const CV_OVERRIDE { return params.preFilterSize; }
|
||||
void setPreFilterSize(int preFilterSize) CV_OVERRIDE { params.preFilterSize = preFilterSize; }
|
||||
|
||||
int getPreFilterCap() const { return params.preFilterCap; }
|
||||
void setPreFilterCap(int preFilterCap) { params.preFilterCap = preFilterCap; }
|
||||
int getPreFilterCap() const CV_OVERRIDE { return params.preFilterCap; }
|
||||
void setPreFilterCap(int preFilterCap) CV_OVERRIDE { params.preFilterCap = preFilterCap; }
|
||||
|
||||
int getTextureThreshold() const { return params.textureThreshold; }
|
||||
void setTextureThreshold(int textureThreshold) { params.textureThreshold = textureThreshold; }
|
||||
int getTextureThreshold() const CV_OVERRIDE { return params.textureThreshold; }
|
||||
void setTextureThreshold(int textureThreshold) CV_OVERRIDE { params.textureThreshold = textureThreshold; }
|
||||
|
||||
int getUniquenessRatio() const { return params.uniquenessRatio; }
|
||||
void setUniquenessRatio(int uniquenessRatio) { params.uniquenessRatio = uniquenessRatio; }
|
||||
int getUniquenessRatio() const CV_OVERRIDE { return params.uniquenessRatio; }
|
||||
void setUniquenessRatio(int uniquenessRatio) CV_OVERRIDE { params.uniquenessRatio = uniquenessRatio; }
|
||||
|
||||
int getSmallerBlockSize() const { return 0; }
|
||||
void setSmallerBlockSize(int) {}
|
||||
int getSmallerBlockSize() const CV_OVERRIDE { return 0; }
|
||||
void setSmallerBlockSize(int) CV_OVERRIDE {}
|
||||
|
||||
Rect getROI1() const { return params.roi1; }
|
||||
void setROI1(Rect roi1) { params.roi1 = roi1; }
|
||||
Rect getROI1() const CV_OVERRIDE { return params.roi1; }
|
||||
void setROI1(Rect roi1) CV_OVERRIDE { params.roi1 = roi1; }
|
||||
|
||||
Rect getROI2() const { return params.roi2; }
|
||||
void setROI2(Rect roi2) { params.roi2 = roi2; }
|
||||
Rect getROI2() const CV_OVERRIDE { return params.roi2; }
|
||||
void setROI2(Rect roi2) CV_OVERRIDE { params.roi2 = roi2; }
|
||||
|
||||
void write(FileStorage& fs) const
|
||||
void write(FileStorage& fs) const CV_OVERRIDE
|
||||
{
|
||||
writeFormat(fs);
|
||||
fs << "name" << name_
|
||||
@ -1260,7 +1260,7 @@ public:
|
||||
<< "uniquenessRatio" << params.uniquenessRatio;
|
||||
}
|
||||
|
||||
void read(const FileNode& fn)
|
||||
void read(const FileNode& fn) CV_OVERRIDE
|
||||
{
|
||||
FileNode n = fn["name"];
|
||||
CV_Assert( n.isString() && String(n) == name_ );
|
||||
|
@ -871,7 +871,7 @@ struct CalcVerticalSums: public ParallelLoopBody
|
||||
useSIMD = hasSIMD128();
|
||||
}
|
||||
|
||||
void operator()( const Range& range ) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
static const CostType MAX_COST = SHRT_MAX;
|
||||
static const int ALIGN = 16;
|
||||
@ -1152,7 +1152,7 @@ struct CalcHorizontalSums: public ParallelLoopBody
|
||||
useSIMD = hasSIMD128();
|
||||
}
|
||||
|
||||
void operator()( const Range& range ) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
int y1 = range.start, y2 = range.end;
|
||||
size_t auxBufsSize = LrSize * sizeof(CostType) + width*(sizeof(CostType) + sizeof(DispType)) + 32;
|
||||
@ -1542,7 +1542,7 @@ struct SGBM3WayMainLoop : public ParallelLoopBody
|
||||
|
||||
SGBM3WayMainLoop(Mat *_buffers, const Mat& _img1, const Mat& _img2, Mat* _dst_disp, const StereoSGBMParams& params, PixType* _clipTab, int _nstripes, int _stripe_overlap);
|
||||
void getRawMatchingCost(CostType* C, CostType* hsumBuf, CostType* pixDiff, PixType* tmpBuf, int y, int src_start_idx) const;
|
||||
void operator () (const Range& range) const;
|
||||
void operator () (const Range& range) const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
SGBM3WayMainLoop::SGBM3WayMainLoop(Mat *_buffers, const Mat& _img1, const Mat& _img2, Mat* _dst_disp, const StereoSGBMParams& params, PixType* _clipTab, int _nstripes, int _stripe_overlap):
|
||||
@ -2128,7 +2128,7 @@ static void computeDisparity3WaySGBM( const Mat& img1, const Mat& img2,
|
||||
delete[] dst_disp;
|
||||
}
|
||||
|
||||
class StereoSGBMImpl : public StereoSGBM
|
||||
class StereoSGBMImpl CV_FINAL : public StereoSGBM
|
||||
{
|
||||
public:
|
||||
StereoSGBMImpl()
|
||||
@ -2147,7 +2147,7 @@ public:
|
||||
_mode );
|
||||
}
|
||||
|
||||
void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr )
|
||||
void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr ) CV_OVERRIDE
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
@ -2172,40 +2172,40 @@ public:
|
||||
StereoMatcher::DISP_SCALE*params.speckleRange, buffer);
|
||||
}
|
||||
|
||||
int getMinDisparity() const { return params.minDisparity; }
|
||||
void setMinDisparity(int minDisparity) { params.minDisparity = minDisparity; }
|
||||
int getMinDisparity() const CV_OVERRIDE { return params.minDisparity; }
|
||||
void setMinDisparity(int minDisparity) CV_OVERRIDE { params.minDisparity = minDisparity; }
|
||||
|
||||
int getNumDisparities() const { return params.numDisparities; }
|
||||
void setNumDisparities(int numDisparities) { params.numDisparities = numDisparities; }
|
||||
int getNumDisparities() const CV_OVERRIDE { return params.numDisparities; }
|
||||
void setNumDisparities(int numDisparities) CV_OVERRIDE { params.numDisparities = numDisparities; }
|
||||
|
||||
int getBlockSize() const { return params.SADWindowSize; }
|
||||
void setBlockSize(int blockSize) { params.SADWindowSize = blockSize; }
|
||||
int getBlockSize() const CV_OVERRIDE { return params.SADWindowSize; }
|
||||
void setBlockSize(int blockSize) CV_OVERRIDE { params.SADWindowSize = blockSize; }
|
||||
|
||||
int getSpeckleWindowSize() const { return params.speckleWindowSize; }
|
||||
void setSpeckleWindowSize(int speckleWindowSize) { params.speckleWindowSize = speckleWindowSize; }
|
||||
int getSpeckleWindowSize() const CV_OVERRIDE { return params.speckleWindowSize; }
|
||||
void setSpeckleWindowSize(int speckleWindowSize) CV_OVERRIDE { params.speckleWindowSize = speckleWindowSize; }
|
||||
|
||||
int getSpeckleRange() const { return params.speckleRange; }
|
||||
void setSpeckleRange(int speckleRange) { params.speckleRange = speckleRange; }
|
||||
int getSpeckleRange() const CV_OVERRIDE { return params.speckleRange; }
|
||||
void setSpeckleRange(int speckleRange) CV_OVERRIDE { params.speckleRange = speckleRange; }
|
||||
|
||||
int getDisp12MaxDiff() const { return params.disp12MaxDiff; }
|
||||
void setDisp12MaxDiff(int disp12MaxDiff) { params.disp12MaxDiff = disp12MaxDiff; }
|
||||
int getDisp12MaxDiff() const CV_OVERRIDE { return params.disp12MaxDiff; }
|
||||
void setDisp12MaxDiff(int disp12MaxDiff) CV_OVERRIDE { params.disp12MaxDiff = disp12MaxDiff; }
|
||||
|
||||
int getPreFilterCap() const { return params.preFilterCap; }
|
||||
void setPreFilterCap(int preFilterCap) { params.preFilterCap = preFilterCap; }
|
||||
int getPreFilterCap() const CV_OVERRIDE { return params.preFilterCap; }
|
||||
void setPreFilterCap(int preFilterCap) CV_OVERRIDE { params.preFilterCap = preFilterCap; }
|
||||
|
||||
int getUniquenessRatio() const { return params.uniquenessRatio; }
|
||||
void setUniquenessRatio(int uniquenessRatio) { params.uniquenessRatio = uniquenessRatio; }
|
||||
int getUniquenessRatio() const CV_OVERRIDE { return params.uniquenessRatio; }
|
||||
void setUniquenessRatio(int uniquenessRatio) CV_OVERRIDE { params.uniquenessRatio = uniquenessRatio; }
|
||||
|
||||
int getP1() const { return params.P1; }
|
||||
void setP1(int P1) { params.P1 = P1; }
|
||||
int getP1() const CV_OVERRIDE { return params.P1; }
|
||||
void setP1(int P1) CV_OVERRIDE { params.P1 = P1; }
|
||||
|
||||
int getP2() const { return params.P2; }
|
||||
void setP2(int P2) { params.P2 = P2; }
|
||||
int getP2() const CV_OVERRIDE { return params.P2; }
|
||||
void setP2(int P2) CV_OVERRIDE { params.P2 = P2; }
|
||||
|
||||
int getMode() const { return params.mode; }
|
||||
void setMode(int mode) { params.mode = mode; }
|
||||
int getMode() const CV_OVERRIDE { return params.mode; }
|
||||
void setMode(int mode) CV_OVERRIDE { params.mode = mode; }
|
||||
|
||||
void write(FileStorage& fs) const
|
||||
void write(FileStorage& fs) const CV_OVERRIDE
|
||||
{
|
||||
writeFormat(fs);
|
||||
fs << "name" << name_
|
||||
@ -2222,7 +2222,7 @@ public:
|
||||
<< "mode" << params.mode;
|
||||
}
|
||||
|
||||
void read(const FileNode& fn)
|
||||
void read(const FileNode& fn) CV_OVERRIDE
|
||||
{
|
||||
FileNode n = fn["name"];
|
||||
CV_Assert( n.isString() && String(n) == name_ );
|
||||
|
@ -124,7 +124,7 @@ public:
|
||||
/*!
|
||||
\return the error description and the context as a text string.
|
||||
*/
|
||||
virtual const char *what() const throw();
|
||||
virtual const char *what() const throw() CV_OVERRIDE;
|
||||
void formatMessage();
|
||||
|
||||
String msg; ///< the formatted error message
|
||||
|
@ -453,6 +453,30 @@ Cv64suf;
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************************\
|
||||
* C++11 override / final *
|
||||
\****************************************************************************************/
|
||||
|
||||
#ifndef CV_OVERRIDE
|
||||
# ifdef CV_CXX11
|
||||
# define CV_OVERRIDE override
|
||||
# endif
|
||||
#endif
|
||||
#ifndef CV_OVERRIDE
|
||||
# define CV_OVERRIDE
|
||||
#endif
|
||||
|
||||
#ifndef CV_FINAL
|
||||
# ifdef CV_CXX11
|
||||
# define CV_FINAL final
|
||||
# endif
|
||||
#endif
|
||||
#ifndef CV_FINAL
|
||||
# define CV_FINAL
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Integer types portatibility
|
||||
#ifdef OPENCV_STDINT_HEADER
|
||||
#include OPENCV_STDINT_HEADER
|
||||
|
@ -165,6 +165,8 @@ template <typename T>
|
||||
T* allocSingleton(size_t count) { return static_cast<T*>(fastMalloc(sizeof(T) * count)); }
|
||||
}
|
||||
|
||||
#if 1 // TODO: Remove in OpenCV 4.x
|
||||
|
||||
// property implementation macros
|
||||
|
||||
#define CV_IMPL_PROPERTY_RO(type, name, member) \
|
||||
@ -187,6 +189,8 @@ T* allocSingleton(size_t count) { return static_cast<T*>(fastMalloc(sizeof(T) *
|
||||
#define CV_WRAP_SAME_PROPERTY(type, name, internal_obj) CV_WRAP_PROPERTY(type, name, name, internal_obj)
|
||||
#define CV_WRAP_SAME_PROPERTY_S(type, name, internal_obj) CV_WRAP_PROPERTY_S(type, name, name, internal_obj)
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************************\
|
||||
* Structures and macros for integration with IPP *
|
||||
\****************************************************************************************/
|
||||
@ -233,8 +237,15 @@ T* allocSingleton(size_t count) { return static_cast<T*>(fastMalloc(sizeof(T) *
|
||||
#include "ipp.h"
|
||||
#endif
|
||||
#ifdef HAVE_IPP_IW
|
||||
# if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wsuggest-override"
|
||||
# endif
|
||||
#include "iw++/iw.hpp"
|
||||
#include "iw/iw_ll.h"
|
||||
# if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if IPP_VERSION_X100 >= 201700
|
||||
|
@ -89,12 +89,12 @@ private:
|
||||
};
|
||||
|
||||
template<typename Y, typename D>
|
||||
struct PtrOwnerImpl : PtrOwner
|
||||
struct PtrOwnerImpl CV_FINAL : PtrOwner
|
||||
{
|
||||
PtrOwnerImpl(Y* p, D d) : owned(p), deleter(d)
|
||||
{}
|
||||
|
||||
void deleteSelf()
|
||||
void deleteSelf() CV_OVERRIDE
|
||||
{
|
||||
deleter(owned);
|
||||
delete this;
|
||||
|
@ -524,7 +524,7 @@ public:
|
||||
m_functor(functor)
|
||||
{ }
|
||||
|
||||
virtual void operator() (const cv::Range& range) const
|
||||
virtual void operator() (const cv::Range& range) const CV_OVERRIDE
|
||||
{
|
||||
m_functor(range);
|
||||
}
|
||||
@ -558,7 +558,8 @@ void Mat::forEach_impl(const Functor& operation) {
|
||||
virtual ~PixelOperationWrapper(){}
|
||||
// ! Overloaded virtual operator
|
||||
// convert range call to row call.
|
||||
virtual void operator()(const Range &range) const {
|
||||
virtual void operator()(const Range &range) const CV_OVERRIDE
|
||||
{
|
||||
const int DIMS = mat->dims;
|
||||
const int COLS = mat->size[DIMS - 1];
|
||||
if (DIMS <= 2) {
|
||||
@ -711,8 +712,8 @@ public:
|
||||
inline void cleanup() { TLSDataContainer::cleanup(); }
|
||||
|
||||
private:
|
||||
virtual void* createDataInstance() const {return new T;} // Wrapper to allocate data by template
|
||||
virtual void deleteDataInstance(void* pData) const {delete (T*)pData;} // Wrapper to release data by template
|
||||
virtual void* createDataInstance() const CV_OVERRIDE {return new T;} // Wrapper to allocate data by template
|
||||
virtual void deleteDataInstance(void* pData) const CV_OVERRIDE {delete (T*)pData;} // Wrapper to release data by template
|
||||
|
||||
// Disable TLS copy operations
|
||||
TLSData(TLSData &) {}
|
||||
|
@ -176,7 +176,7 @@ struct BatchDistInvoker : public ParallelLoopBody
|
||||
func = _func;
|
||||
}
|
||||
|
||||
void operator()(const Range& range) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
AutoBuffer<int> buf(src2->rows);
|
||||
int* bufptr = buf;
|
||||
|
@ -17,10 +17,10 @@ public:
|
||||
DummyBufferPoolController() { }
|
||||
virtual ~DummyBufferPoolController() { }
|
||||
|
||||
virtual size_t getReservedSize() const { return (size_t)-1; }
|
||||
virtual size_t getMaxReservedSize() const { return (size_t)-1; }
|
||||
virtual void setMaxReservedSize(size_t size) { (void)size; }
|
||||
virtual void freeAllReservedBuffers() { }
|
||||
virtual size_t getReservedSize() const CV_OVERRIDE { return (size_t)-1; }
|
||||
virtual size_t getMaxReservedSize() const CV_OVERRIDE { return (size_t)-1; }
|
||||
virtual void setMaxReservedSize(size_t size) CV_OVERRIDE { (void)size; }
|
||||
virtual void freeAllReservedBuffers() CV_OVERRIDE { }
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@ -68,15 +68,15 @@ namespace cv
|
||||
|
||||
#define SEC_METHOD_ITERATIONS 4
|
||||
#define INITIAL_SEC_METHOD_SIGMA 0.1
|
||||
class ConjGradSolverImpl : public ConjGradSolver
|
||||
class ConjGradSolverImpl CV_FINAL : public ConjGradSolver
|
||||
{
|
||||
public:
|
||||
Ptr<Function> getFunction() const;
|
||||
void setFunction(const Ptr<Function>& f);
|
||||
TermCriteria getTermCriteria() const;
|
||||
Ptr<Function> getFunction() const CV_OVERRIDE;
|
||||
void setFunction(const Ptr<Function>& f) CV_OVERRIDE;
|
||||
TermCriteria getTermCriteria() const CV_OVERRIDE;
|
||||
ConjGradSolverImpl();
|
||||
void setTermCriteria(const TermCriteria& termcrit);
|
||||
double minimize(InputOutputArray x);
|
||||
void setTermCriteria(const TermCriteria& termcrit) CV_OVERRIDE;
|
||||
double minimize(InputOutputArray x) CV_OVERRIDE;
|
||||
protected:
|
||||
Ptr<MinProblemSolver::Function> _Function;
|
||||
TermCriteria _termcrit;
|
||||
|
@ -140,7 +140,7 @@ multiple lines in three dimensions as not all lines intersect in three dimension
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class DownhillSolverImpl : public DownhillSolver
|
||||
class DownhillSolverImpl CV_FINAL : public DownhillSolver
|
||||
{
|
||||
public:
|
||||
DownhillSolverImpl()
|
||||
@ -149,8 +149,8 @@ public:
|
||||
_step=Mat_<double>();
|
||||
}
|
||||
|
||||
void getInitStep(OutputArray step) const { _step.copyTo(step); }
|
||||
void setInitStep(InputArray step)
|
||||
void getInitStep(OutputArray step) const CV_OVERRIDE { _step.copyTo(step); }
|
||||
void setInitStep(InputArray step) CV_OVERRIDE
|
||||
{
|
||||
// set dimensionality and make a deep copy of step
|
||||
Mat m = step.getMat();
|
||||
@ -161,13 +161,13 @@ public:
|
||||
transpose(m, _step);
|
||||
}
|
||||
|
||||
Ptr<MinProblemSolver::Function> getFunction() const { return _Function; }
|
||||
Ptr<MinProblemSolver::Function> getFunction() const CV_OVERRIDE { return _Function; }
|
||||
|
||||
void setFunction(const Ptr<Function>& f) { _Function=f; }
|
||||
void setFunction(const Ptr<Function>& f) CV_OVERRIDE { _Function=f; }
|
||||
|
||||
TermCriteria getTermCriteria() const { return _termcrit; }
|
||||
TermCriteria getTermCriteria() const CV_OVERRIDE { return _termcrit; }
|
||||
|
||||
void setTermCriteria( const TermCriteria& termcrit )
|
||||
void setTermCriteria( const TermCriteria& termcrit ) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert( termcrit.type == (TermCriteria::MAX_ITER + TermCriteria::EPS) &&
|
||||
termcrit.epsilon > 0 &&
|
||||
@ -175,7 +175,7 @@ public:
|
||||
_termcrit=termcrit;
|
||||
}
|
||||
|
||||
double minimize( InputOutputArray x_ )
|
||||
double minimize( InputOutputArray x_ ) CV_OVERRIDE
|
||||
{
|
||||
dprintf(("hi from minimize\n"));
|
||||
CV_Assert( !_Function.empty() );
|
||||
|
@ -1562,7 +1562,7 @@ public:
|
||||
*ok = true;
|
||||
}
|
||||
|
||||
virtual void operator()(const Range& range) const
|
||||
virtual void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
IppStatus status;
|
||||
Ipp8u* pBuffer = 0;
|
||||
@ -1643,7 +1643,7 @@ public:
|
||||
*ok = true;
|
||||
}
|
||||
|
||||
virtual void operator()(const Range& range) const
|
||||
virtual void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
IppStatus status;
|
||||
Ipp8u* pBuffer = 0;
|
||||
@ -2607,7 +2607,7 @@ inline DftDims determineDims(int rows, int cols, bool isRowWise, bool isContinuo
|
||||
return InvalidDim;
|
||||
}
|
||||
|
||||
class OcvDftImpl : public hal::DFT2D
|
||||
class OcvDftImpl CV_FINAL : public hal::DFT2D
|
||||
{
|
||||
protected:
|
||||
Ptr<hal::DFT1D> contextA;
|
||||
@ -2779,7 +2779,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void apply(const uchar * src, size_t src_step, uchar * dst, size_t dst_step)
|
||||
void apply(const uchar * src, size_t src_step, uchar * dst, size_t dst_step) CV_OVERRIDE
|
||||
{
|
||||
#if defined USE_IPP_DFT
|
||||
if (useIpp)
|
||||
@ -3039,7 +3039,7 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
class OcvDftBasicImpl : public hal::DFT1D
|
||||
class OcvDftBasicImpl CV_FINAL : public hal::DFT1D
|
||||
{
|
||||
public:
|
||||
OcvDftOptions opt;
|
||||
@ -3194,7 +3194,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void apply(const uchar *src, uchar *dst)
|
||||
void apply(const uchar *src, uchar *dst) CV_OVERRIDE
|
||||
{
|
||||
opt.dft_func(opt, src, dst);
|
||||
}
|
||||
@ -3214,7 +3214,7 @@ struct ReplacementDFT1D : public hal::DFT1D
|
||||
isInitialized = (res == CV_HAL_ERROR_OK);
|
||||
return isInitialized;
|
||||
}
|
||||
void apply(const uchar *src, uchar *dst)
|
||||
void apply(const uchar *src, uchar *dst) CV_OVERRIDE
|
||||
{
|
||||
if (isInitialized)
|
||||
{
|
||||
@ -3244,7 +3244,7 @@ struct ReplacementDFT2D : public hal::DFT2D
|
||||
isInitialized = (res == CV_HAL_ERROR_OK);
|
||||
return isInitialized;
|
||||
}
|
||||
void apply(const uchar *src, size_t src_step, uchar *dst, size_t dst_step)
|
||||
void apply(const uchar *src, size_t src_step, uchar *dst, size_t dst_step) CV_OVERRIDE
|
||||
{
|
||||
if (isInitialized)
|
||||
{
|
||||
@ -3809,7 +3809,7 @@ public:
|
||||
*ok = true;
|
||||
}
|
||||
|
||||
virtual void operator()(const Range& range) const
|
||||
virtual void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
if(*ok == false)
|
||||
return;
|
||||
@ -4048,7 +4048,7 @@ static bool ippi_DCT_32f(const uchar * src, size_t src_step, uchar * dst, size_t
|
||||
|
||||
namespace cv {
|
||||
|
||||
class OcvDctImpl : public hal::DCT2D
|
||||
class OcvDctImpl CV_FINAL : public hal::DCT2D
|
||||
{
|
||||
public:
|
||||
OcvDftOptions opt;
|
||||
@ -4100,7 +4100,7 @@ public:
|
||||
end_stage = 1;
|
||||
}
|
||||
}
|
||||
void apply(const uchar *src, size_t src_step, uchar *dst, size_t dst_step)
|
||||
void apply(const uchar *src, size_t src_step, uchar *dst, size_t dst_step) CV_OVERRIDE
|
||||
{
|
||||
CV_IPP_RUN(IPP_VERSION_X100 >= 700 && depth == CV_32F, ippi_DCT_32f(src, src_step, dst, dst_step, width, height, isInverse, isRowTransform))
|
||||
|
||||
@ -4196,7 +4196,7 @@ struct ReplacementDCT2D : public hal::DCT2D
|
||||
isInitialized = (res == CV_HAL_ERROR_OK);
|
||||
return isInitialized;
|
||||
}
|
||||
void apply(const uchar *src_data, size_t src_step, uchar *dst_data, size_t dst_step)
|
||||
void apply(const uchar *src_data, size_t src_step, uchar *dst_data, size_t dst_step) CV_OVERRIDE
|
||||
{
|
||||
if (isInitialized)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
tdist2(tdist2_), data(data_), dist(dist_), ci(ci_)
|
||||
{ }
|
||||
|
||||
void operator()( const cv::Range& range ) const
|
||||
void operator()( const cv::Range& range ) const CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
const int begin = range.start;
|
||||
@ -171,7 +171,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator()( const Range& range ) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
const int begin = range.start;
|
||||
|
@ -328,7 +328,7 @@ public:
|
||||
*ok = (func != NULL);
|
||||
}
|
||||
|
||||
void operator()( const cv::Range& range ) const
|
||||
void operator()( const cv::Range& range ) const CV_OVERRIDE
|
||||
{
|
||||
CV_DbgAssert(*ok);
|
||||
|
||||
|
@ -123,11 +123,11 @@ BufferPoolController* MatAllocator::getBufferPoolController(const char* id) cons
|
||||
return &dummy;
|
||||
}
|
||||
|
||||
class StdMatAllocator : public MatAllocator
|
||||
class StdMatAllocator CV_FINAL : public MatAllocator
|
||||
{
|
||||
public:
|
||||
UMatData* allocate(int dims, const int* sizes, int type,
|
||||
void* data0, size_t* step, int /*flags*/, UMatUsageFlags /*usageFlags*/) const
|
||||
void* data0, size_t* step, int /*flags*/, UMatUsageFlags /*usageFlags*/) const CV_OVERRIDE
|
||||
{
|
||||
size_t total = CV_ELEM_SIZE(type);
|
||||
for( int i = dims-1; i >= 0; i-- )
|
||||
@ -154,13 +154,13 @@ public:
|
||||
return u;
|
||||
}
|
||||
|
||||
bool allocate(UMatData* u, int /*accessFlags*/, UMatUsageFlags /*usageFlags*/) const
|
||||
bool allocate(UMatData* u, int /*accessFlags*/, UMatUsageFlags /*usageFlags*/) const CV_OVERRIDE
|
||||
{
|
||||
if(!u) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void deallocate(UMatData* u) const
|
||||
void deallocate(UMatData* u) const CV_OVERRIDE
|
||||
{
|
||||
if(!u)
|
||||
return;
|
||||
|
@ -14,53 +14,53 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class MatOp_Identity : public MatOp
|
||||
class MatOp_Identity CV_FINAL : public MatOp
|
||||
{
|
||||
public:
|
||||
MatOp_Identity() {}
|
||||
virtual ~MatOp_Identity() {}
|
||||
|
||||
bool elementWise(const MatExpr& /*expr*/) const { return true; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
|
||||
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return true; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
|
||||
|
||||
static void makeExpr(MatExpr& res, const Mat& m);
|
||||
};
|
||||
|
||||
static MatOp_Identity g_MatOp_Identity;
|
||||
|
||||
class MatOp_AddEx : public MatOp
|
||||
class MatOp_AddEx CV_FINAL : public MatOp
|
||||
{
|
||||
public:
|
||||
MatOp_AddEx() {}
|
||||
virtual ~MatOp_AddEx() {}
|
||||
|
||||
bool elementWise(const MatExpr& /*expr*/) const { return true; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
|
||||
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return true; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
|
||||
|
||||
void add(const MatExpr& e1, const Scalar& s, MatExpr& res) const;
|
||||
void subtract(const Scalar& s, const MatExpr& expr, MatExpr& res) const;
|
||||
void multiply(const MatExpr& e1, double s, MatExpr& res) const;
|
||||
void divide(double s, const MatExpr& e, MatExpr& res) const;
|
||||
void add(const MatExpr& e1, const Scalar& s, MatExpr& res) const CV_OVERRIDE;
|
||||
void subtract(const Scalar& s, const MatExpr& expr, MatExpr& res) const CV_OVERRIDE;
|
||||
void multiply(const MatExpr& e1, double s, MatExpr& res) const CV_OVERRIDE;
|
||||
void divide(double s, const MatExpr& e, MatExpr& res) const CV_OVERRIDE;
|
||||
|
||||
void transpose(const MatExpr& e1, MatExpr& res) const;
|
||||
void abs(const MatExpr& expr, MatExpr& res) const;
|
||||
void transpose(const MatExpr& e1, MatExpr& res) const CV_OVERRIDE;
|
||||
void abs(const MatExpr& expr, MatExpr& res) const CV_OVERRIDE;
|
||||
|
||||
static void makeExpr(MatExpr& res, const Mat& a, const Mat& b, double alpha, double beta, const Scalar& s=Scalar());
|
||||
};
|
||||
|
||||
static MatOp_AddEx g_MatOp_AddEx;
|
||||
|
||||
class MatOp_Bin : public MatOp
|
||||
class MatOp_Bin CV_FINAL : public MatOp
|
||||
{
|
||||
public:
|
||||
MatOp_Bin() {}
|
||||
virtual ~MatOp_Bin() {}
|
||||
|
||||
bool elementWise(const MatExpr& /*expr*/) const { return true; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
|
||||
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return true; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
|
||||
|
||||
void multiply(const MatExpr& e1, double s, MatExpr& res) const;
|
||||
void divide(double s, const MatExpr& e, MatExpr& res) const;
|
||||
void multiply(const MatExpr& e1, double s, MatExpr& res) const CV_OVERRIDE;
|
||||
void divide(double s, const MatExpr& e, MatExpr& res) const CV_OVERRIDE;
|
||||
|
||||
static void makeExpr(MatExpr& res, char op, const Mat& a, const Mat& b, double scale=1);
|
||||
static void makeExpr(MatExpr& res, char op, const Mat& a, const Scalar& s);
|
||||
@ -68,14 +68,14 @@ public:
|
||||
|
||||
static MatOp_Bin g_MatOp_Bin;
|
||||
|
||||
class MatOp_Cmp : public MatOp
|
||||
class MatOp_Cmp CV_FINAL : public MatOp
|
||||
{
|
||||
public:
|
||||
MatOp_Cmp() {}
|
||||
virtual ~MatOp_Cmp() {}
|
||||
|
||||
bool elementWise(const MatExpr& /*expr*/) const { return true; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
|
||||
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return true; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
|
||||
|
||||
static void makeExpr(MatExpr& res, int cmpop, const Mat& a, const Mat& b);
|
||||
static void makeExpr(MatExpr& res, int cmpop, const Mat& a, double alpha);
|
||||
@ -83,20 +83,20 @@ public:
|
||||
|
||||
static MatOp_Cmp g_MatOp_Cmp;
|
||||
|
||||
class MatOp_GEMM : public MatOp
|
||||
class MatOp_GEMM CV_FINAL : public MatOp
|
||||
{
|
||||
public:
|
||||
MatOp_GEMM() {}
|
||||
virtual ~MatOp_GEMM() {}
|
||||
|
||||
bool elementWise(const MatExpr& /*expr*/) const { return false; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
|
||||
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return false; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
|
||||
|
||||
void add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const;
|
||||
void subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const;
|
||||
void multiply(const MatExpr& e, double s, MatExpr& res) const;
|
||||
void add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const CV_OVERRIDE;
|
||||
void subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const CV_OVERRIDE;
|
||||
void multiply(const MatExpr& e, double s, MatExpr& res) const CV_OVERRIDE;
|
||||
|
||||
void transpose(const MatExpr& expr, MatExpr& res) const;
|
||||
void transpose(const MatExpr& expr, MatExpr& res) const CV_OVERRIDE;
|
||||
|
||||
static void makeExpr(MatExpr& res, int flags, const Mat& a, const Mat& b,
|
||||
double alpha=1, const Mat& c=Mat(), double beta=1);
|
||||
@ -104,63 +104,63 @@ public:
|
||||
|
||||
static MatOp_GEMM g_MatOp_GEMM;
|
||||
|
||||
class MatOp_Invert : public MatOp
|
||||
class MatOp_Invert CV_FINAL : public MatOp
|
||||
{
|
||||
public:
|
||||
MatOp_Invert() {}
|
||||
virtual ~MatOp_Invert() {}
|
||||
|
||||
bool elementWise(const MatExpr& /*expr*/) const { return false; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
|
||||
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return false; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
|
||||
|
||||
void matmul(const MatExpr& expr1, const MatExpr& expr2, MatExpr& res) const;
|
||||
void matmul(const MatExpr& expr1, const MatExpr& expr2, MatExpr& res) const CV_OVERRIDE;
|
||||
|
||||
static void makeExpr(MatExpr& res, int method, const Mat& m);
|
||||
};
|
||||
|
||||
static MatOp_Invert g_MatOp_Invert;
|
||||
|
||||
class MatOp_T : public MatOp
|
||||
class MatOp_T CV_FINAL : public MatOp
|
||||
{
|
||||
public:
|
||||
MatOp_T() {}
|
||||
virtual ~MatOp_T() {}
|
||||
|
||||
bool elementWise(const MatExpr& /*expr*/) const { return false; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
|
||||
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return false; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
|
||||
|
||||
void multiply(const MatExpr& e1, double s, MatExpr& res) const;
|
||||
void transpose(const MatExpr& expr, MatExpr& res) const;
|
||||
void multiply(const MatExpr& e1, double s, MatExpr& res) const CV_OVERRIDE;
|
||||
void transpose(const MatExpr& expr, MatExpr& res) const CV_OVERRIDE;
|
||||
|
||||
static void makeExpr(MatExpr& res, const Mat& a, double alpha=1);
|
||||
};
|
||||
|
||||
static MatOp_T g_MatOp_T;
|
||||
|
||||
class MatOp_Solve : public MatOp
|
||||
class MatOp_Solve CV_FINAL : public MatOp
|
||||
{
|
||||
public:
|
||||
MatOp_Solve() {}
|
||||
virtual ~MatOp_Solve() {}
|
||||
|
||||
bool elementWise(const MatExpr& /*expr*/) const { return false; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
|
||||
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return false; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
|
||||
|
||||
static void makeExpr(MatExpr& res, int method, const Mat& a, const Mat& b);
|
||||
};
|
||||
|
||||
static MatOp_Solve g_MatOp_Solve;
|
||||
|
||||
class MatOp_Initializer : public MatOp
|
||||
class MatOp_Initializer CV_FINAL : public MatOp
|
||||
{
|
||||
public:
|
||||
MatOp_Initializer() {}
|
||||
virtual ~MatOp_Initializer() {}
|
||||
|
||||
bool elementWise(const MatExpr& /*expr*/) const { return false; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
|
||||
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return false; }
|
||||
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
|
||||
|
||||
void multiply(const MatExpr& e, double s, MatExpr& res) const;
|
||||
void multiply(const MatExpr& e, double s, MatExpr& res) const CV_OVERRIDE;
|
||||
|
||||
static void makeExpr(MatExpr& res, int method, Size sz, int type, double alpha=1);
|
||||
static void makeExpr(MatExpr& res, int method, int ndims, const int* sizes, int type, double alpha=1);
|
||||
|
@ -4178,7 +4178,7 @@ public:
|
||||
CV_Assert(reservedEntries_.empty());
|
||||
}
|
||||
public:
|
||||
virtual T allocate(size_t size)
|
||||
virtual T allocate(size_t size) CV_OVERRIDE
|
||||
{
|
||||
AutoLock locker(mutex_);
|
||||
BufferEntry entry;
|
||||
@ -4193,7 +4193,7 @@ public:
|
||||
}
|
||||
return entry.clBuffer_;
|
||||
}
|
||||
virtual void release(T buffer)
|
||||
virtual void release(T buffer) CV_OVERRIDE
|
||||
{
|
||||
AutoLock locker(mutex_);
|
||||
BufferEntry entry;
|
||||
@ -4210,9 +4210,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual size_t getReservedSize() const { return currentReservedSize; }
|
||||
virtual size_t getMaxReservedSize() const { return maxReservedSize; }
|
||||
virtual void setMaxReservedSize(size_t size)
|
||||
virtual size_t getReservedSize() const CV_OVERRIDE { return currentReservedSize; }
|
||||
virtual size_t getMaxReservedSize() const CV_OVERRIDE { return maxReservedSize; }
|
||||
virtual void setMaxReservedSize(size_t size) CV_OVERRIDE
|
||||
{
|
||||
AutoLock locker(mutex_);
|
||||
size_t oldMaxReservedSize = maxReservedSize;
|
||||
@ -4236,7 +4236,7 @@ public:
|
||||
_checkSizeOfReservedEntries();
|
||||
}
|
||||
}
|
||||
virtual void freeAllReservedBuffers()
|
||||
virtual void freeAllReservedBuffers() CV_OVERRIDE
|
||||
{
|
||||
AutoLock locker(mutex_);
|
||||
typename std::list<BufferEntry>::const_iterator i = reservedEntries_.begin();
|
||||
@ -4257,7 +4257,7 @@ struct CLBufferEntry
|
||||
CLBufferEntry() : clBuffer_((cl_mem)NULL), capacity_(0) { }
|
||||
};
|
||||
|
||||
class OpenCLBufferPoolImpl : public OpenCLBufferPoolBaseImpl<OpenCLBufferPoolImpl, CLBufferEntry, cl_mem>
|
||||
class OpenCLBufferPoolImpl CV_FINAL : public OpenCLBufferPoolBaseImpl<OpenCLBufferPoolImpl, CLBufferEntry, cl_mem>
|
||||
{
|
||||
public:
|
||||
typedef struct CLBufferEntry BufferEntry;
|
||||
@ -4303,7 +4303,7 @@ struct CLSVMBufferEntry
|
||||
size_t capacity_;
|
||||
CLSVMBufferEntry() : clBuffer_(NULL), capacity_(0) { }
|
||||
};
|
||||
class OpenCLSVMBufferPoolImpl : public OpenCLBufferPoolBaseImpl<OpenCLSVMBufferPoolImpl, CLSVMBufferEntry, void*>
|
||||
class OpenCLSVMBufferPoolImpl CV_FINAL : public OpenCLBufferPoolBaseImpl<OpenCLSVMBufferPoolImpl, CLSVMBufferEntry, void*>
|
||||
{
|
||||
public:
|
||||
typedef struct CLSVMBufferEntry BufferEntry;
|
||||
@ -4465,7 +4465,7 @@ private:
|
||||
#define CV_OPENCL_DATA_PTR_ALIGNMENT 16
|
||||
#endif
|
||||
|
||||
class OpenCLAllocator : public MatAllocator
|
||||
class OpenCLAllocator CV_FINAL : public MatAllocator
|
||||
{
|
||||
mutable OpenCLBufferPoolImpl bufferPool;
|
||||
mutable OpenCLBufferPoolImpl bufferPoolHostPtr;
|
||||
@ -4525,7 +4525,7 @@ public:
|
||||
}
|
||||
|
||||
UMatData* allocate(int dims, const int* sizes, int type,
|
||||
void* data, size_t* step, int flags, UMatUsageFlags usageFlags) const
|
||||
void* data, size_t* step, int flags, UMatUsageFlags usageFlags) const CV_OVERRIDE
|
||||
{
|
||||
if(!useOpenCL())
|
||||
return defaultAllocate(dims, sizes, type, data, step, flags, usageFlags);
|
||||
@ -4589,7 +4589,7 @@ public:
|
||||
return u;
|
||||
}
|
||||
|
||||
bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const
|
||||
bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const CV_OVERRIDE
|
||||
{
|
||||
if(!u)
|
||||
return false;
|
||||
@ -4721,7 +4721,7 @@ public:
|
||||
}
|
||||
}*/
|
||||
|
||||
void deallocate(UMatData* u) const
|
||||
void deallocate(UMatData* u) const CV_OVERRIDE
|
||||
{
|
||||
if(!u)
|
||||
return;
|
||||
@ -4905,7 +4905,7 @@ public:
|
||||
}
|
||||
|
||||
// synchronized call (external UMatDataAutoLock, see UMat::getMat)
|
||||
void map(UMatData* u, int accessFlags) const
|
||||
void map(UMatData* u, int accessFlags) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(u && u->handle);
|
||||
|
||||
@ -4988,7 +4988,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void unmap(UMatData* u) const
|
||||
void unmap(UMatData* u) const CV_OVERRIDE
|
||||
{
|
||||
if(!u)
|
||||
return;
|
||||
@ -5133,7 +5133,7 @@ public:
|
||||
|
||||
void download(UMatData* u, void* dstptr, int dims, const size_t sz[],
|
||||
const size_t srcofs[], const size_t srcstep[],
|
||||
const size_t dststep[]) const
|
||||
const size_t dststep[]) const CV_OVERRIDE
|
||||
{
|
||||
if(!u)
|
||||
return;
|
||||
@ -5256,7 +5256,7 @@ public:
|
||||
|
||||
void upload(UMatData* u, const void* srcptr, int dims, const size_t sz[],
|
||||
const size_t dstofs[], const size_t dststep[],
|
||||
const size_t srcstep[]) const
|
||||
const size_t srcstep[]) const CV_OVERRIDE
|
||||
{
|
||||
if(!u)
|
||||
return;
|
||||
@ -5408,7 +5408,7 @@ public:
|
||||
|
||||
void copy(UMatData* src, UMatData* dst, int dims, const size_t sz[],
|
||||
const size_t srcofs[], const size_t srcstep[],
|
||||
const size_t dstofs[], const size_t dststep[], bool _sync) const
|
||||
const size_t dstofs[], const size_t dststep[], bool _sync) const CV_OVERRIDE
|
||||
{
|
||||
if(!src || !dst)
|
||||
return;
|
||||
@ -5596,7 +5596,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
BufferPoolController* getBufferPoolController(const char* id) const {
|
||||
BufferPoolController* getBufferPoolController(const char* id) const CV_OVERRIDE {
|
||||
#ifdef HAVE_OPENCL_SVM
|
||||
if ((svm::checkForceSVMUmatUsage() && (id == NULL || strcmp(id, "OCL") == 0)) || (id != NULL && strcmp(id, "SVM") == 0))
|
||||
{
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
namespace cv
|
||||
{
|
||||
class FormattedImpl : public Formatted
|
||||
class FormattedImpl CV_FINAL : public Formatted
|
||||
{
|
||||
enum { STATE_PROLOGUE, STATE_EPILOGUE, STATE_INTERLUDE,
|
||||
STATE_ROW_OPEN, STATE_ROW_CLOSE, STATE_CN_OPEN, STATE_CN_CLOSE, STATE_VALUE, STATE_FINISHED,
|
||||
@ -119,12 +119,12 @@ namespace cv
|
||||
}
|
||||
}
|
||||
|
||||
void reset()
|
||||
void reset() CV_OVERRIDE
|
||||
{
|
||||
state = STATE_PROLOGUE;
|
||||
}
|
||||
|
||||
const char* next()
|
||||
const char* next() CV_OVERRIDE
|
||||
{
|
||||
switch(state)
|
||||
{
|
||||
@ -258,17 +258,17 @@ namespace cv
|
||||
public:
|
||||
FormatterBase() : prec32f(8), prec64f(16), multiline(true) {}
|
||||
|
||||
void set32fPrecision(int p)
|
||||
void set32fPrecision(int p) CV_OVERRIDE
|
||||
{
|
||||
prec32f = p;
|
||||
}
|
||||
|
||||
void set64fPrecision(int p)
|
||||
void set64fPrecision(int p) CV_OVERRIDE
|
||||
{
|
||||
prec64f = p;
|
||||
}
|
||||
|
||||
void setMultiline(bool ml)
|
||||
void setMultiline(bool ml) CV_OVERRIDE
|
||||
{
|
||||
multiline = ml;
|
||||
}
|
||||
@ -279,11 +279,11 @@ namespace cv
|
||||
int multiline;
|
||||
};
|
||||
|
||||
class DefaultFormatter : public FormatterBase
|
||||
class DefaultFormatter CV_FINAL : public FormatterBase
|
||||
{
|
||||
public:
|
||||
|
||||
Ptr<Formatted> format(const Mat& mtx) const
|
||||
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
|
||||
{
|
||||
char braces[5] = {'\0', '\0', ';', '\0', '\0'};
|
||||
return makePtr<FormattedImpl>("[", "]", mtx, &*braces,
|
||||
@ -291,11 +291,11 @@ namespace cv
|
||||
}
|
||||
};
|
||||
|
||||
class MatlabFormatter : public FormatterBase
|
||||
class MatlabFormatter CV_FINAL : public FormatterBase
|
||||
{
|
||||
public:
|
||||
|
||||
Ptr<Formatted> format(const Mat& mtx) const
|
||||
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
|
||||
{
|
||||
char braces[5] = {'\0', '\0', ';', '\0', '\0'};
|
||||
return makePtr<FormattedImpl>("", "", mtx, &*braces,
|
||||
@ -303,11 +303,11 @@ namespace cv
|
||||
}
|
||||
};
|
||||
|
||||
class PythonFormatter : public FormatterBase
|
||||
class PythonFormatter CV_FINAL : public FormatterBase
|
||||
{
|
||||
public:
|
||||
|
||||
Ptr<Formatted> format(const Mat& mtx) const
|
||||
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
|
||||
{
|
||||
char braces[5] = {'[', ']', ',', '[', ']'};
|
||||
if (mtx.cols == 1)
|
||||
@ -317,11 +317,11 @@ namespace cv
|
||||
}
|
||||
};
|
||||
|
||||
class NumpyFormatter : public FormatterBase
|
||||
class NumpyFormatter CV_FINAL : public FormatterBase
|
||||
{
|
||||
public:
|
||||
|
||||
Ptr<Formatted> format(const Mat& mtx) const
|
||||
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
|
||||
{
|
||||
static const char* numpyTypes[] =
|
||||
{
|
||||
@ -336,11 +336,11 @@ namespace cv
|
||||
}
|
||||
};
|
||||
|
||||
class CSVFormatter : public FormatterBase
|
||||
class CSVFormatter CV_FINAL : public FormatterBase
|
||||
{
|
||||
public:
|
||||
|
||||
Ptr<Formatted> format(const Mat& mtx) const
|
||||
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
|
||||
{
|
||||
char braces[5] = {'\0', '\0', '\0', '\0', '\0'};
|
||||
return makePtr<FormattedImpl>(String(),
|
||||
@ -349,11 +349,11 @@ namespace cv
|
||||
}
|
||||
};
|
||||
|
||||
class CFormatter : public FormatterBase
|
||||
class CFormatter CV_FINAL : public FormatterBase
|
||||
{
|
||||
public:
|
||||
|
||||
Ptr<Formatted> format(const Mat& mtx) const
|
||||
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
|
||||
{
|
||||
char braces[5] = {'\0', '\0', ',', '\0', '\0'};
|
||||
return makePtr<FormattedImpl>("{", "}", mtx, &*braces,
|
||||
|
@ -238,7 +238,7 @@ namespace
|
||||
~ParallelLoopBodyWrapper()
|
||||
{
|
||||
}
|
||||
void operator()(const cv::Range& sr) const
|
||||
void operator()(const cv::Range& sr) const CV_OVERRIDE
|
||||
{
|
||||
#ifdef OPENCV_TRACE
|
||||
// TODO CV_TRACE_NS::details::setCurrentRegion(rootRegion);
|
||||
|
@ -726,7 +726,7 @@ void TraceManagerThreadLocal::dumpStack(std::ostream& out, bool onlyFunctions) c
|
||||
out << ss.str();
|
||||
}
|
||||
|
||||
class AsyncTraceStorage : public TraceStorage
|
||||
class AsyncTraceStorage CV_FINAL : public TraceStorage
|
||||
{
|
||||
mutable std::ofstream out;
|
||||
public:
|
||||
@ -744,7 +744,7 @@ public:
|
||||
out.close();
|
||||
}
|
||||
|
||||
bool put(const TraceMessage& msg) const
|
||||
bool put(const TraceMessage& msg) const CV_OVERRIDE
|
||||
{
|
||||
if (msg.hasError)
|
||||
return false;
|
||||
@ -754,7 +754,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class SyncTraceStorage : public TraceStorage
|
||||
class SyncTraceStorage CV_FINAL : public TraceStorage
|
||||
{
|
||||
mutable std::ofstream out;
|
||||
mutable cv::Mutex mutex;
|
||||
@ -774,7 +774,7 @@ public:
|
||||
out.close();
|
||||
}
|
||||
|
||||
bool put(const TraceMessage& msg) const
|
||||
bool put(const TraceMessage& msg) const CV_OVERRIDE
|
||||
{
|
||||
if (msg.hasError)
|
||||
return false;
|
||||
|
@ -160,7 +160,7 @@ namespace
|
||||
num_points(num_points_), subset_size(subset_size_), rot_matrices(rot_matrices_),
|
||||
transl_vectors(transl_vectors_) {}
|
||||
|
||||
void operator()(const Range& range) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
// Input data for generation of the current hypothesis
|
||||
std::vector<int> subset_indices(subset_size);
|
||||
|
@ -87,6 +87,11 @@ if(WITH_INF_ENGINE AND HAVE_INF_ENGINE)
|
||||
endif()
|
||||
|
||||
ocv_module_include_directories(${include_dirs})
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
ocv_append_source_files_cxx_compiler_options(fw_srcs "-Wno-suggest-override") # GCC
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
ocv_append_source_files_cxx_compiler_options(fw_srcs "-Wno-inconsistent-missing-override") # Clang
|
||||
endif()
|
||||
ocv_glob_module_sources(${sources_options} SOURCES ${fw_srcs})
|
||||
ocv_create_module(${libs})
|
||||
ocv_add_samples()
|
||||
|
@ -152,8 +152,8 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
|
||||
* (i.e. @f$ x_{t}^{stream} @f$ is stored inside @p input[0][stream, ...]).
|
||||
*/
|
||||
|
||||
int inputNameToIndex(String inputName);
|
||||
int outputNameToIndex(const String& outputName);
|
||||
int inputNameToIndex(String inputName) CV_OVERRIDE;
|
||||
int outputNameToIndex(const String& outputName) CV_OVERRIDE;
|
||||
};
|
||||
|
||||
/** @brief Classical recurrent layer
|
||||
|
@ -91,7 +91,15 @@
|
||||
#define __OPENCV_DNN_CAFFE_IO_HPP__
|
||||
#ifdef HAVE_PROTOBUF
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 5
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-override"
|
||||
#endif
|
||||
#include "opencv-caffe.pb.h"
|
||||
#if defined(__GNUC__) && __GNUC__ >= 5
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
namespace caffe { using namespace opencv_caffe; } // avoid massive renames from caffe proto package
|
||||
|
||||
namespace cv {
|
||||
|
@ -283,12 +283,12 @@ public:
|
||||
~OpenCLBackendWrapper() {}
|
||||
|
||||
// Copies data from device to a host memory.
|
||||
virtual void copyToHost()
|
||||
virtual void copyToHost() CV_OVERRIDE
|
||||
{
|
||||
umat.copyTo(*host);
|
||||
}
|
||||
|
||||
virtual void setHostDirty()
|
||||
virtual void setHostDirty() CV_OVERRIDE
|
||||
{
|
||||
hostDirty = true;
|
||||
};
|
||||
@ -395,11 +395,11 @@ struct LayerData
|
||||
//fake layer containing network input blobs
|
||||
struct DataLayer : public Layer
|
||||
{
|
||||
void finalize(const std::vector<Mat*>&, std::vector<Mat>&) {}
|
||||
void forward(std::vector<Mat*>&, std::vector<Mat>&, std::vector<Mat> &) {}
|
||||
void forward(InputArrayOfArrays inputs, OutputArrayOfArrays outputs, OutputArrayOfArrays internals) {}
|
||||
void finalize(const std::vector<Mat*>&, std::vector<Mat>&) CV_OVERRIDE {}
|
||||
void forward(std::vector<Mat*>&, std::vector<Mat>&, std::vector<Mat> &) CV_OVERRIDE {}
|
||||
void forward(InputArrayOfArrays inputs, OutputArrayOfArrays outputs, OutputArrayOfArrays internals) CV_OVERRIDE {}
|
||||
|
||||
int outputNameToIndex(const String& tgtName)
|
||||
int outputNameToIndex(const String& tgtName) CV_OVERRIDE
|
||||
{
|
||||
int idx = (int)(std::find(outNames.begin(), outNames.end(), tgtName) - outNames.begin());
|
||||
return (idx < (int)outNames.size()) ? idx : -1;
|
||||
@ -413,7 +413,7 @@ struct DataLayer : public Layer
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == requiredOutputs);
|
||||
outputs.assign(inputs.begin(), inputs.end());
|
||||
|
@ -23,7 +23,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class BatchNormLayerImpl : public BatchNormLayer
|
||||
class BatchNormLayerImpl CV_FINAL : public BatchNormLayer
|
||||
{
|
||||
public:
|
||||
Mat weights_, bias_;
|
||||
@ -90,7 +90,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void getScaleShift(Mat& scale, Mat& shift) const
|
||||
void getScaleShift(Mat& scale, Mat& shift) const CV_OVERRIDE
|
||||
{
|
||||
scale = weights_;
|
||||
shift = bias_;
|
||||
@ -99,7 +99,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
if (!useGlobalStats && inputs[0][0] != 1)
|
||||
CV_Error(Error::StsNotImplemented, "Batch normalization in training mode with batch size > 1");
|
||||
@ -107,7 +107,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() ||
|
||||
@ -176,7 +176,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -188,7 +188,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -219,7 +219,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> tryAttach(const Ptr<BackendNode>& node)
|
||||
virtual Ptr<BackendNode> tryAttach(const Ptr<BackendNode>& node) CV_OVERRIDE
|
||||
{
|
||||
switch (node->backendId)
|
||||
{
|
||||
@ -251,7 +251,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
Halide::Buffer<float> input = halideBuffer(inputs[0]);
|
||||
@ -278,7 +278,7 @@ public:
|
||||
}
|
||||
#endif // HAVE_HALIDE
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
@ -296,7 +296,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)outputs; // suppress unused variable warning
|
||||
|
||||
|
@ -45,7 +45,7 @@ namespace cv
|
||||
{
|
||||
namespace dnn
|
||||
{
|
||||
class BlankLayerImpl : public BlankLayer
|
||||
class BlankLayerImpl CV_FINAL : public BlankLayer
|
||||
{
|
||||
public:
|
||||
BlankLayerImpl(const LayerParams& params)
|
||||
@ -56,7 +56,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
Layer::getMemoryShapes(inputs, requiredOutputs, outputs, internals);
|
||||
return true;
|
||||
@ -83,7 +83,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -95,7 +95,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
|
@ -54,7 +54,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class ConcatLayerImpl : public ConcatLayer
|
||||
class ConcatLayerImpl CV_FINAL : public ConcatLayer
|
||||
{
|
||||
public:
|
||||
ConcatLayerImpl(const LayerParams& params)
|
||||
@ -67,7 +67,7 @@ public:
|
||||
virtual bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() > 0);
|
||||
outputs.resize(1, inputs[0]);
|
||||
@ -101,7 +101,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() && axis == 1 && !padding || // By channels
|
||||
@ -157,7 +157,7 @@ public:
|
||||
|
||||
ChannelConcatInvoker() : inputs(0), output(0), nstripes(0) {}
|
||||
|
||||
void operator()(const Range& r) const
|
||||
void operator()(const Range& r) const CV_OVERRIDE
|
||||
{
|
||||
size_t planeSize = (size_t)output->size[2]*output->size[3];
|
||||
size_t nch = chptrs.size();
|
||||
@ -230,7 +230,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -242,7 +242,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -278,7 +278,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &input)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &input) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
std::vector<Halide::Buffer<> > inputBuffers = halideBuffers(input);
|
||||
@ -301,7 +301,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >& inputs)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >& inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::DataPtr input = infEngineDataNode(inputs[0]);
|
||||
|
@ -79,14 +79,14 @@ public:
|
||||
adjustPad.height < stride.height);
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() ||
|
||||
backendId == DNN_BACKEND_INFERENCE_ENGINE && haveInfEngine();
|
||||
}
|
||||
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() > 0);
|
||||
|
||||
@ -123,7 +123,7 @@ public:
|
||||
virtual void applyHalideScheduler(Ptr<BackendNode>& node,
|
||||
const std::vector<Mat*> &inputs,
|
||||
const std::vector<Mat> &outputs,
|
||||
int targetId) const
|
||||
int targetId) const CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
if (targetId != DNN_TARGET_CPU)
|
||||
@ -165,7 +165,7 @@ public:
|
||||
#define IS_POWER_LAYER(layer) \
|
||||
(!layer.empty() && !layer->type.compare("Power"))
|
||||
//TODO: simultaneously convolution and bias addition for cache optimization
|
||||
class ConvolutionLayerImpl : public BaseConvolutionLayerImpl
|
||||
class ConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl
|
||||
{
|
||||
public:
|
||||
enum { VEC_ALIGN = 8, DFT_TYPE = CV_32F };
|
||||
@ -194,7 +194,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
MatShape computeColRowShape(const MatShape &inpShape, const MatShape &outShape) const
|
||||
MatShape computeColRowShape(const MatShape &inpShape, const MatShape &outShape) const CV_OVERRIDE
|
||||
{
|
||||
Size out(outShape[3], outShape[2]);
|
||||
int inpGroupCn = blobs[0].size[1];
|
||||
@ -205,7 +205,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(blobs.size() != 0);
|
||||
CV_Assert(!hasBias() || blobs[1].total() == (size_t)blobs[0].size[0]);
|
||||
@ -239,7 +239,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
virtual void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
BaseConvolutionLayerImpl::finalize(inputs, outputs);
|
||||
|
||||
@ -278,7 +278,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
bool setActivation(const Ptr<ActivationLayer>& layer)
|
||||
bool setActivation(const Ptr<ActivationLayer>& layer) CV_OVERRIDE
|
||||
{
|
||||
activ = layer;
|
||||
if (activ.empty())
|
||||
@ -312,7 +312,7 @@ public:
|
||||
return !activ.empty();
|
||||
}
|
||||
|
||||
virtual bool tryFuse(Ptr<Layer>& top)
|
||||
virtual bool tryFuse(Ptr<Layer>& top) CV_OVERRIDE
|
||||
{
|
||||
Mat w, b;
|
||||
top->getScaleShift(w, b);
|
||||
@ -357,7 +357,7 @@ public:
|
||||
biasvec[outCn] = biasvec[outCn+1] = biasvec[outCn-1];
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
Halide::Buffer<float> inputBuffer = halideBuffer(inputs[0]);
|
||||
@ -405,7 +405,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::DataPtr input = infEngineDataNode(inputs[0]);
|
||||
@ -517,7 +517,7 @@ public:
|
||||
parallel_for_(Range(0, nstripes), p, nstripes);
|
||||
}
|
||||
|
||||
virtual void operator ()(const Range &r0) const
|
||||
virtual void operator ()(const Range &r0) const CV_OVERRIDE
|
||||
{
|
||||
const int valign = ConvolutionLayerImpl::VEC_ALIGN;
|
||||
int ngroups = ngroups_, batchSize = input_->size[0]*ngroups;
|
||||
@ -937,7 +937,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -949,7 +949,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -993,7 +993,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == outputs.size());
|
||||
|
||||
@ -1007,7 +1007,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class DeConvolutionLayerImpl : public BaseConvolutionLayerImpl
|
||||
class DeConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl
|
||||
{
|
||||
public:
|
||||
Mat weightsMat, biasesMat;
|
||||
@ -1016,7 +1016,7 @@ public:
|
||||
|
||||
DeConvolutionLayerImpl(const LayerParams& params) : BaseConvolutionLayerImpl(params) {}
|
||||
|
||||
MatShape computeColRowShape(const MatShape &inpShape, const MatShape &outShape) const
|
||||
MatShape computeColRowShape(const MatShape &inpShape, const MatShape &outShape) const CV_OVERRIDE
|
||||
{
|
||||
int inpCn = inpShape[1];
|
||||
int inpH = inpShape[2];
|
||||
@ -1031,7 +1031,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(!hasBias() || blobs[1].total() == (size_t)numOutput);
|
||||
CV_Assert(inputs.size() != 0);
|
||||
@ -1080,7 +1080,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
BaseConvolutionLayerImpl::finalize(inputs, outputs);
|
||||
getConvPoolPaddings(Size(outputs[0].size[3], outputs[0].size[2]),
|
||||
@ -1102,7 +1102,7 @@ public:
|
||||
useAVX512 = CV_CPU_HAS_SUPPORT_AVX512_SKX;
|
||||
}
|
||||
|
||||
void operator()(const Range& range_) const
|
||||
void operator()(const Range& range_) const CV_OVERRIDE
|
||||
{
|
||||
int stripeSize = (int)alignSize((b_->cols + nstripes_ - 1)/nstripes_, 16);
|
||||
Range range(range_.start*stripeSize, std::min(range_.end*stripeSize, b_->cols));
|
||||
@ -1277,7 +1277,7 @@ public:
|
||||
parallel_for_(Range(0, nstripes), t, nstripes);
|
||||
}
|
||||
|
||||
virtual void operator ()(const Range &r) const
|
||||
virtual void operator ()(const Range &r) const CV_OVERRIDE
|
||||
{
|
||||
const float* data_col_ = data_col;
|
||||
float* data_im_ = data_im;
|
||||
@ -1423,7 +1423,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -1435,7 +1435,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat *> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat *> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -1489,7 +1489,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
Halide::Buffer<float> inputBuffer = halideBuffer(inputs[0]);
|
||||
@ -1543,7 +1543,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == outputs.size());
|
||||
|
||||
|
@ -48,7 +48,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class CropLayerImpl : public CropLayer
|
||||
class CropLayerImpl CV_FINAL : public CropLayer
|
||||
{
|
||||
public:
|
||||
CropLayerImpl(const LayerParams& params)
|
||||
@ -67,7 +67,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == 2);
|
||||
|
||||
@ -83,7 +83,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void finalize(const std::vector<Mat *> &inputs, std::vector<Mat> &outputs)
|
||||
void finalize(const std::vector<Mat *> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(2 == inputs.size());
|
||||
|
||||
@ -119,7 +119,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -127,7 +127,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat *> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat *> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
|
@ -93,7 +93,7 @@ static inline float caffe_norm_box_overlap(const util::NormalizedBBox& a, const
|
||||
|
||||
} // namespace
|
||||
|
||||
class DetectionOutputLayerImpl : public DetectionOutputLayer
|
||||
class DetectionOutputLayerImpl CV_FINAL : public DetectionOutputLayer
|
||||
{
|
||||
public:
|
||||
unsigned _numClasses;
|
||||
@ -193,7 +193,7 @@ public:
|
||||
setParamsFrom(params);
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_INFERENCE_ENGINE && haveInfEngine() && !_locPredTransposed;
|
||||
@ -202,7 +202,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() >= 3);
|
||||
CV_Assert(inputs[0][0] == inputs[1][0]);
|
||||
@ -367,7 +367,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -379,7 +379,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -862,7 +862,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
nstripes_ = nstripes;
|
||||
}
|
||||
|
||||
void operator()(const Range &r) const
|
||||
void operator()(const Range &r) const CV_OVERRIDE
|
||||
{
|
||||
int nstripes = nstripes_, nsamples = 1, outCn = 1;
|
||||
size_t planeSize = 1;
|
||||
@ -113,14 +113,14 @@ public:
|
||||
|
||||
ElementWiseLayer(const Func &f=Func()) : run_parallel(false) { func = f; }
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() ||
|
||||
backendId == DNN_BACKEND_INFERENCE_ENGINE && haveInfEngine() && this->type != "Sigmoid";
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> tryAttach(const Ptr<BackendNode>& node)
|
||||
virtual Ptr<BackendNode> tryAttach(const Ptr<BackendNode>& node) CV_OVERRIDE
|
||||
{
|
||||
switch (node->backendId)
|
||||
{
|
||||
@ -140,7 +140,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
Halide::Buffer<float> input = halideBuffer(inputs[0]);
|
||||
@ -152,7 +152,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
@ -166,13 +166,13 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
Layer::getMemoryShapes(inputs, requiredOutputs, outputs, internals);
|
||||
return true;
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
|
||||
@ -183,7 +183,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
|
||||
@ -200,13 +200,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void forwardSlice(const float* src, float* dst, int len, size_t planeSize, int cn0, int cn1) const
|
||||
void forwardSlice(const float* src, float* dst, int len, size_t planeSize, int cn0, int cn1) const CV_OVERRIDE
|
||||
{
|
||||
func.apply(src, dst, len, planeSize, cn0, cn1);
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
long flops = 0;
|
||||
for (int i = 0; i < outputs.size(); i++)
|
||||
|
@ -54,7 +54,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class EltwiseLayerImpl : public EltwiseLayer
|
||||
class EltwiseLayerImpl CV_FINAL : public EltwiseLayer
|
||||
{
|
||||
public:
|
||||
enum EltwiseOp
|
||||
@ -94,7 +94,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() ||
|
||||
@ -104,7 +104,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() >= 2);
|
||||
CV_Assert(coeffs.size() == 0 || coeffs.size() == inputs.size());
|
||||
@ -178,7 +178,7 @@ public:
|
||||
parallel_for_(Range(0, nstripes), p, nstripes);
|
||||
}
|
||||
|
||||
void operator()(const Range& r) const
|
||||
void operator()(const Range& r) const CV_OVERRIDE
|
||||
{
|
||||
size_t total = dst->size[0]*planeSize;
|
||||
size_t stripeSize = (total + nstripes - 1)/nstripes;
|
||||
@ -338,7 +338,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -350,7 +350,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat *> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat *> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -361,7 +361,7 @@ public:
|
||||
coeffs, op, activ.get(), nstripes);
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &input)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &input) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
Halide::Var x("x"), y("y"), c("c"), n("n");
|
||||
@ -407,7 +407,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
@ -429,7 +429,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)outputs; // suppress unused variable warning
|
||||
CV_Assert(inputs.size());
|
||||
@ -439,7 +439,7 @@ public:
|
||||
return flops;
|
||||
}
|
||||
|
||||
bool setActivation(const Ptr<ActivationLayer>& layer)
|
||||
bool setActivation(const Ptr<ActivationLayer>& layer) CV_OVERRIDE
|
||||
{
|
||||
activ = layer;
|
||||
return !activ.empty();
|
||||
|
@ -52,7 +52,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class FlattenLayerImpl : public FlattenLayer
|
||||
class FlattenLayerImpl CV_FINAL : public FlattenLayer
|
||||
{
|
||||
public:
|
||||
FlattenLayerImpl(const LayerParams ¶ms)
|
||||
@ -62,7 +62,7 @@ public:
|
||||
setParamsFrom(params);
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_INFERENCE_ENGINE && haveInfEngine();
|
||||
@ -71,7 +71,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() > 0);
|
||||
for (size_t i = 1; i < inputs.size(); i++)
|
||||
@ -135,7 +135,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -148,7 +148,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -160,7 +160,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
|
@ -56,7 +56,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class FullyConnectedLayerImpl : public InnerProductLayer
|
||||
class FullyConnectedLayerImpl CV_FINAL : public InnerProductLayer
|
||||
{
|
||||
public:
|
||||
enum { VEC_ALIGN = 8 };
|
||||
@ -106,7 +106,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &) const
|
||||
std::vector<MatShape> &) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == 1);
|
||||
CV_Assert(1 <= blobs.size() && blobs.size() <= 2);
|
||||
@ -125,14 +125,14 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() && axis == 1 ||
|
||||
backendId == DNN_BACKEND_INFERENCE_ENGINE && haveInfEngine() && axis == 1;
|
||||
}
|
||||
|
||||
virtual bool setActivation(const Ptr<ActivationLayer>& layer)
|
||||
virtual bool setActivation(const Ptr<ActivationLayer>& layer) CV_OVERRIDE
|
||||
{
|
||||
activ = layer;
|
||||
return !activ.empty();
|
||||
@ -168,7 +168,7 @@ public:
|
||||
parallel_for_(Range(0, nstripes), p, nstripes);
|
||||
}
|
||||
|
||||
void operator()(const Range& r) const
|
||||
void operator()(const Range& r) const CV_OVERRIDE
|
||||
{
|
||||
int valign = FullyConnectedLayerImpl::VEC_ALIGN;
|
||||
int nsamples = srcMat->rows;
|
||||
@ -267,7 +267,7 @@ public:
|
||||
};
|
||||
|
||||
#ifdef HAVE_OPENCL
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
innerProductOp.release();
|
||||
}
|
||||
@ -348,7 +348,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -360,7 +360,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &input, std::vector<Mat> &output, std::vector<Mat> &)
|
||||
void forward(std::vector<Mat*> &input, std::vector<Mat> &output, std::vector<Mat> &) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -378,7 +378,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
int inW, inH, inC, inN, outC = blobs[0].size[0];
|
||||
@ -402,7 +402,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
@ -421,7 +421,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)inputs; // suppress unused variable warning
|
||||
long flops = 0;
|
||||
|
@ -59,7 +59,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class LRNLayerImpl : public LRNLayer
|
||||
class LRNLayerImpl CV_FINAL : public LRNLayer
|
||||
{
|
||||
public:
|
||||
LRNLayerImpl(const LayerParams& params)
|
||||
@ -88,7 +88,7 @@ public:
|
||||
Ptr<OCL4DNNLRN<float> > lrnOp;
|
||||
#endif
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() ||
|
||||
@ -96,7 +96,7 @@ public:
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENCL
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
lrnOp.release();
|
||||
}
|
||||
@ -139,7 +139,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -153,7 +153,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -196,7 +196,7 @@ public:
|
||||
planeSize_ = planeSize; nsamples_ = nsamples; nstripes_ = nstripes;
|
||||
}
|
||||
|
||||
void operator()(const Range& r) const
|
||||
void operator()(const Range& r) const CV_OVERRIDE
|
||||
{
|
||||
int nsamples = nsamples_, nstripes = nstripes_;
|
||||
size_t planeSize = planeSize_, planeSize_n = planeSize * nsamples;
|
||||
@ -303,7 +303,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
float alphaSize = alpha;
|
||||
@ -347,7 +347,7 @@ public:
|
||||
virtual void applyHalideScheduler(Ptr<BackendNode>& node,
|
||||
const std::vector<Mat*> &inputs,
|
||||
const std::vector<Mat> &outputs,
|
||||
int targetId) const
|
||||
int targetId) const CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
if (targetId != DNN_TARGET_CPU)
|
||||
@ -376,7 +376,7 @@ public:
|
||||
#endif // HAVE_HALIDE
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
@ -396,7 +396,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)outputs; // suppress unused variable warning
|
||||
CV_Assert(inputs.size() > 0);
|
||||
|
@ -21,7 +21,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class MaxUnpoolLayerImpl : public MaxUnpoolLayer
|
||||
class MaxUnpoolLayerImpl CV_FINAL : public MaxUnpoolLayer
|
||||
{
|
||||
public:
|
||||
MaxUnpoolLayerImpl(const LayerParams& params)
|
||||
@ -32,7 +32,7 @@ public:
|
||||
poolStride = Size(params.get<int>("pool_stride_w"), params.get<int>("pool_stride_h"));
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() &&
|
||||
@ -42,7 +42,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == 2);
|
||||
CV_Assert(total(inputs[0]) == total(inputs[1]));
|
||||
@ -57,7 +57,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -65,7 +65,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -117,7 +117,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &input)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &input) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
// Meaningless operation if false because if kernel > stride
|
||||
|
@ -54,7 +54,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class MVNLayerImpl : public MVNLayer
|
||||
class MVNLayerImpl CV_FINAL : public MVNLayer
|
||||
{
|
||||
public:
|
||||
MVNLayerImpl(const LayerParams& params)
|
||||
@ -71,7 +71,7 @@ public:
|
||||
Mat scale, shift;
|
||||
bool fuse_batch_norm;
|
||||
|
||||
virtual bool tryFuse(Ptr<Layer>& top)
|
||||
virtual bool tryFuse(Ptr<Layer>& top) CV_OVERRIDE
|
||||
{
|
||||
if (preferableTarget == DNN_TARGET_OPENCL && !fuse_batch_norm)
|
||||
{
|
||||
@ -85,7 +85,7 @@ public:
|
||||
Ptr<ReLULayer> activ_relu;
|
||||
float relu_slope;
|
||||
bool fuse_relu;
|
||||
bool setActivation(const Ptr<ActivationLayer>& layer)
|
||||
bool setActivation(const Ptr<ActivationLayer>& layer) CV_OVERRIDE
|
||||
{
|
||||
if (!layer.empty() && preferableTarget == DNN_TARGET_OPENCL)
|
||||
{
|
||||
@ -244,7 +244,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -256,7 +256,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat *> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat *> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -295,7 +295,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)outputs; // suppress unused variable warning
|
||||
long flops = 0;
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
namespace cv { namespace dnn {
|
||||
|
||||
class NormalizeBBoxLayerImpl : public NormalizeBBoxLayer
|
||||
class NormalizeBBoxLayerImpl CV_FINAL : public NormalizeBBoxLayer
|
||||
{
|
||||
public:
|
||||
NormalizeBBoxLayerImpl(const LayerParams& params)
|
||||
@ -60,7 +60,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == 1);
|
||||
Layer::getMemoryShapes(inputs, requiredOutputs, outputs, internals);
|
||||
@ -140,7 +140,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -152,7 +152,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
|
@ -19,7 +19,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class PaddingLayerImpl : public PaddingLayer
|
||||
class PaddingLayerImpl CV_FINAL : public PaddingLayer
|
||||
{
|
||||
public:
|
||||
PaddingLayerImpl(const LayerParams ¶ms)
|
||||
@ -45,7 +45,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == 1);
|
||||
const MatShape& inpShape = inputs[0];
|
||||
@ -61,7 +61,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
// Compute dstRanges.
|
||||
const MatSize& inpShape = inputs[0]->size;
|
||||
@ -85,13 +85,13 @@ public:
|
||||
dstRanges.push_back(Range::all());
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() && dstRanges.size() == 4;
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -99,7 +99,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -145,7 +145,7 @@ public:
|
||||
CV_Error(Error::StsNotImplemented, "Unknown padding type: " + paddingType);
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
int inW, inH, inC, inN;
|
||||
|
@ -54,7 +54,7 @@ namespace cv
|
||||
{
|
||||
namespace dnn
|
||||
{
|
||||
class PermuteLayerImpl : public PermuteLayer
|
||||
class PermuteLayerImpl CV_FINAL : public PermuteLayer
|
||||
{
|
||||
public:
|
||||
void checkCurrentOrder(int currentOrder)
|
||||
@ -116,7 +116,7 @@ public:
|
||||
checkNeedForPermutation();
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_INFERENCE_ENGINE && haveInfEngine();
|
||||
@ -125,7 +125,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
if(!_needsPermute)
|
||||
{
|
||||
@ -172,7 +172,7 @@ public:
|
||||
_count = _oldStride[0] * shapeBefore[0];
|
||||
}
|
||||
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
if(!_needsPermute)
|
||||
{
|
||||
@ -230,7 +230,7 @@ public:
|
||||
|
||||
PermuteInvoker() : inp(0), out(0), order(0), nstripes(0) {}
|
||||
|
||||
void operator()(const Range& r) const
|
||||
void operator()(const Range& r) const CV_OVERRIDE
|
||||
{
|
||||
int n0 = out->size[0], n1 = out->size[1], n2 = out->size[2], n3 = out->size[3];
|
||||
|
||||
@ -308,7 +308,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -320,7 +320,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -380,7 +380,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
|
@ -64,7 +64,7 @@ static inline int roundRoiSize(float v)
|
||||
return (int)(v + (v >= 0.f ? 0.5f : -0.5f));
|
||||
}
|
||||
|
||||
class PoolingLayerImpl : public PoolingLayer
|
||||
class PoolingLayerImpl CV_FINAL : public PoolingLayer
|
||||
{
|
||||
public:
|
||||
PoolingLayerImpl(const LayerParams& params)
|
||||
@ -114,7 +114,7 @@ public:
|
||||
Ptr<OCL4DNNPool<float> > poolOp;
|
||||
#endif
|
||||
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(!inputs.empty());
|
||||
|
||||
@ -133,7 +133,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() &&
|
||||
@ -184,7 +184,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -196,7 +196,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -221,7 +221,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
if (type == MAX)
|
||||
return initMaxPoolingHalide(inputs);
|
||||
@ -231,7 +231,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
@ -313,7 +313,7 @@ public:
|
||||
parallel_for_(Range(0, nstripes), p, nstripes);
|
||||
}
|
||||
|
||||
void operator()(const Range& r) const
|
||||
void operator()(const Range& r) const CV_OVERRIDE
|
||||
{
|
||||
int channels = dst->size[1], width = dst->size[3], height = dst->size[2];
|
||||
int inp_width = src->size[3], inp_height = src->size[2];
|
||||
@ -752,7 +752,7 @@ public:
|
||||
virtual void applyHalideScheduler(Ptr<BackendNode>& node,
|
||||
const std::vector<Mat*> &inputs,
|
||||
const std::vector<Mat> &outputs,
|
||||
int targetId) const
|
||||
int targetId) const CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
if (targetId != DNN_TARGET_CPU)
|
||||
@ -801,7 +801,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() != 0);
|
||||
Size in(inputs[0][3], inputs[0][2]), out;
|
||||
@ -858,7 +858,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)inputs; // suppress unused variable warning
|
||||
long flops = 0;
|
||||
|
@ -56,7 +56,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class PriorBoxLayerImpl : public PriorBoxLayer
|
||||
class PriorBoxLayerImpl CV_FINAL : public PriorBoxLayer
|
||||
{
|
||||
public:
|
||||
static bool getParameterDict(const LayerParams ¶ms,
|
||||
@ -266,7 +266,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_INFERENCE_ENGINE && haveInfEngine() && !_explicitSizes;
|
||||
@ -275,7 +275,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(!inputs.empty());
|
||||
|
||||
@ -385,7 +385,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -397,7 +397,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -476,7 +476,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
@ -516,7 +516,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)outputs; // suppress unused variable warning
|
||||
long flops = 0;
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
namespace cv { namespace dnn {
|
||||
|
||||
class ProposalLayerImpl : public ProposalLayer
|
||||
class ProposalLayerImpl CV_FINAL : public ProposalLayer
|
||||
{
|
||||
public:
|
||||
ProposalLayerImpl(const LayerParams& params)
|
||||
@ -85,7 +85,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
// We need to allocate the following blobs:
|
||||
// - output priors from PriorBoxLayer
|
||||
@ -127,7 +127,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
std::vector<Mat*> layerInputs;
|
||||
std::vector<Mat> layerOutputs;
|
||||
@ -222,7 +222,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -234,7 +234,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
|
@ -80,7 +80,7 @@ static void sigmoid(const Mat &src, Mat &dst)
|
||||
cv::pow(1 + dst, -1, dst);
|
||||
}
|
||||
|
||||
class LSTMLayerImpl : public LSTMLayer
|
||||
class LSTMLayerImpl CV_FINAL : public LSTMLayer
|
||||
{
|
||||
int numTimeStamps, numSamples;
|
||||
bool allocated;
|
||||
@ -137,25 +137,25 @@ public:
|
||||
outTailShape.clear();
|
||||
}
|
||||
|
||||
void setUseTimstampsDim(bool use)
|
||||
void setUseTimstampsDim(bool use) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(!allocated);
|
||||
useTimestampDim = use;
|
||||
}
|
||||
|
||||
void setProduceCellOutput(bool produce)
|
||||
void setProduceCellOutput(bool produce) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(!allocated);
|
||||
produceCellOutput = produce;
|
||||
}
|
||||
|
||||
void setOutShape(const MatShape &outTailShape_)
|
||||
void setOutShape(const MatShape &outTailShape_) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(!allocated || total(outTailShape) == total(outTailShape_));
|
||||
outTailShape = outTailShape_;
|
||||
}
|
||||
|
||||
void setWeights(const Mat &Wh, const Mat &Wx, const Mat &bias)
|
||||
void setWeights(const Mat &Wh, const Mat &Wx, const Mat &bias) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(Wh.dims == 2 && Wx.dims == 2);
|
||||
CV_Assert(Wh.rows == Wx.rows);
|
||||
@ -172,7 +172,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(!usePeephole && blobs.size() == 3 || usePeephole && blobs.size() == 6);
|
||||
CV_Assert(inputs.size() == 1);
|
||||
@ -217,7 +217,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void finalize(const std::vector<Mat*> &input, std::vector<Mat> &output)
|
||||
void finalize(const std::vector<Mat*> &input, std::vector<Mat> &output) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(!usePeephole && blobs.size() == 3 || usePeephole && blobs.size() == 6);
|
||||
CV_Assert(input.size() == 1);
|
||||
@ -252,7 +252,7 @@ public:
|
||||
allocated = true;
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -260,7 +260,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &input, std::vector<Mat> &output, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &input, std::vector<Mat> &output, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -384,12 +384,12 @@ public:
|
||||
produceH = false;
|
||||
}
|
||||
|
||||
void setProduceHiddenOutput(bool produce = false)
|
||||
void setProduceHiddenOutput(bool produce = false) CV_OVERRIDE
|
||||
{
|
||||
produceH = produce;
|
||||
}
|
||||
|
||||
void setWeights(const Mat &W_xh, const Mat &b_h, const Mat &W_hh, const Mat &W_ho, const Mat &b_o)
|
||||
void setWeights(const Mat &W_xh, const Mat &b_h, const Mat &W_hh, const Mat &W_ho, const Mat &b_o) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(W_hh.dims == 2 && W_xh.dims == 2);
|
||||
CV_Assert(W_hh.size[0] == W_xh.size[0] && W_hh.size[0] == W_hh.size[1] && (int)b_h.total() == W_xh.size[0]);
|
||||
@ -407,7 +407,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() >= 1 && inputs.size() <= 2);
|
||||
|
||||
@ -433,7 +433,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void finalize(const std::vector<Mat*> &input, std::vector<Mat> &output)
|
||||
void finalize(const std::vector<Mat*> &input, std::vector<Mat> &output) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(input.size() >= 1 && input.size() <= 2);
|
||||
|
||||
@ -473,7 +473,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -481,7 +481,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &input, std::vector<Mat> &output, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &input, std::vector<Mat> &output, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
|
@ -54,7 +54,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class RegionLayerImpl : public RegionLayer
|
||||
class RegionLayerImpl CV_FINAL : public RegionLayer
|
||||
{
|
||||
public:
|
||||
int coords, classes, anchors, classfix;
|
||||
@ -85,7 +85,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() > 0);
|
||||
CV_Assert(inputs[0][3] == (1 + coords + classes)*anchors);
|
||||
@ -93,7 +93,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT;
|
||||
}
|
||||
@ -185,7 +185,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -197,7 +197,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -312,7 +312,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)outputs; // suppress unused variable warning
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class ReorgLayerImpl : public ReorgLayer
|
||||
class ReorgLayerImpl CV_FINAL : public ReorgLayer
|
||||
{
|
||||
int reorgStride;
|
||||
public:
|
||||
@ -70,7 +70,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() > 0);
|
||||
outputs = std::vector<MatShape>(inputs.size(), shape(
|
||||
@ -85,7 +85,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT;
|
||||
}
|
||||
@ -129,7 +129,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -141,7 +141,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -174,7 +174,7 @@ public:
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)outputs; // suppress unused variable warning
|
||||
|
||||
|
@ -144,7 +144,7 @@ static void computeShapeByReshapeMask(const MatShape &srcShape,
|
||||
}
|
||||
|
||||
|
||||
class ReshapeLayerImpl : public ReshapeLayer
|
||||
class ReshapeLayerImpl CV_FINAL : public ReshapeLayer
|
||||
{
|
||||
public:
|
||||
ReshapeLayerImpl(const LayerParams& params)
|
||||
@ -166,7 +166,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_INFERENCE_ENGINE && haveInfEngine();
|
||||
@ -175,7 +175,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
outputs.clear();
|
||||
|
||||
@ -214,7 +214,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -226,7 +226,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -239,7 +239,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
namespace cv { namespace dnn {
|
||||
|
||||
class ResizeNearestNeighborLayerImpl : public ResizeNearestNeighborLayer
|
||||
class ResizeNearestNeighborLayerImpl CV_FINAL : public ResizeNearestNeighborLayer
|
||||
{
|
||||
public:
|
||||
ResizeNearestNeighborLayerImpl(const LayerParams& params)
|
||||
@ -27,7 +27,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == 1, inputs[0].size() == 4);
|
||||
outputs.resize(1, inputs[0]);
|
||||
@ -37,7 +37,7 @@ public:
|
||||
return (outputs[0][2] == inputs[0][2]) && (outputs[0][3] == inputs[0][3]);
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -45,7 +45,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
|
@ -20,7 +20,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class ScaleLayerImpl : public ScaleLayer
|
||||
class ScaleLayerImpl CV_FINAL : public ScaleLayer
|
||||
{
|
||||
public:
|
||||
ScaleLayerImpl(const LayerParams& params)
|
||||
@ -33,21 +33,21 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == 2 && blobs.empty() || blobs.size() == 1 + hasBias);
|
||||
outputs.assign(1, inputs[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() ||
|
||||
backendId == DNN_BACKEND_INFERENCE_ENGINE && haveInfEngine();
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -55,7 +55,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -117,7 +117,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> tryAttach(const Ptr<BackendNode>& node)
|
||||
virtual Ptr<BackendNode> tryAttach(const Ptr<BackendNode>& node) CV_OVERRIDE
|
||||
{
|
||||
switch (node->backendId)
|
||||
{
|
||||
@ -150,7 +150,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
Halide::Buffer<float> input = halideBuffer(inputs[0]);
|
||||
@ -183,7 +183,7 @@ public:
|
||||
}
|
||||
#endif // HAVE_HALIDE
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
@ -201,14 +201,14 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
void getScaleShift(Mat& scale, Mat& shift) const
|
||||
void getScaleShift(Mat& scale, Mat& shift) const CV_OVERRIDE
|
||||
{
|
||||
scale = !blobs.empty() ? blobs[0] : Mat();
|
||||
shift = hasBias ? blobs[1] : Mat();
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)outputs; // suppress unused variable warning
|
||||
long flops = 0;
|
||||
|
@ -18,7 +18,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class ShiftLayerImpl : public ShiftLayer
|
||||
class ShiftLayerImpl CV_FINAL : public ShiftLayer
|
||||
{
|
||||
public:
|
||||
ShiftLayerImpl(const LayerParams ¶ms)
|
||||
@ -27,7 +27,7 @@ public:
|
||||
CV_Assert(blobs.size() == 1);
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_INFERENCE_ENGINE && haveInfEngine();
|
||||
@ -36,14 +36,14 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
Layer::getMemoryShapes(inputs, requiredOutputs, outputs, internals);
|
||||
internals.assign(1, shape(1, total(inputs[0], 2)));
|
||||
return true;
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -51,7 +51,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
virtual void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
virtual void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -90,7 +90,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> tryAttach(const Ptr<BackendNode>& node)
|
||||
virtual Ptr<BackendNode> tryAttach(const Ptr<BackendNode>& node) CV_OVERRIDE
|
||||
{
|
||||
switch (node->backendId)
|
||||
{
|
||||
@ -111,7 +111,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
// Inference Engine has no layer just for biases. Create a linear
|
||||
@ -136,14 +136,14 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
void getScaleShift(Mat& scale, Mat& shift) const
|
||||
void getScaleShift(Mat& scale, Mat& shift) const CV_OVERRIDE
|
||||
{
|
||||
scale = Mat();
|
||||
shift = blobs[0];
|
||||
}
|
||||
|
||||
virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)outputs; // suppress unused variable warning
|
||||
long flops = 0;
|
||||
|
@ -53,7 +53,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class SliceLayerImpl : public SliceLayer
|
||||
class SliceLayerImpl CV_FINAL : public SliceLayer
|
||||
{
|
||||
public:
|
||||
SliceLayerImpl(const LayerParams& params)
|
||||
@ -110,7 +110,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == 1);
|
||||
MatShape inpShape = inputs[0];
|
||||
@ -137,7 +137,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == 1);
|
||||
const MatSize& inpShape = inputs[0]->size;
|
||||
@ -217,7 +217,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -229,7 +229,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
|
@ -58,7 +58,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class SoftMaxLayerImpl : public SoftmaxLayer
|
||||
class SoftMaxLayerImpl CV_FINAL : public SoftmaxLayer
|
||||
{
|
||||
public:
|
||||
|
||||
@ -76,7 +76,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
bool inplace = Layer::getMemoryShapes(inputs, requiredOutputs, outputs, internals);
|
||||
MatShape shape = inputs[0];
|
||||
@ -86,7 +86,7 @@ public:
|
||||
return inplace;
|
||||
}
|
||||
|
||||
virtual bool supportBackend(int backendId)
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE
|
||||
{
|
||||
return backendId == DNN_BACKEND_DEFAULT ||
|
||||
backendId == DNN_BACKEND_HALIDE && haveHalide() && axisRaw == 1 ||
|
||||
@ -94,7 +94,7 @@ public:
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENCL
|
||||
virtual void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs)
|
||||
virtual void finalize(const std::vector<Mat*> &inputs, std::vector<Mat> &outputs) CV_OVERRIDE
|
||||
{
|
||||
softmaxOp.release();
|
||||
}
|
||||
@ -190,7 +190,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -202,7 +202,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -290,7 +290,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)
|
||||
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_HALIDE
|
||||
Halide::Buffer<float> inputBuffer = halideBuffer(inputs[0]);
|
||||
@ -315,7 +315,7 @@ public:
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&)
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
InferenceEngine::LayerParams lp;
|
||||
@ -330,7 +330,7 @@ public:
|
||||
}
|
||||
|
||||
int64 getFLOPS(const std::vector<MatShape> &inputs,
|
||||
const std::vector<MatShape> &outputs) const
|
||||
const std::vector<MatShape> &outputs) const CV_OVERRIDE
|
||||
{
|
||||
(void)outputs; // suppress unused variable warning
|
||||
int64 flops = 0;
|
||||
|
@ -48,7 +48,7 @@ namespace cv
|
||||
namespace dnn
|
||||
{
|
||||
|
||||
class SplitLayerImpl : public SplitLayer
|
||||
class SplitLayerImpl CV_FINAL : public SplitLayer
|
||||
{
|
||||
public:
|
||||
SplitLayerImpl(const LayerParams ¶ms)
|
||||
@ -69,7 +69,7 @@ public:
|
||||
bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE
|
||||
{
|
||||
CV_Assert(inputs.size() == 1);
|
||||
|
||||
@ -78,7 +78,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr)
|
||||
void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
@ -86,7 +86,7 @@ public:
|
||||
Layer::forward_fallback(inputs_arr, outputs_arr, internals_arr);
|
||||
}
|
||||
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals)
|
||||
void forward(std::vector<Mat*> &inputs, std::vector<Mat> &outputs, std::vector<Mat> &internals) CV_OVERRIDE
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
CV_TRACE_ARG_VALUE(name, "name", name.c_str());
|
||||
|
@ -9,7 +9,14 @@
|
||||
#define __OPENCV_DNN_OP_HALIDE_HPP__
|
||||
|
||||
#ifdef HAVE_HALIDE
|
||||
#if defined(__GNUC__) && __GNUC__ >= 5
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-override"
|
||||
#endif
|
||||
#include <Halide.h>
|
||||
#if defined(__GNUC__) && __GNUC__ >= 5
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif // HAVE_HALIDE
|
||||
|
||||
namespace cv
|
||||
@ -55,11 +62,11 @@ namespace dnn
|
||||
|
||||
HalideBackendWrapper(const Ptr<BackendWrapper>& base, const MatShape& shape);
|
||||
|
||||
~HalideBackendWrapper();
|
||||
~HalideBackendWrapper() CV_OVERRIDE;
|
||||
|
||||
virtual void copyToHost();
|
||||
virtual void copyToHost() CV_OVERRIDE;
|
||||
|
||||
virtual void setHostDirty();
|
||||
virtual void setHostDirty() CV_OVERRIDE;
|
||||
|
||||
Halide::Buffer<float> buffer;
|
||||
|
||||
|
@ -131,6 +131,10 @@ void InfEngineBackendNet::getOutputsInfo(InferenceEngine::OutputsDataMap &output
|
||||
{
|
||||
outputs_ = outputs;
|
||||
}
|
||||
void InfEngineBackendNet::getOutputsInfo(InferenceEngine::OutputsDataMap &outputs_) const noexcept
|
||||
{
|
||||
outputs_ = outputs;
|
||||
}
|
||||
|
||||
// Returns input references that aren't connected to internal outputs.
|
||||
void InfEngineBackendNet::getInputsInfo(InferenceEngine::InputsDataMap &inputs_) noexcept
|
||||
|
@ -9,7 +9,14 @@
|
||||
#define __OPENCV_DNN_OP_INF_ENGINE_HPP__
|
||||
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
#if defined(__GNUC__) && __GNUC__ >= 5
|
||||
//#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-override"
|
||||
#endif
|
||||
#include <inference_engine.hpp>
|
||||
#if defined(__GNUC__) && __GNUC__ >= 5
|
||||
//#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif // HAVE_INF_ENGINE
|
||||
|
||||
namespace cv { namespace dnn {
|
||||
@ -23,41 +30,43 @@ public:
|
||||
|
||||
InfEngineBackendNet(InferenceEngine::CNNNetwork& net);
|
||||
|
||||
virtual void Release() noexcept;
|
||||
virtual void Release() noexcept CV_OVERRIDE;
|
||||
|
||||
virtual InferenceEngine::Precision getPrecision() noexcept;
|
||||
virtual InferenceEngine::Precision getPrecision() noexcept CV_OVERRIDE;
|
||||
|
||||
virtual void getOutputsInfo(InferenceEngine::OutputsDataMap &out) noexcept;
|
||||
virtual void getOutputsInfo(InferenceEngine::OutputsDataMap &out) noexcept /*CV_OVERRIDE*/;
|
||||
|
||||
virtual void getInputsInfo(InferenceEngine::InputsDataMap &inputs) noexcept;
|
||||
virtual void getOutputsInfo(InferenceEngine::OutputsDataMap &out) const noexcept /*CV_OVERRIDE*/;
|
||||
|
||||
virtual void getInputsInfo(InferenceEngine::InputsDataMap &inputs) const noexcept;
|
||||
virtual void getInputsInfo(InferenceEngine::InputsDataMap &inputs) noexcept /*CV_OVERRIDE*/;
|
||||
|
||||
virtual InferenceEngine::InputInfo::Ptr getInput(const std::string &inputName) noexcept;
|
||||
virtual void getInputsInfo(InferenceEngine::InputsDataMap &inputs) const noexcept /*CV_OVERRIDE*/;
|
||||
|
||||
virtual void getName(char *pName, size_t len) noexcept;
|
||||
virtual InferenceEngine::InputInfo::Ptr getInput(const std::string &inputName) noexcept CV_OVERRIDE;
|
||||
|
||||
virtual size_t layerCount() noexcept;
|
||||
virtual void getName(char *pName, size_t len) noexcept CV_OVERRIDE;
|
||||
|
||||
virtual InferenceEngine::DataPtr& getData(const char *dname) noexcept;
|
||||
virtual size_t layerCount() noexcept CV_OVERRIDE;
|
||||
|
||||
virtual void addLayer(const InferenceEngine::CNNLayerPtr &layer) noexcept;
|
||||
virtual InferenceEngine::DataPtr& getData(const char *dname) noexcept CV_OVERRIDE;
|
||||
|
||||
virtual void addLayer(const InferenceEngine::CNNLayerPtr &layer) noexcept CV_OVERRIDE;
|
||||
|
||||
virtual InferenceEngine::StatusCode addOutput(const std::string &layerName,
|
||||
size_t outputIndex = 0,
|
||||
InferenceEngine::ResponseDesc *resp = nullptr) noexcept;
|
||||
InferenceEngine::ResponseDesc *resp = nullptr) noexcept CV_OVERRIDE;
|
||||
|
||||
virtual InferenceEngine::StatusCode getLayerByName(const char *layerName,
|
||||
InferenceEngine::CNNLayerPtr &out,
|
||||
InferenceEngine::ResponseDesc *resp) noexcept;
|
||||
InferenceEngine::ResponseDesc *resp) noexcept CV_OVERRIDE;
|
||||
|
||||
virtual void setTargetDevice(InferenceEngine::TargetDevice device) noexcept;
|
||||
virtual void setTargetDevice(InferenceEngine::TargetDevice device) noexcept CV_OVERRIDE;
|
||||
|
||||
virtual InferenceEngine::TargetDevice getTargetDevice() noexcept;
|
||||
virtual InferenceEngine::TargetDevice getTargetDevice() noexcept CV_OVERRIDE;
|
||||
|
||||
virtual InferenceEngine::StatusCode setBatchSize(const size_t size) noexcept;
|
||||
virtual InferenceEngine::StatusCode setBatchSize(const size_t size) noexcept CV_OVERRIDE;
|
||||
|
||||
virtual size_t getBatchSize() const noexcept;
|
||||
virtual size_t getBatchSize() const noexcept CV_OVERRIDE;
|
||||
|
||||
void init();
|
||||
|
||||
@ -99,9 +108,9 @@ public:
|
||||
|
||||
~InfEngineBackendWrapper();
|
||||
|
||||
virtual void copyToHost();
|
||||
virtual void copyToHost() CV_OVERRIDE;
|
||||
|
||||
virtual void setHostDirty();
|
||||
virtual void setHostDirty() CV_OVERRIDE;
|
||||
|
||||
InferenceEngine::DataPtr dataPtr;
|
||||
InferenceEngine::TBlob<float>::Ptr blob;
|
||||
@ -128,15 +137,15 @@ public:
|
||||
virtual bool getMemoryShapes(const std::vector<MatShape> &inputs,
|
||||
const int requiredOutputs,
|
||||
std::vector<MatShape> &outputs,
|
||||
std::vector<MatShape> &internals) const;
|
||||
std::vector<MatShape> &internals) const CV_OVERRIDE;
|
||||
|
||||
virtual void forward(std::vector<Mat*> &input, std::vector<Mat> &output,
|
||||
std::vector<Mat> &internals);
|
||||
std::vector<Mat> &internals) CV_OVERRIDE;
|
||||
|
||||
virtual void forward(InputArrayOfArrays inputs, OutputArrayOfArrays outputs,
|
||||
OutputArrayOfArrays internals);
|
||||
OutputArrayOfArrays internals) CV_OVERRIDE;
|
||||
|
||||
virtual bool supportBackend(int backendId);
|
||||
virtual bool supportBackend(int backendId) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
InferenceEngine::DataPtr output;
|
||||
|
@ -214,7 +214,7 @@ public:
|
||||
}
|
||||
|
||||
virtual void finalize(tensorflow::GraphDef&, tensorflow::NodeDef* fusedNode,
|
||||
std::vector<tensorflow::NodeDef*>& inputNodes)
|
||||
std::vector<tensorflow::NodeDef*>& inputNodes) CV_OVERRIDE
|
||||
{
|
||||
Mat epsMat = getTensorContent(inputNodes.back()->attr().at("value").tensor());
|
||||
CV_Assert(epsMat.total() == 1, epsMat.type() == CV_32FC1);
|
||||
@ -249,7 +249,7 @@ public:
|
||||
}
|
||||
|
||||
virtual void finalize(tensorflow::GraphDef& net, tensorflow::NodeDef* fusedNode,
|
||||
std::vector<tensorflow::NodeDef*>& inputNodes)
|
||||
std::vector<tensorflow::NodeDef*>& inputNodes) CV_OVERRIDE
|
||||
{
|
||||
Mat epsMat = getTensorContent(inputNodes.back()->attr().at("value").tensor());
|
||||
CV_Assert(epsMat.total() == 1, epsMat.type() == CV_32FC1);
|
||||
@ -343,7 +343,7 @@ public:
|
||||
setFusedNode("Relu6", input);
|
||||
}
|
||||
|
||||
virtual bool match(const tensorflow::GraphDef& net, int nodeId, std::vector<int>& matchedNodesIds)
|
||||
virtual bool match(const tensorflow::GraphDef& net, int nodeId, std::vector<int>& matchedNodesIds) CV_OVERRIDE
|
||||
{
|
||||
if (!Subgraph::match(net, nodeId, matchedNodesIds))
|
||||
return false;
|
||||
@ -378,7 +378,7 @@ public:
|
||||
}
|
||||
|
||||
virtual void finalize(tensorflow::GraphDef&, tensorflow::NodeDef* fusedNode,
|
||||
std::vector<tensorflow::NodeDef*>& inputNodes)
|
||||
std::vector<tensorflow::NodeDef*>& inputNodes) CV_OVERRIDE
|
||||
{
|
||||
std::vector<int> shape(numOutDims + 1); // batch size in Keras is implicit.
|
||||
shape[0] = -1;
|
||||
|
@ -12,16 +12,12 @@ Implementation of Tensorflow models parser
|
||||
#include "../precomp.hpp"
|
||||
|
||||
#ifdef HAVE_PROTOBUF
|
||||
#include "graph.pb.h"
|
||||
#include "tf_io.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/text_format.h>
|
||||
#include <google/protobuf/io/zero_copy_stream_impl.h>
|
||||
#include "tf_io.hpp"
|
||||
#include "tf_graph_simplifier.hpp"
|
||||
#endif
|
||||
|
||||
|
@ -23,8 +23,8 @@ Implementation of various functions which are related to Tensorflow models readi
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
|
||||
#include "graph.pb.h"
|
||||
#include "tf_io.hpp"
|
||||
|
||||
#include "../caffe/caffe_io.hpp"
|
||||
#include "../caffe/glog_emulator.hpp"
|
||||
|
||||
|
@ -13,8 +13,20 @@ Declaration of various functions which are related to Tensorflow models reading.
|
||||
#define __OPENCV_DNN_TF_IO_HPP__
|
||||
#ifdef HAVE_PROTOBUF
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 5
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-override"
|
||||
#endif
|
||||
#include "graph.pb.h"
|
||||
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/text_format.h>
|
||||
#include <google/protobuf/io/zero_copy_stream_impl.h>
|
||||
#if defined(__GNUC__) && __GNUC__ >= 5
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
namespace cv {
|
||||
namespace dnn {
|
||||
|
||||
|
@ -208,14 +208,14 @@ public:
|
||||
|
||||
CV_WRAP void read( const String& fileName );
|
||||
|
||||
virtual void write( FileStorage&) const;
|
||||
virtual void write( FileStorage&) const CV_OVERRIDE;
|
||||
|
||||
// see corresponding cv::Algorithm method
|
||||
CV_WRAP virtual void read( const FileNode&);
|
||||
CV_WRAP virtual void read( const FileNode&) CV_OVERRIDE;
|
||||
|
||||
//! Return true if detector object is empty
|
||||
CV_WRAP virtual bool empty() const;
|
||||
CV_WRAP virtual String getDefaultName() const;
|
||||
CV_WRAP virtual bool empty() const CV_OVERRIDE;
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
|
||||
// see corresponding cv::Algorithm method
|
||||
CV_WRAP inline void write(const Ptr<FileStorage>& fs, const String& name = String()) const { Algorithm::write(fs, name); }
|
||||
@ -280,7 +280,7 @@ public:
|
||||
CV_WRAP static Ptr<BRISK> create(int thresh, int octaves, const std::vector<float> &radiusList,
|
||||
const std::vector<int> &numberList, float dMax=5.85f, float dMin=8.2f,
|
||||
const std::vector<int>& indexChange=std::vector<int>());
|
||||
CV_WRAP virtual String getDefaultName() const;
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
/** @brief Class implementing the ORB (*oriented BRIEF*) keypoint detector and descriptor extractor
|
||||
@ -355,7 +355,7 @@ public:
|
||||
|
||||
CV_WRAP virtual void setFastThreshold(int fastThreshold) = 0;
|
||||
CV_WRAP virtual int getFastThreshold() const = 0;
|
||||
CV_WRAP virtual String getDefaultName() const;
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
/** @brief Maximally stable extremal region extractor
|
||||
@ -415,7 +415,7 @@ public:
|
||||
|
||||
CV_WRAP virtual void setPass2Only(bool f) = 0;
|
||||
CV_WRAP virtual bool getPass2Only() const = 0;
|
||||
CV_WRAP virtual String getDefaultName() const;
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
/** @overload */
|
||||
@ -471,7 +471,7 @@ public:
|
||||
|
||||
CV_WRAP virtual void setType(int type) = 0;
|
||||
CV_WRAP virtual int getType() const = 0;
|
||||
CV_WRAP virtual String getDefaultName() const;
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
/** @overload */
|
||||
@ -526,7 +526,7 @@ public:
|
||||
|
||||
CV_WRAP virtual void setType(int type) = 0;
|
||||
CV_WRAP virtual int getType() const = 0;
|
||||
CV_WRAP virtual String getDefaultName() const;
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
/** @brief Wrapping class for feature detection using the goodFeaturesToTrack function. :
|
||||
@ -555,7 +555,7 @@ public:
|
||||
|
||||
CV_WRAP virtual void setK(double k) = 0;
|
||||
CV_WRAP virtual double getK() const = 0;
|
||||
CV_WRAP virtual String getDefaultName() const;
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
/** @brief Class for extracting blobs from an image. :
|
||||
@ -622,7 +622,7 @@ public:
|
||||
|
||||
CV_WRAP static Ptr<SimpleBlobDetector>
|
||||
create(const SimpleBlobDetector::Params ¶meters = SimpleBlobDetector::Params());
|
||||
CV_WRAP virtual String getDefaultName() const;
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
//! @} features2d_main
|
||||
@ -679,7 +679,7 @@ public:
|
||||
|
||||
CV_WRAP virtual void setDiffusivity(int diff) = 0;
|
||||
CV_WRAP virtual int getDiffusivity() const = 0;
|
||||
CV_WRAP virtual String getDefaultName() const;
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
/** @brief Class implementing the AKAZE keypoint detector and descriptor extractor, described in @cite ANB13.
|
||||
@ -747,7 +747,7 @@ public:
|
||||
|
||||
CV_WRAP virtual void setDiffusivity(int diff) = 0;
|
||||
CV_WRAP virtual int getDiffusivity() const = 0;
|
||||
CV_WRAP virtual String getDefaultName() const;
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
//! @} features2d_main
|
||||
@ -857,11 +857,11 @@ public:
|
||||
|
||||
/** @brief Clears the train descriptor collections.
|
||||
*/
|
||||
CV_WRAP virtual void clear();
|
||||
CV_WRAP virtual void clear() CV_OVERRIDE;
|
||||
|
||||
/** @brief Returns true if there are no train descriptors in the both collections.
|
||||
*/
|
||||
CV_WRAP virtual bool empty() const;
|
||||
CV_WRAP virtual bool empty() const CV_OVERRIDE;
|
||||
|
||||
/** @brief Returns true if the descriptor matcher supports masking permissible matches.
|
||||
*/
|
||||
@ -991,9 +991,9 @@ public:
|
||||
}
|
||||
// Reads matcher object from a file node
|
||||
// see corresponding cv::Algorithm method
|
||||
CV_WRAP virtual void read( const FileNode& );
|
||||
CV_WRAP virtual void read( const FileNode& ) CV_OVERRIDE;
|
||||
// Writes matcher object to a file storage
|
||||
virtual void write( FileStorage& ) const;
|
||||
virtual void write( FileStorage& ) const CV_OVERRIDE;
|
||||
|
||||
/** @brief Clones the matcher.
|
||||
|
||||
@ -1086,7 +1086,7 @@ public:
|
||||
|
||||
virtual ~BFMatcher() {}
|
||||
|
||||
virtual bool isMaskSupported() const { return true; }
|
||||
virtual bool isMaskSupported() const CV_OVERRIDE { return true; }
|
||||
|
||||
/** @brief Brute-force matcher create method.
|
||||
@param normType One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are
|
||||
@ -1102,12 +1102,12 @@ public:
|
||||
*/
|
||||
CV_WRAP static Ptr<BFMatcher> create( int normType=NORM_L2, bool crossCheck=false ) ;
|
||||
|
||||
virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const;
|
||||
virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const CV_OVERRIDE;
|
||||
protected:
|
||||
virtual void knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k,
|
||||
InputArrayOfArrays masks=noArray(), bool compactResult=false );
|
||||
InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE;
|
||||
virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
InputArrayOfArrays masks=noArray(), bool compactResult=false );
|
||||
InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE;
|
||||
|
||||
int normType;
|
||||
bool crossCheck;
|
||||
@ -1128,29 +1128,29 @@ public:
|
||||
CV_WRAP FlannBasedMatcher( const Ptr<flann::IndexParams>& indexParams=makePtr<flann::KDTreeIndexParams>(),
|
||||
const Ptr<flann::SearchParams>& searchParams=makePtr<flann::SearchParams>() );
|
||||
|
||||
virtual void add( InputArrayOfArrays descriptors );
|
||||
virtual void clear();
|
||||
virtual void add( InputArrayOfArrays descriptors ) CV_OVERRIDE;
|
||||
virtual void clear() CV_OVERRIDE;
|
||||
|
||||
// Reads matcher object from a file node
|
||||
virtual void read( const FileNode& );
|
||||
virtual void read( const FileNode& ) CV_OVERRIDE;
|
||||
// Writes matcher object to a file storage
|
||||
virtual void write( FileStorage& ) const;
|
||||
virtual void write( FileStorage& ) const CV_OVERRIDE;
|
||||
|
||||
virtual void train();
|
||||
virtual bool isMaskSupported() const;
|
||||
virtual void train() CV_OVERRIDE;
|
||||
virtual bool isMaskSupported() const CV_OVERRIDE;
|
||||
|
||||
CV_WRAP static Ptr<FlannBasedMatcher> create();
|
||||
|
||||
virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const;
|
||||
virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const CV_OVERRIDE;
|
||||
protected:
|
||||
static void convertToDMatches( const DescriptorCollection& descriptors,
|
||||
const Mat& indices, const Mat& distances,
|
||||
std::vector<std::vector<DMatch> >& matches );
|
||||
|
||||
virtual void knnMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k,
|
||||
InputArrayOfArrays masks=noArray(), bool compactResult=false );
|
||||
InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE;
|
||||
virtual void radiusMatchImpl( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
InputArrayOfArrays masks=noArray(), bool compactResult=false );
|
||||
InputArrayOfArrays masks=noArray(), bool compactResult=false ) CV_OVERRIDE;
|
||||
|
||||
Ptr<flann::IndexParams> indexParams;
|
||||
Ptr<flann::SearchParams> searchParams;
|
||||
@ -1327,8 +1327,8 @@ public:
|
||||
virtual ~BOWKMeansTrainer();
|
||||
|
||||
// Returns trained vocabulary (i.e. cluster centers).
|
||||
CV_WRAP virtual Mat cluster() const;
|
||||
CV_WRAP virtual Mat cluster( const Mat& descriptors ) const;
|
||||
CV_WRAP virtual Mat cluster() const CV_OVERRIDE;
|
||||
CV_WRAP virtual Mat cluster( const Mat& descriptors ) const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -7941,14 +7941,14 @@ void AGAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, boo
|
||||
AGAST(_img, keypoints, threshold, nonmax_suppression, AgastFeatureDetector::OAST_9_16);
|
||||
}
|
||||
|
||||
class AgastFeatureDetector_Impl : public AgastFeatureDetector
|
||||
class AgastFeatureDetector_Impl CV_FINAL : public AgastFeatureDetector
|
||||
{
|
||||
public:
|
||||
AgastFeatureDetector_Impl( int _threshold, bool _nonmaxSuppression, int _type )
|
||||
: threshold(_threshold), nonmaxSuppression(_nonmaxSuppression), type((short)_type)
|
||||
{}
|
||||
|
||||
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask )
|
||||
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
@ -7986,14 +7986,14 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
void setThreshold(int threshold_) { threshold = threshold_; }
|
||||
int getThreshold() const { return threshold; }
|
||||
void setThreshold(int threshold_) CV_OVERRIDE { threshold = threshold_; }
|
||||
int getThreshold() const CV_OVERRIDE { return threshold; }
|
||||
|
||||
void setNonmaxSuppression(bool f) { nonmaxSuppression = f; }
|
||||
bool getNonmaxSuppression() const { return nonmaxSuppression; }
|
||||
void setNonmaxSuppression(bool f) CV_OVERRIDE { nonmaxSuppression = f; }
|
||||
bool getNonmaxSuppression() const CV_OVERRIDE { return nonmaxSuppression; }
|
||||
|
||||
void setType(int type_) { type = type_; }
|
||||
int getType() const { return type; }
|
||||
void setType(int type_) CV_OVERRIDE { type = type_; }
|
||||
int getType() const CV_OVERRIDE { return type; }
|
||||
|
||||
int threshold;
|
||||
bool nonmaxSuppression;
|
||||
|
@ -72,34 +72,34 @@ namespace cv
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~AKAZE_Impl()
|
||||
virtual ~AKAZE_Impl() CV_OVERRIDE
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void setDescriptorType(int dtype) { descriptor = dtype; }
|
||||
int getDescriptorType() const { return descriptor; }
|
||||
void setDescriptorType(int dtype) CV_OVERRIDE { descriptor = dtype; }
|
||||
int getDescriptorType() const CV_OVERRIDE { return descriptor; }
|
||||
|
||||
void setDescriptorSize(int dsize) { descriptor_size = dsize; }
|
||||
int getDescriptorSize() const { return descriptor_size; }
|
||||
void setDescriptorSize(int dsize) CV_OVERRIDE { descriptor_size = dsize; }
|
||||
int getDescriptorSize() const CV_OVERRIDE { return descriptor_size; }
|
||||
|
||||
void setDescriptorChannels(int dch) { descriptor_channels = dch; }
|
||||
int getDescriptorChannels() const { return descriptor_channels; }
|
||||
void setDescriptorChannels(int dch) CV_OVERRIDE { descriptor_channels = dch; }
|
||||
int getDescriptorChannels() const CV_OVERRIDE { return descriptor_channels; }
|
||||
|
||||
void setThreshold(double threshold_) { threshold = (float)threshold_; }
|
||||
double getThreshold() const { return threshold; }
|
||||
void setThreshold(double threshold_) CV_OVERRIDE { threshold = (float)threshold_; }
|
||||
double getThreshold() const CV_OVERRIDE { return threshold; }
|
||||
|
||||
void setNOctaves(int octaves_) { octaves = octaves_; }
|
||||
int getNOctaves() const { return octaves; }
|
||||
void setNOctaves(int octaves_) CV_OVERRIDE { octaves = octaves_; }
|
||||
int getNOctaves() const CV_OVERRIDE { return octaves; }
|
||||
|
||||
void setNOctaveLayers(int octaveLayers_) { sublevels = octaveLayers_; }
|
||||
int getNOctaveLayers() const { return sublevels; }
|
||||
void setNOctaveLayers(int octaveLayers_) CV_OVERRIDE { sublevels = octaveLayers_; }
|
||||
int getNOctaveLayers() const CV_OVERRIDE { return sublevels; }
|
||||
|
||||
void setDiffusivity(int diff_) { diffusivity = diff_; }
|
||||
int getDiffusivity() const { return diffusivity; }
|
||||
void setDiffusivity(int diff_) CV_OVERRIDE { diffusivity = diff_; }
|
||||
int getDiffusivity() const CV_OVERRIDE { return diffusivity; }
|
||||
|
||||
// returns the descriptor size in bytes
|
||||
int descriptorSize() const
|
||||
int descriptorSize() const CV_OVERRIDE
|
||||
{
|
||||
switch (descriptor)
|
||||
{
|
||||
@ -127,7 +127,7 @@ namespace cv
|
||||
}
|
||||
|
||||
// returns the descriptor type
|
||||
int descriptorType() const
|
||||
int descriptorType() const CV_OVERRIDE
|
||||
{
|
||||
switch (descriptor)
|
||||
{
|
||||
@ -145,7 +145,7 @@ namespace cv
|
||||
}
|
||||
|
||||
// returns the default norm type
|
||||
int defaultNorm() const
|
||||
int defaultNorm() const CV_OVERRIDE
|
||||
{
|
||||
switch (descriptor)
|
||||
{
|
||||
@ -165,7 +165,7 @@ namespace cv
|
||||
void detectAndCompute(InputArray image, InputArray mask,
|
||||
std::vector<KeyPoint>& keypoints,
|
||||
OutputArray descriptors,
|
||||
bool useProvidedKeypoints)
|
||||
bool useProvidedKeypoints) CV_OVERRIDE
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
@ -204,7 +204,7 @@ namespace cv
|
||||
}
|
||||
}
|
||||
|
||||
void write(FileStorage& fs) const
|
||||
void write(FileStorage& fs) const CV_OVERRIDE
|
||||
{
|
||||
writeFormat(fs);
|
||||
fs << "descriptor" << descriptor;
|
||||
@ -216,7 +216,7 @@ namespace cv
|
||||
fs << "diffusivity" << diffusivity;
|
||||
}
|
||||
|
||||
void read(const FileNode& fn)
|
||||
void read(const FileNode& fn) CV_OVERRIDE
|
||||
{
|
||||
descriptor = (int)fn["descriptor"];
|
||||
descriptor_channels = (int)fn["descriptor_channels"];
|
||||
|
@ -64,8 +64,8 @@ public:
|
||||
|
||||
explicit SimpleBlobDetectorImpl(const SimpleBlobDetector::Params ¶meters = SimpleBlobDetector::Params());
|
||||
|
||||
virtual void read( const FileNode& fn );
|
||||
virtual void write( FileStorage& fs ) const;
|
||||
virtual void read( const FileNode& fn ) CV_OVERRIDE;
|
||||
virtual void write( FileStorage& fs ) const CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
struct CV_EXPORTS Center
|
||||
@ -75,7 +75,7 @@ protected:
|
||||
double confidence;
|
||||
};
|
||||
|
||||
virtual void detect( InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask=noArray() );
|
||||
virtual void detect( InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask=noArray() ) CV_OVERRIDE;
|
||||
virtual void findBlobs(InputArray image, InputArray binaryImage, std::vector<Center> ¢ers) const;
|
||||
|
||||
Params params;
|
||||
|
@ -51,7 +51,7 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class BRISK_Impl : public BRISK
|
||||
class BRISK_Impl CV_FINAL : public BRISK
|
||||
{
|
||||
public:
|
||||
explicit BRISK_Impl(int thresh=30, int octaves=3, float patternScale=1.0f);
|
||||
@ -65,17 +65,17 @@ public:
|
||||
|
||||
virtual ~BRISK_Impl();
|
||||
|
||||
int descriptorSize() const
|
||||
int descriptorSize() const CV_OVERRIDE
|
||||
{
|
||||
return strings_;
|
||||
}
|
||||
|
||||
int descriptorType() const
|
||||
int descriptorType() const CV_OVERRIDE
|
||||
{
|
||||
return CV_8U;
|
||||
}
|
||||
|
||||
int defaultNorm() const
|
||||
int defaultNorm() const CV_OVERRIDE
|
||||
{
|
||||
return NORM_HAMMING;
|
||||
}
|
||||
@ -90,7 +90,7 @@ public:
|
||||
void detectAndCompute( InputArray image, InputArray mask,
|
||||
CV_OUT std::vector<KeyPoint>& keypoints,
|
||||
OutputArray descriptors,
|
||||
bool useProvidedKeypoints );
|
||||
bool useProvidedKeypoints ) CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
@ -151,11 +151,11 @@ private:
|
||||
|
||||
|
||||
// a layer in the Brisk detector pyramid
|
||||
class CV_EXPORTS BriskLayer
|
||||
class BriskLayer
|
||||
{
|
||||
public:
|
||||
// constructor arguments
|
||||
struct CV_EXPORTS CommonParams
|
||||
struct CommonParams
|
||||
{
|
||||
static const int HALFSAMPLE = 0;
|
||||
static const int TWOTHIRDSAMPLE = 1;
|
||||
@ -223,7 +223,7 @@ private:
|
||||
int pixel_9_16_[25];
|
||||
};
|
||||
|
||||
class CV_EXPORTS BriskScaleSpace
|
||||
class BriskScaleSpace
|
||||
{
|
||||
public:
|
||||
// construct telling the octaves number:
|
||||
|
@ -50,7 +50,7 @@ namespace cv
|
||||
namespace opt_AVX2
|
||||
{
|
||||
|
||||
class FAST_t_patternSize16_AVX2_Impl: public FAST_t_patternSize16_AVX2
|
||||
class FAST_t_patternSize16_AVX2_Impl CV_FINAL: public FAST_t_patternSize16_AVX2
|
||||
{
|
||||
public:
|
||||
FAST_t_patternSize16_AVX2_Impl(int _cols, int _threshold, bool _nonmax_suppression, const int* _pixel):
|
||||
@ -61,7 +61,7 @@ public:
|
||||
threshold = std::min(std::max(_threshold, 0), 255);
|
||||
}
|
||||
|
||||
virtual void process(int &j, const uchar* &ptr, uchar* curr, int* cornerpos, int &ncorners)
|
||||
virtual void process(int &j, const uchar* &ptr, uchar* curr, int* cornerpos, int &ncorners) CV_OVERRIDE
|
||||
{
|
||||
static const __m256i delta256 = _mm256_broadcastsi128_si256(_mm_set1_epi8((char)(-128))), K16_256 = _mm256_broadcastsi128_si256(_mm_set1_epi8((char)8));
|
||||
const __m256i t256 = _mm256_broadcastsi128_si256(_mm_set1_epi8(t256c));
|
||||
@ -165,7 +165,7 @@ public:
|
||||
_mm256_zeroupper();
|
||||
}
|
||||
|
||||
virtual ~FAST_t_patternSize16_AVX2_Impl() {};
|
||||
virtual ~FAST_t_patternSize16_AVX2_Impl() CV_OVERRIDE {};
|
||||
|
||||
private:
|
||||
int cols;
|
||||
|
@ -515,14 +515,14 @@ void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool
|
||||
}
|
||||
|
||||
|
||||
class FastFeatureDetector_Impl : public FastFeatureDetector
|
||||
class FastFeatureDetector_Impl CV_FINAL : public FastFeatureDetector
|
||||
{
|
||||
public:
|
||||
FastFeatureDetector_Impl( int _threshold, bool _nonmaxSuppression, int _type )
|
||||
: threshold(_threshold), nonmaxSuppression(_nonmaxSuppression), type((short)_type)
|
||||
{}
|
||||
|
||||
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask )
|
||||
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
@ -563,14 +563,14 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
void setThreshold(int threshold_) { threshold = threshold_; }
|
||||
int getThreshold() const { return threshold; }
|
||||
void setThreshold(int threshold_) CV_OVERRIDE { threshold = threshold_; }
|
||||
int getThreshold() const CV_OVERRIDE { return threshold; }
|
||||
|
||||
void setNonmaxSuppression(bool f) { nonmaxSuppression = f; }
|
||||
bool getNonmaxSuppression() const { return nonmaxSuppression; }
|
||||
void setNonmaxSuppression(bool f) CV_OVERRIDE { nonmaxSuppression = f; }
|
||||
bool getNonmaxSuppression() const CV_OVERRIDE { return nonmaxSuppression; }
|
||||
|
||||
void setType(int type_) { type = type_; }
|
||||
int getType() const { return type; }
|
||||
void setType(int type_) CV_OVERRIDE { type = type_; }
|
||||
int getType() const CV_OVERRIDE { return type; }
|
||||
|
||||
int threshold;
|
||||
bool nonmaxSuppression;
|
||||
|
@ -44,7 +44,7 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class GFTTDetector_Impl : public GFTTDetector
|
||||
class GFTTDetector_Impl CV_FINAL : public GFTTDetector
|
||||
{
|
||||
public:
|
||||
GFTTDetector_Impl( int _nfeatures, double _qualityLevel,
|
||||
@ -55,28 +55,28 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void setMaxFeatures(int maxFeatures) { nfeatures = maxFeatures; }
|
||||
int getMaxFeatures() const { return nfeatures; }
|
||||
void setMaxFeatures(int maxFeatures) CV_OVERRIDE { nfeatures = maxFeatures; }
|
||||
int getMaxFeatures() const CV_OVERRIDE { return nfeatures; }
|
||||
|
||||
void setQualityLevel(double qlevel) { qualityLevel = qlevel; }
|
||||
double getQualityLevel() const { return qualityLevel; }
|
||||
void setQualityLevel(double qlevel) CV_OVERRIDE { qualityLevel = qlevel; }
|
||||
double getQualityLevel() const CV_OVERRIDE { return qualityLevel; }
|
||||
|
||||
void setMinDistance(double minDistance_) { minDistance = minDistance_; }
|
||||
double getMinDistance() const { return minDistance; }
|
||||
void setMinDistance(double minDistance_) CV_OVERRIDE { minDistance = minDistance_; }
|
||||
double getMinDistance() const CV_OVERRIDE { return minDistance; }
|
||||
|
||||
void setBlockSize(int blockSize_) { blockSize = blockSize_; }
|
||||
int getBlockSize() const { return blockSize; }
|
||||
void setBlockSize(int blockSize_) CV_OVERRIDE { blockSize = blockSize_; }
|
||||
int getBlockSize() const CV_OVERRIDE { return blockSize; }
|
||||
|
||||
void setGradientSize(int gradientSize_) { gradSize = gradientSize_; }
|
||||
int getGradientSize() { return gradSize; }
|
||||
//void setGradientSize(int gradientSize_) { gradSize = gradientSize_; }
|
||||
//int getGradientSize() { return gradSize; }
|
||||
|
||||
void setHarrisDetector(bool val) { useHarrisDetector = val; }
|
||||
bool getHarrisDetector() const { return useHarrisDetector; }
|
||||
void setHarrisDetector(bool val) CV_OVERRIDE { useHarrisDetector = val; }
|
||||
bool getHarrisDetector() const CV_OVERRIDE { return useHarrisDetector; }
|
||||
|
||||
void setK(double k_) { k = k_; }
|
||||
double getK() const { return k; }
|
||||
void setK(double k_) CV_OVERRIDE { k = k_; }
|
||||
double getK() const CV_OVERRIDE { return k; }
|
||||
|
||||
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask )
|
||||
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
|
@ -53,7 +53,7 @@ http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12eccv.pd
|
||||
namespace cv
|
||||
{
|
||||
|
||||
class KAZE_Impl : public KAZE
|
||||
class KAZE_Impl CV_FINAL : public KAZE
|
||||
{
|
||||
public:
|
||||
KAZE_Impl(bool _extended, bool _upright, float _threshold, int _octaves,
|
||||
@ -67,40 +67,40 @@ namespace cv
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~KAZE_Impl() {}
|
||||
virtual ~KAZE_Impl() CV_OVERRIDE {}
|
||||
|
||||
void setExtended(bool extended_) { extended = extended_; }
|
||||
bool getExtended() const { return extended; }
|
||||
void setExtended(bool extended_) CV_OVERRIDE { extended = extended_; }
|
||||
bool getExtended() const CV_OVERRIDE { return extended; }
|
||||
|
||||
void setUpright(bool upright_) { upright = upright_; }
|
||||
bool getUpright() const { return upright; }
|
||||
void setUpright(bool upright_) CV_OVERRIDE { upright = upright_; }
|
||||
bool getUpright() const CV_OVERRIDE { return upright; }
|
||||
|
||||
void setThreshold(double threshold_) { threshold = (float)threshold_; }
|
||||
double getThreshold() const { return threshold; }
|
||||
void setThreshold(double threshold_) CV_OVERRIDE { threshold = (float)threshold_; }
|
||||
double getThreshold() const CV_OVERRIDE { return threshold; }
|
||||
|
||||
void setNOctaves(int octaves_) { octaves = octaves_; }
|
||||
int getNOctaves() const { return octaves; }
|
||||
void setNOctaves(int octaves_) CV_OVERRIDE { octaves = octaves_; }
|
||||
int getNOctaves() const CV_OVERRIDE { return octaves; }
|
||||
|
||||
void setNOctaveLayers(int octaveLayers_) { sublevels = octaveLayers_; }
|
||||
int getNOctaveLayers() const { return sublevels; }
|
||||
void setNOctaveLayers(int octaveLayers_) CV_OVERRIDE { sublevels = octaveLayers_; }
|
||||
int getNOctaveLayers() const CV_OVERRIDE { return sublevels; }
|
||||
|
||||
void setDiffusivity(int diff_) { diffusivity = diff_; }
|
||||
int getDiffusivity() const { return diffusivity; }
|
||||
void setDiffusivity(int diff_) CV_OVERRIDE { diffusivity = diff_; }
|
||||
int getDiffusivity() const CV_OVERRIDE { return diffusivity; }
|
||||
|
||||
// returns the descriptor size in bytes
|
||||
int descriptorSize() const
|
||||
int descriptorSize() const CV_OVERRIDE
|
||||
{
|
||||
return extended ? 128 : 64;
|
||||
}
|
||||
|
||||
// returns the descriptor type
|
||||
int descriptorType() const
|
||||
int descriptorType() const CV_OVERRIDE
|
||||
{
|
||||
return CV_32F;
|
||||
}
|
||||
|
||||
// returns the default norm type
|
||||
int defaultNorm() const
|
||||
int defaultNorm() const CV_OVERRIDE
|
||||
{
|
||||
return NORM_L2;
|
||||
}
|
||||
@ -108,7 +108,7 @@ namespace cv
|
||||
void detectAndCompute(InputArray image, InputArray mask,
|
||||
std::vector<KeyPoint>& keypoints,
|
||||
OutputArray descriptors,
|
||||
bool useProvidedKeypoints)
|
||||
bool useProvidedKeypoints) CV_OVERRIDE
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
@ -160,7 +160,7 @@ namespace cv
|
||||
}
|
||||
}
|
||||
|
||||
void write(FileStorage& fs) const
|
||||
void write(FileStorage& fs) const CV_OVERRIDE
|
||||
{
|
||||
writeFormat(fs);
|
||||
fs << "extended" << (int)extended;
|
||||
@ -171,7 +171,7 @@ namespace cv
|
||||
fs << "diffusivity" << diffusivity;
|
||||
}
|
||||
|
||||
void read(const FileNode& fn)
|
||||
void read(const FileNode& fn) CV_OVERRIDE
|
||||
{
|
||||
extended = (int)fn["extended"] != 0;
|
||||
upright = (int)fn["upright"] != 0;
|
||||
|
@ -237,7 +237,7 @@ public:
|
||||
: Lt_(&Lt), Lf_(&Lf), Lstep_(&Lstep), step_size_(step_size)
|
||||
{}
|
||||
|
||||
void operator()(const Range& range) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
nld_step_scalar_one_lane(*Lt_, *Lf_, *Lstep_, step_size_, range.start, range.end);
|
||||
}
|
||||
@ -603,7 +603,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator()(const Range& range) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
MatType Lxx, Lxy, Lyy;
|
||||
|
||||
@ -725,7 +725,7 @@ public:
|
||||
: evolution_(&ev), keypoints_by_layers_(&kpts), dthreshold_(dthreshold)
|
||||
{}
|
||||
|
||||
void operator()(const Range& range) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
{
|
||||
@ -948,7 +948,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator() (const Range& range) const
|
||||
void operator() (const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
{
|
||||
@ -974,7 +974,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator()(const Range& range) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
{
|
||||
@ -1000,7 +1000,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator()(const Range& range) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
{
|
||||
@ -1026,7 +1026,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator() (const Range& range) const
|
||||
void operator() (const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
{
|
||||
@ -1053,7 +1053,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator() (const Range& range) const
|
||||
void operator() (const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
{
|
||||
@ -1088,7 +1088,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator() (const Range& range) const
|
||||
void operator() (const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
{
|
||||
@ -1119,7 +1119,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator() (const Range& range) const
|
||||
void operator() (const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
{
|
||||
@ -1158,7 +1158,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator() (const Range& range) const
|
||||
void operator() (const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
{
|
||||
@ -1448,7 +1448,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator() (const Range& range) const
|
||||
void operator() (const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
{
|
||||
|
@ -196,7 +196,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator()(const Range& range) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
std::vector<TEvolution>& evolution = *evolution_;
|
||||
for (int i = range.start; i < range.end; i++)
|
||||
@ -239,7 +239,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator()(const Range& range) const
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
std::vector<TEvolution>& evolution = *evolution_;
|
||||
std::vector<std::vector<KeyPoint> >& kpts_par = *kpts_par_;
|
||||
@ -503,7 +503,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void operator() (const Range& range) const
|
||||
void operator() (const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
std::vector<KeyPoint> &kpts = *kpts_;
|
||||
Mat &desc = *desc_;
|
||||
|
@ -378,7 +378,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void operator()(const cv::Range& range) const
|
||||
void operator()(const cv::Range& range) const CV_OVERRIDE
|
||||
{
|
||||
cv::Mat& Ld = *_Ld;
|
||||
const cv::Mat& c = *_c;
|
||||
|
@ -48,7 +48,7 @@ namespace cv
|
||||
|
||||
using std::vector;
|
||||
|
||||
class MSER_Impl : public MSER
|
||||
class MSER_Impl CV_FINAL : public MSER
|
||||
{
|
||||
public:
|
||||
struct Params
|
||||
@ -85,19 +85,19 @@ public:
|
||||
|
||||
explicit MSER_Impl(const Params& _params) : params(_params) {}
|
||||
|
||||
virtual ~MSER_Impl() {}
|
||||
virtual ~MSER_Impl() CV_OVERRIDE {}
|
||||
|
||||
void setDelta(int delta) { params.delta = delta; }
|
||||
int getDelta() const { return params.delta; }
|
||||
void setDelta(int delta) CV_OVERRIDE { params.delta = delta; }
|
||||
int getDelta() const CV_OVERRIDE { return params.delta; }
|
||||
|
||||
void setMinArea(int minArea) { params.minArea = minArea; }
|
||||
int getMinArea() const { return params.minArea; }
|
||||
void setMinArea(int minArea) CV_OVERRIDE { params.minArea = minArea; }
|
||||
int getMinArea() const CV_OVERRIDE { return params.minArea; }
|
||||
|
||||
void setMaxArea(int maxArea) { params.maxArea = maxArea; }
|
||||
int getMaxArea() const { return params.maxArea; }
|
||||
void setMaxArea(int maxArea) CV_OVERRIDE { params.maxArea = maxArea; }
|
||||
int getMaxArea() const CV_OVERRIDE { return params.maxArea; }
|
||||
|
||||
void setPass2Only(bool f) { params.pass2Only = f; }
|
||||
bool getPass2Only() const { return params.pass2Only; }
|
||||
void setPass2Only(bool f) CV_OVERRIDE { params.pass2Only = f; }
|
||||
bool getPass2Only() const CV_OVERRIDE { return params.pass2Only; }
|
||||
|
||||
enum { DIR_SHIFT = 29, NEXT_MASK = ((1<<DIR_SHIFT)-1) };
|
||||
|
||||
@ -364,8 +364,8 @@ public:
|
||||
|
||||
void detectRegions( InputArray image,
|
||||
std::vector<std::vector<Point> >& msers,
|
||||
std::vector<Rect>& bboxes );
|
||||
void detect( InputArray _src, vector<KeyPoint>& keypoints, InputArray _mask );
|
||||
std::vector<Rect>& bboxes ) CV_OVERRIDE;
|
||||
void detect( InputArray _src, vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE;
|
||||
|
||||
void preprocess1( const Mat& img, int* level_size )
|
||||
{
|
||||
|
@ -651,7 +651,7 @@ static inline float getScale(int level, int firstLevel, double scaleFactor)
|
||||
}
|
||||
|
||||
|
||||
class ORB_Impl : public ORB
|
||||
class ORB_Impl CV_FINAL : public ORB
|
||||
{
|
||||
public:
|
||||
explicit ORB_Impl(int _nfeatures, float _scaleFactor, int _nlevels, int _edgeThreshold,
|
||||
@ -661,43 +661,43 @@ public:
|
||||
scoreType(_scoreType), patchSize(_patchSize), fastThreshold(_fastThreshold)
|
||||
{}
|
||||
|
||||
void setMaxFeatures(int maxFeatures) { nfeatures = maxFeatures; }
|
||||
int getMaxFeatures() const { return nfeatures; }
|
||||
void setMaxFeatures(int maxFeatures) CV_OVERRIDE { nfeatures = maxFeatures; }
|
||||
int getMaxFeatures() const CV_OVERRIDE { return nfeatures; }
|
||||
|
||||
void setScaleFactor(double scaleFactor_) { scaleFactor = scaleFactor_; }
|
||||
double getScaleFactor() const { return scaleFactor; }
|
||||
void setScaleFactor(double scaleFactor_) CV_OVERRIDE { scaleFactor = scaleFactor_; }
|
||||
double getScaleFactor() const CV_OVERRIDE { return scaleFactor; }
|
||||
|
||||
void setNLevels(int nlevels_) { nlevels = nlevels_; }
|
||||
int getNLevels() const { return nlevels; }
|
||||
void setNLevels(int nlevels_) CV_OVERRIDE { nlevels = nlevels_; }
|
||||
int getNLevels() const CV_OVERRIDE { return nlevels; }
|
||||
|
||||
void setEdgeThreshold(int edgeThreshold_) { edgeThreshold = edgeThreshold_; }
|
||||
int getEdgeThreshold() const { return edgeThreshold; }
|
||||
void setEdgeThreshold(int edgeThreshold_) CV_OVERRIDE { edgeThreshold = edgeThreshold_; }
|
||||
int getEdgeThreshold() const CV_OVERRIDE { return edgeThreshold; }
|
||||
|
||||
void setFirstLevel(int firstLevel_) { CV_Assert(firstLevel_ >= 0); firstLevel = firstLevel_; }
|
||||
int getFirstLevel() const { return firstLevel; }
|
||||
void setFirstLevel(int firstLevel_) CV_OVERRIDE { CV_Assert(firstLevel_ >= 0); firstLevel = firstLevel_; }
|
||||
int getFirstLevel() const CV_OVERRIDE { return firstLevel; }
|
||||
|
||||
void setWTA_K(int wta_k_) { wta_k = wta_k_; }
|
||||
int getWTA_K() const { return wta_k; }
|
||||
void setWTA_K(int wta_k_) CV_OVERRIDE { wta_k = wta_k_; }
|
||||
int getWTA_K() const CV_OVERRIDE { return wta_k; }
|
||||
|
||||
void setScoreType(int scoreType_) { scoreType = scoreType_; }
|
||||
int getScoreType() const { return scoreType; }
|
||||
void setScoreType(int scoreType_) CV_OVERRIDE { scoreType = scoreType_; }
|
||||
int getScoreType() const CV_OVERRIDE { return scoreType; }
|
||||
|
||||
void setPatchSize(int patchSize_) { patchSize = patchSize_; }
|
||||
int getPatchSize() const { return patchSize; }
|
||||
void setPatchSize(int patchSize_) CV_OVERRIDE { patchSize = patchSize_; }
|
||||
int getPatchSize() const CV_OVERRIDE { return patchSize; }
|
||||
|
||||
void setFastThreshold(int fastThreshold_) { fastThreshold = fastThreshold_; }
|
||||
int getFastThreshold() const { return fastThreshold; }
|
||||
void setFastThreshold(int fastThreshold_) CV_OVERRIDE { fastThreshold = fastThreshold_; }
|
||||
int getFastThreshold() const CV_OVERRIDE { return fastThreshold; }
|
||||
|
||||
// returns the descriptor size in bytes
|
||||
int descriptorSize() const;
|
||||
int descriptorSize() const CV_OVERRIDE;
|
||||
// returns the descriptor type
|
||||
int descriptorType() const;
|
||||
int descriptorType() const CV_OVERRIDE;
|
||||
// returns the default norm type
|
||||
int defaultNorm() const;
|
||||
int defaultNorm() const CV_OVERRIDE;
|
||||
|
||||
// Compute the ORB_Impl features and descriptors on an image
|
||||
void detectAndCompute( InputArray image, InputArray mask, std::vector<KeyPoint>& keypoints,
|
||||
OutputArray descriptors, bool useProvidedKeypoints=false );
|
||||
OutputArray descriptors, bool useProvidedKeypoints=false ) CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -54,50 +54,50 @@ struct base_any_policy
|
||||
template<typename T>
|
||||
struct typed_base_any_policy : base_any_policy
|
||||
{
|
||||
virtual ::size_t get_size() { return sizeof(T); }
|
||||
virtual const std::type_info& type() { return typeid(T); }
|
||||
virtual ::size_t get_size() CV_OVERRIDE { return sizeof(T); }
|
||||
virtual const std::type_info& type() CV_OVERRIDE { return typeid(T); }
|
||||
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct small_any_policy : typed_base_any_policy<T>
|
||||
struct small_any_policy CV_FINAL : typed_base_any_policy<T>
|
||||
{
|
||||
virtual void static_delete(void**) { }
|
||||
virtual void copy_from_value(void const* src, void** dest)
|
||||
virtual void static_delete(void**) CV_OVERRIDE { }
|
||||
virtual void copy_from_value(void const* src, void** dest) CV_OVERRIDE
|
||||
{
|
||||
new (dest) T(* reinterpret_cast<T const*>(src));
|
||||
}
|
||||
virtual void clone(void* const* src, void** dest) { *dest = *src; }
|
||||
virtual void move(void* const* src, void** dest) { *dest = *src; }
|
||||
virtual void* get_value(void** src) { return reinterpret_cast<void*>(src); }
|
||||
virtual const void* get_value(void* const * src) { return reinterpret_cast<const void*>(src); }
|
||||
virtual void print(std::ostream& out, void* const* src) { out << *reinterpret_cast<T const*>(src); }
|
||||
virtual void clone(void* const* src, void** dest) CV_OVERRIDE { *dest = *src; }
|
||||
virtual void move(void* const* src, void** dest) CV_OVERRIDE { *dest = *src; }
|
||||
virtual void* get_value(void** src) CV_OVERRIDE { return reinterpret_cast<void*>(src); }
|
||||
virtual const void* get_value(void* const * src) CV_OVERRIDE { return reinterpret_cast<const void*>(src); }
|
||||
virtual void print(std::ostream& out, void* const* src) CV_OVERRIDE { out << *reinterpret_cast<T const*>(src); }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct big_any_policy : typed_base_any_policy<T>
|
||||
struct big_any_policy CV_FINAL : typed_base_any_policy<T>
|
||||
{
|
||||
virtual void static_delete(void** x)
|
||||
virtual void static_delete(void** x) CV_OVERRIDE
|
||||
{
|
||||
if (* x) delete (* reinterpret_cast<T**>(x));
|
||||
*x = NULL;
|
||||
}
|
||||
virtual void copy_from_value(void const* src, void** dest)
|
||||
virtual void copy_from_value(void const* src, void** dest) CV_OVERRIDE
|
||||
{
|
||||
*dest = new T(*reinterpret_cast<T const*>(src));
|
||||
}
|
||||
virtual void clone(void* const* src, void** dest)
|
||||
virtual void clone(void* const* src, void** dest) CV_OVERRIDE
|
||||
{
|
||||
*dest = new T(**reinterpret_cast<T* const*>(src));
|
||||
}
|
||||
virtual void move(void* const* src, void** dest)
|
||||
virtual void move(void* const* src, void** dest) CV_OVERRIDE
|
||||
{
|
||||
(*reinterpret_cast<T**>(dest))->~T();
|
||||
**reinterpret_cast<T**>(dest) = **reinterpret_cast<T* const*>(src);
|
||||
}
|
||||
virtual void* get_value(void** src) { return *src; }
|
||||
virtual const void* get_value(void* const * src) { return *src; }
|
||||
virtual void print(std::ostream& out, void* const* src) { out << *reinterpret_cast<T const*>(*src); }
|
||||
virtual void* get_value(void** src) CV_OVERRIDE { return *src; }
|
||||
virtual const void* get_value(void* const * src) CV_OVERRIDE { return *src; }
|
||||
virtual void print(std::ostream& out, void* const* src) CV_OVERRIDE { out << *reinterpret_cast<T const*>(*src); }
|
||||
};
|
||||
|
||||
template<> inline void big_any_policy<flann_centers_init_t>::print(std::ostream& out, void* const* src)
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
/**
|
||||
* Method responsible with building the index.
|
||||
*/
|
||||
virtual void buildIndex()
|
||||
virtual void buildIndex() CV_OVERRIDE
|
||||
{
|
||||
std::ostringstream stream;
|
||||
bestParams_ = estimateBuildParams();
|
||||
@ -124,7 +124,7 @@ public:
|
||||
/**
|
||||
* Saves the index to a stream
|
||||
*/
|
||||
virtual void saveIndex(FILE* stream)
|
||||
virtual void saveIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
save_value(stream, (int)bestIndex_->getType());
|
||||
bestIndex_->saveIndex(stream);
|
||||
@ -134,7 +134,7 @@ public:
|
||||
/**
|
||||
* Loads the index from a stream
|
||||
*/
|
||||
virtual void loadIndex(FILE* stream)
|
||||
virtual void loadIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
int index_type;
|
||||
|
||||
@ -151,7 +151,7 @@ public:
|
||||
/**
|
||||
* Method that searches for nearest-neighbors
|
||||
*/
|
||||
virtual void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)
|
||||
virtual void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE
|
||||
{
|
||||
int checks = get_param<int>(searchParams,"checks",FLANN_CHECKS_AUTOTUNED);
|
||||
if (checks == FLANN_CHECKS_AUTOTUNED) {
|
||||
@ -163,7 +163,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
IndexParams getParameters() const
|
||||
IndexParams getParameters() const CV_OVERRIDE
|
||||
{
|
||||
return bestIndex_->getParameters();
|
||||
}
|
||||
@ -182,7 +182,7 @@ public:
|
||||
/**
|
||||
* Number of features in this index.
|
||||
*/
|
||||
virtual size_t size() const
|
||||
virtual size_t size() const CV_OVERRIDE
|
||||
{
|
||||
return bestIndex_->size();
|
||||
}
|
||||
@ -190,7 +190,7 @@ public:
|
||||
/**
|
||||
* The length of each vector in this index.
|
||||
*/
|
||||
virtual size_t veclen() const
|
||||
virtual size_t veclen() const CV_OVERRIDE
|
||||
{
|
||||
return bestIndex_->veclen();
|
||||
}
|
||||
@ -198,7 +198,7 @@ public:
|
||||
/**
|
||||
* The amount of memory (in bytes) this index uses.
|
||||
*/
|
||||
virtual int usedMemory() const
|
||||
virtual int usedMemory() const CV_OVERRIDE
|
||||
{
|
||||
return bestIndex_->usedMemory();
|
||||
}
|
||||
@ -206,7 +206,7 @@ public:
|
||||
/**
|
||||
* Algorithm name
|
||||
*/
|
||||
virtual flann_algorithm_t getType() const
|
||||
virtual flann_algorithm_t getType() const CV_OVERRIDE
|
||||
{
|
||||
return FLANN_INDEX_AUTOTUNED;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
/**
|
||||
* @return The index type
|
||||
*/
|
||||
flann_algorithm_t getType() const
|
||||
flann_algorithm_t getType() const CV_OVERRIDE
|
||||
{
|
||||
return FLANN_INDEX_COMPOSITE;
|
||||
}
|
||||
@ -109,7 +109,7 @@ public:
|
||||
/**
|
||||
* @return Size of the index
|
||||
*/
|
||||
size_t size() const
|
||||
size_t size() const CV_OVERRIDE
|
||||
{
|
||||
return kdtree_index_->size();
|
||||
}
|
||||
@ -117,7 +117,7 @@ public:
|
||||
/**
|
||||
* \returns The dimensionality of the features in this index.
|
||||
*/
|
||||
size_t veclen() const
|
||||
size_t veclen() const CV_OVERRIDE
|
||||
{
|
||||
return kdtree_index_->veclen();
|
||||
}
|
||||
@ -125,7 +125,7 @@ public:
|
||||
/**
|
||||
* \returns The amount of memory (in bytes) used by the index.
|
||||
*/
|
||||
int usedMemory() const
|
||||
int usedMemory() const CV_OVERRIDE
|
||||
{
|
||||
return kmeans_index_->usedMemory() + kdtree_index_->usedMemory();
|
||||
}
|
||||
@ -133,7 +133,7 @@ public:
|
||||
/**
|
||||
* \brief Builds the index
|
||||
*/
|
||||
void buildIndex()
|
||||
void buildIndex() CV_OVERRIDE
|
||||
{
|
||||
Logger::info("Building kmeans tree...\n");
|
||||
kmeans_index_->buildIndex();
|
||||
@ -145,7 +145,7 @@ public:
|
||||
* \brief Saves the index to a stream
|
||||
* \param stream The stream to save the index to
|
||||
*/
|
||||
void saveIndex(FILE* stream)
|
||||
void saveIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
kmeans_index_->saveIndex(stream);
|
||||
kdtree_index_->saveIndex(stream);
|
||||
@ -155,7 +155,7 @@ public:
|
||||
* \brief Loads the index from a stream
|
||||
* \param stream The stream from which the index is loaded
|
||||
*/
|
||||
void loadIndex(FILE* stream)
|
||||
void loadIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
kmeans_index_->loadIndex(stream);
|
||||
kdtree_index_->loadIndex(stream);
|
||||
@ -164,7 +164,7 @@ public:
|
||||
/**
|
||||
* \returns The index parameters
|
||||
*/
|
||||
IndexParams getParameters() const
|
||||
IndexParams getParameters() const CV_OVERRIDE
|
||||
{
|
||||
return index_params_;
|
||||
}
|
||||
@ -172,7 +172,7 @@ public:
|
||||
/**
|
||||
* \brief Method that searches for nearest-neighbours
|
||||
*/
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE
|
||||
{
|
||||
kmeans_index_->findNeighbors(result, vec, searchParams);
|
||||
kdtree_index_->findNeighbors(result, vec, searchParams);
|
||||
|
@ -128,7 +128,7 @@ public:
|
||||
/**
|
||||
* Builds the index.
|
||||
*/
|
||||
void buildIndex()
|
||||
void buildIndex() CV_OVERRIDE
|
||||
{
|
||||
if (!loaded_) {
|
||||
nnIndex_->buildIndex();
|
||||
@ -150,7 +150,7 @@ public:
|
||||
* \brief Saves the index to a stream
|
||||
* \param stream The stream to save the index to
|
||||
*/
|
||||
virtual void saveIndex(FILE* stream)
|
||||
virtual void saveIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
nnIndex_->saveIndex(stream);
|
||||
}
|
||||
@ -159,7 +159,7 @@ public:
|
||||
* \brief Loads the index from a stream
|
||||
* \param stream The stream from which the index is loaded
|
||||
*/
|
||||
virtual void loadIndex(FILE* stream)
|
||||
virtual void loadIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
nnIndex_->loadIndex(stream);
|
||||
}
|
||||
@ -167,7 +167,7 @@ public:
|
||||
/**
|
||||
* \returns number of features in this index.
|
||||
*/
|
||||
size_t veclen() const
|
||||
size_t veclen() const CV_OVERRIDE
|
||||
{
|
||||
return nnIndex_->veclen();
|
||||
}
|
||||
@ -175,7 +175,7 @@ public:
|
||||
/**
|
||||
* \returns The dimensionality of the features in this index.
|
||||
*/
|
||||
size_t size() const
|
||||
size_t size() const CV_OVERRIDE
|
||||
{
|
||||
return nnIndex_->size();
|
||||
}
|
||||
@ -183,7 +183,7 @@ public:
|
||||
/**
|
||||
* \returns The index type (kdtree, kmeans,...)
|
||||
*/
|
||||
flann_algorithm_t getType() const
|
||||
flann_algorithm_t getType() const CV_OVERRIDE
|
||||
{
|
||||
return nnIndex_->getType();
|
||||
}
|
||||
@ -191,7 +191,7 @@ public:
|
||||
/**
|
||||
* \returns The amount of memory (in bytes) used by the index.
|
||||
*/
|
||||
virtual int usedMemory() const
|
||||
virtual int usedMemory() const CV_OVERRIDE
|
||||
{
|
||||
return nnIndex_->usedMemory();
|
||||
}
|
||||
@ -200,7 +200,7 @@ public:
|
||||
/**
|
||||
* \returns The index parameters
|
||||
*/
|
||||
IndexParams getParameters() const
|
||||
IndexParams getParameters() const CV_OVERRIDE
|
||||
{
|
||||
return nnIndex_->getParameters();
|
||||
}
|
||||
@ -213,7 +213,7 @@ public:
|
||||
* \param[in] knn Number of nearest neighbors to return
|
||||
* \param[in] params Search parameters
|
||||
*/
|
||||
void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params)
|
||||
void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params) CV_OVERRIDE
|
||||
{
|
||||
nnIndex_->knnSearch(queries, indices, dists, knn, params);
|
||||
}
|
||||
@ -227,7 +227,7 @@ public:
|
||||
* \param[in] params Search parameters
|
||||
* \returns Number of neighbors found
|
||||
*/
|
||||
int radiusSearch(const Matrix<ElementType>& query, Matrix<int>& indices, Matrix<DistanceType>& dists, float radius, const SearchParams& params)
|
||||
int radiusSearch(const Matrix<ElementType>& query, Matrix<int>& indices, Matrix<DistanceType>& dists, float radius, const SearchParams& params) CV_OVERRIDE
|
||||
{
|
||||
return nnIndex_->radiusSearch(query, indices, dists, radius, params);
|
||||
}
|
||||
@ -235,7 +235,7 @@ public:
|
||||
/**
|
||||
* \brief Method that searches for nearest-neighbours
|
||||
*/
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE
|
||||
{
|
||||
nnIndex_->findNeighbors(result, vec, searchParams);
|
||||
}
|
||||
|
@ -435,7 +435,7 @@ public:
|
||||
/**
|
||||
* Returns size of index.
|
||||
*/
|
||||
size_t size() const
|
||||
size_t size() const CV_OVERRIDE
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
@ -443,7 +443,7 @@ public:
|
||||
/**
|
||||
* Returns the length of an index feature.
|
||||
*/
|
||||
size_t veclen() const
|
||||
size_t veclen() const CV_OVERRIDE
|
||||
{
|
||||
return veclen_;
|
||||
}
|
||||
@ -453,7 +453,7 @@ public:
|
||||
* Computes the inde memory usage
|
||||
* Returns: memory used by the index
|
||||
*/
|
||||
int usedMemory() const
|
||||
int usedMemory() const CV_OVERRIDE
|
||||
{
|
||||
return pool.usedMemory+pool.wastedMemory+memoryCounter;
|
||||
}
|
||||
@ -461,7 +461,7 @@ public:
|
||||
/**
|
||||
* Builds the index
|
||||
*/
|
||||
void buildIndex()
|
||||
void buildIndex() CV_OVERRIDE
|
||||
{
|
||||
if (branching_<2) {
|
||||
throw FLANNException("Branching factor must be at least 2");
|
||||
@ -480,13 +480,13 @@ public:
|
||||
}
|
||||
|
||||
|
||||
flann_algorithm_t getType() const
|
||||
flann_algorithm_t getType() const CV_OVERRIDE
|
||||
{
|
||||
return FLANN_INDEX_HIERARCHICAL;
|
||||
}
|
||||
|
||||
|
||||
void saveIndex(FILE* stream)
|
||||
void saveIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
save_value(stream, branching_);
|
||||
save_value(stream, trees_);
|
||||
@ -501,7 +501,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
void loadIndex(FILE* stream)
|
||||
void loadIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
free_elements();
|
||||
|
||||
@ -544,7 +544,7 @@ public:
|
||||
* vec = the vector for which to search the nearest neighbors
|
||||
* searchParams = parameters that influence the search algorithm (checks)
|
||||
*/
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE
|
||||
{
|
||||
|
||||
int maxChecks = get_param(searchParams,"checks",32);
|
||||
@ -569,7 +569,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
IndexParams getParameters() const
|
||||
IndexParams getParameters() const CV_OVERRIDE
|
||||
{
|
||||
return params;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public:
|
||||
/**
|
||||
* Builds the index
|
||||
*/
|
||||
void buildIndex()
|
||||
void buildIndex() CV_OVERRIDE
|
||||
{
|
||||
/* Construct the randomized trees. */
|
||||
for (int i = 0; i < trees_; i++) {
|
||||
@ -136,13 +136,13 @@ public:
|
||||
}
|
||||
|
||||
|
||||
flann_algorithm_t getType() const
|
||||
flann_algorithm_t getType() const CV_OVERRIDE
|
||||
{
|
||||
return FLANN_INDEX_KDTREE;
|
||||
}
|
||||
|
||||
|
||||
void saveIndex(FILE* stream)
|
||||
void saveIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
save_value(stream, trees_);
|
||||
for (int i=0; i<trees_; ++i) {
|
||||
@ -152,7 +152,7 @@ public:
|
||||
|
||||
|
||||
|
||||
void loadIndex(FILE* stream)
|
||||
void loadIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
load_value(stream, trees_);
|
||||
if (tree_roots_!=NULL) {
|
||||
@ -170,7 +170,7 @@ public:
|
||||
/**
|
||||
* Returns size of index.
|
||||
*/
|
||||
size_t size() const
|
||||
size_t size() const CV_OVERRIDE
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
@ -178,7 +178,7 @@ public:
|
||||
/**
|
||||
* Returns the length of an index feature.
|
||||
*/
|
||||
size_t veclen() const
|
||||
size_t veclen() const CV_OVERRIDE
|
||||
{
|
||||
return veclen_;
|
||||
}
|
||||
@ -187,7 +187,7 @@ public:
|
||||
* Computes the inde memory usage
|
||||
* Returns: memory used by the index
|
||||
*/
|
||||
int usedMemory() const
|
||||
int usedMemory() const CV_OVERRIDE
|
||||
{
|
||||
return int(pool_.usedMemory+pool_.wastedMemory+dataset_.rows*sizeof(int)); // pool memory and vind array memory
|
||||
}
|
||||
@ -201,7 +201,7 @@ public:
|
||||
* vec = the vector for which to search the nearest neighbors
|
||||
* maxCheck = the maximum number of restarts (in a best-bin-first manner)
|
||||
*/
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE
|
||||
{
|
||||
int maxChecks = get_param(searchParams,"checks", 32);
|
||||
float epsError = 1+get_param(searchParams,"eps",0.0f);
|
||||
@ -214,7 +214,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
IndexParams getParameters() const
|
||||
IndexParams getParameters() const CV_OVERRIDE
|
||||
{
|
||||
return index_params_;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public:
|
||||
/**
|
||||
* Builds the index
|
||||
*/
|
||||
void buildIndex()
|
||||
void buildIndex() CV_OVERRIDE
|
||||
{
|
||||
computeBoundingBox(root_bbox_);
|
||||
root_node_ = divideTree(0, (int)size_, root_bbox_ ); // construct the tree
|
||||
@ -133,13 +133,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
flann_algorithm_t getType() const
|
||||
flann_algorithm_t getType() const CV_OVERRIDE
|
||||
{
|
||||
return FLANN_INDEX_KDTREE_SINGLE;
|
||||
}
|
||||
|
||||
|
||||
void saveIndex(FILE* stream)
|
||||
void saveIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
save_value(stream, size_);
|
||||
save_value(stream, dim_);
|
||||
@ -154,7 +154,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
void loadIndex(FILE* stream)
|
||||
void loadIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
load_value(stream, size_);
|
||||
load_value(stream, dim_);
|
||||
@ -179,7 +179,7 @@ public:
|
||||
/**
|
||||
* Returns size of index.
|
||||
*/
|
||||
size_t size() const
|
||||
size_t size() const CV_OVERRIDE
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
@ -187,7 +187,7 @@ public:
|
||||
/**
|
||||
* Returns the length of an index feature.
|
||||
*/
|
||||
size_t veclen() const
|
||||
size_t veclen() const CV_OVERRIDE
|
||||
{
|
||||
return dim_;
|
||||
}
|
||||
@ -196,7 +196,7 @@ public:
|
||||
* Computes the inde memory usage
|
||||
* Returns: memory used by the index
|
||||
*/
|
||||
int usedMemory() const
|
||||
int usedMemory() const CV_OVERRIDE
|
||||
{
|
||||
return (int)(pool_.usedMemory+pool_.wastedMemory+dataset_.rows*sizeof(int)); // pool memory and vind array memory
|
||||
}
|
||||
@ -210,7 +210,7 @@ public:
|
||||
* \param[in] knn Number of nearest neighbors to return
|
||||
* \param[in] params Search parameters
|
||||
*/
|
||||
void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params)
|
||||
void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params) CV_OVERRIDE
|
||||
{
|
||||
assert(queries.cols == veclen());
|
||||
assert(indices.rows >= queries.rows);
|
||||
@ -225,7 +225,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
IndexParams getParameters() const
|
||||
IndexParams getParameters() const CV_OVERRIDE
|
||||
{
|
||||
return index_params_;
|
||||
}
|
||||
@ -239,7 +239,7 @@ public:
|
||||
* vec = the vector for which to search the nearest neighbors
|
||||
* maxCheck = the maximum number of restarts (in a best-bin-first manner)
|
||||
*/
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE
|
||||
{
|
||||
float epsError = 1+get_param(searchParams,"eps",0.0f);
|
||||
|
||||
|
@ -266,7 +266,7 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
flann_algorithm_t getType() const
|
||||
flann_algorithm_t getType() const CV_OVERRIDE
|
||||
{
|
||||
return FLANN_INDEX_KMEANS;
|
||||
}
|
||||
@ -291,7 +291,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
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;
|
||||
@ -398,7 +398,7 @@ public:
|
||||
/**
|
||||
* Returns size of index.
|
||||
*/
|
||||
size_t size() const
|
||||
size_t size() const CV_OVERRIDE
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
@ -406,7 +406,7 @@ public:
|
||||
/**
|
||||
* Returns the length of an index feature.
|
||||
*/
|
||||
size_t veclen() const
|
||||
size_t veclen() const CV_OVERRIDE
|
||||
{
|
||||
return veclen_;
|
||||
}
|
||||
@ -421,7 +421,7 @@ public:
|
||||
* Computes the inde memory usage
|
||||
* Returns: memory used by the index
|
||||
*/
|
||||
int usedMemory() const
|
||||
int usedMemory() const CV_OVERRIDE
|
||||
{
|
||||
return pool_.usedMemory+pool_.wastedMemory+memoryCounter_;
|
||||
}
|
||||
@ -429,7 +429,7 @@ public:
|
||||
/**
|
||||
* Builds the index
|
||||
*/
|
||||
void buildIndex()
|
||||
void buildIndex() CV_OVERRIDE
|
||||
{
|
||||
if (branching_<2) {
|
||||
throw FLANNException("Branching factor must be at least 2");
|
||||
@ -448,7 +448,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
void saveIndex(FILE* stream)
|
||||
void saveIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
save_value(stream, branching_);
|
||||
save_value(stream, iterations_);
|
||||
@ -460,7 +460,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
void loadIndex(FILE* stream)
|
||||
void loadIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
load_value(stream, branching_);
|
||||
load_value(stream, iterations_);
|
||||
@ -495,7 +495,7 @@ public:
|
||||
* vec = the vector for which to search the nearest neighbors
|
||||
* searchParams = parameters that influence the search algorithm (checks, cb_index)
|
||||
*/
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE
|
||||
{
|
||||
|
||||
int maxChecks = get_param(searchParams,"checks",32);
|
||||
@ -554,7 +554,7 @@ public:
|
||||
return clusterCount;
|
||||
}
|
||||
|
||||
IndexParams getParameters() const
|
||||
IndexParams getParameters() const CV_OVERRIDE
|
||||
{
|
||||
return index_params_;
|
||||
}
|
||||
|
@ -63,47 +63,47 @@ public:
|
||||
LinearIndex(const LinearIndex&);
|
||||
LinearIndex& operator=(const LinearIndex&);
|
||||
|
||||
flann_algorithm_t getType() const
|
||||
flann_algorithm_t getType() const CV_OVERRIDE
|
||||
{
|
||||
return FLANN_INDEX_LINEAR;
|
||||
}
|
||||
|
||||
|
||||
size_t size() const
|
||||
size_t size() const CV_OVERRIDE
|
||||
{
|
||||
return dataset_.rows;
|
||||
}
|
||||
|
||||
size_t veclen() const
|
||||
size_t veclen() const CV_OVERRIDE
|
||||
{
|
||||
return dataset_.cols;
|
||||
}
|
||||
|
||||
|
||||
int usedMemory() const
|
||||
int usedMemory() const CV_OVERRIDE
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void buildIndex()
|
||||
void buildIndex() CV_OVERRIDE
|
||||
{
|
||||
/* nothing to do here for linear search */
|
||||
}
|
||||
|
||||
void saveIndex(FILE*)
|
||||
void saveIndex(FILE*) CV_OVERRIDE
|
||||
{
|
||||
/* nothing to do here for linear search */
|
||||
}
|
||||
|
||||
|
||||
void loadIndex(FILE*)
|
||||
void loadIndex(FILE*) CV_OVERRIDE
|
||||
{
|
||||
/* nothing to do here for linear search */
|
||||
|
||||
index_params_["algorithm"] = getType();
|
||||
}
|
||||
|
||||
void findNeighbors(ResultSet<DistanceType>& resultSet, const ElementType* vec, const SearchParams& /*searchParams*/)
|
||||
void findNeighbors(ResultSet<DistanceType>& resultSet, const ElementType* vec, const SearchParams& /*searchParams*/) CV_OVERRIDE
|
||||
{
|
||||
ElementType* data = dataset_.data;
|
||||
for (size_t i = 0; i < dataset_.rows; ++i, data += dataset_.cols) {
|
||||
@ -112,7 +112,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
IndexParams getParameters() const
|
||||
IndexParams getParameters() const CV_OVERRIDE
|
||||
{
|
||||
return index_params_;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
/**
|
||||
* Builds the index
|
||||
*/
|
||||
void buildIndex()
|
||||
void buildIndex() CV_OVERRIDE
|
||||
{
|
||||
tables_.resize(table_number_);
|
||||
for (unsigned int i = 0; i < table_number_; ++i) {
|
||||
@ -119,13 +119,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
flann_algorithm_t getType() const
|
||||
flann_algorithm_t getType() const CV_OVERRIDE
|
||||
{
|
||||
return FLANN_INDEX_LSH;
|
||||
}
|
||||
|
||||
|
||||
void saveIndex(FILE* stream)
|
||||
void saveIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
save_value(stream,table_number_);
|
||||
save_value(stream,key_size_);
|
||||
@ -133,7 +133,7 @@ public:
|
||||
save_value(stream, dataset_);
|
||||
}
|
||||
|
||||
void loadIndex(FILE* stream)
|
||||
void loadIndex(FILE* stream) CV_OVERRIDE
|
||||
{
|
||||
load_value(stream, table_number_);
|
||||
load_value(stream, key_size_);
|
||||
@ -151,7 +151,7 @@ public:
|
||||
/**
|
||||
* Returns size of index.
|
||||
*/
|
||||
size_t size() const
|
||||
size_t size() const CV_OVERRIDE
|
||||
{
|
||||
return dataset_.rows;
|
||||
}
|
||||
@ -159,7 +159,7 @@ public:
|
||||
/**
|
||||
* Returns the length of an index feature.
|
||||
*/
|
||||
size_t veclen() const
|
||||
size_t veclen() const CV_OVERRIDE
|
||||
{
|
||||
return feature_size_;
|
||||
}
|
||||
@ -168,13 +168,13 @@ public:
|
||||
* Computes the index memory usage
|
||||
* Returns: memory used by the index
|
||||
*/
|
||||
int usedMemory() const
|
||||
int usedMemory() const CV_OVERRIDE
|
||||
{
|
||||
return (int)(dataset_.rows * sizeof(int));
|
||||
}
|
||||
|
||||
|
||||
IndexParams getParameters() const
|
||||
IndexParams getParameters() const CV_OVERRIDE
|
||||
{
|
||||
return index_params_;
|
||||
}
|
||||
@ -187,7 +187,7 @@ public:
|
||||
* \param[in] knn Number of nearest neighbors to return
|
||||
* \param[in] params Search parameters
|
||||
*/
|
||||
virtual void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params)
|
||||
virtual void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params) CV_OVERRIDE
|
||||
{
|
||||
assert(queries.cols == veclen());
|
||||
assert(indices.rows >= queries.rows);
|
||||
@ -217,7 +217,7 @@ public:
|
||||
* vec = the vector for which to search the nearest neighbors
|
||||
* maxCheck = the maximum number of restarts (in a best-bin-first manner)
|
||||
*/
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& /*searchParams*/)
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& /*searchParams*/) CV_OVERRIDE
|
||||
{
|
||||
getNeighbors(vec, result);
|
||||
}
|
||||
|
@ -109,13 +109,13 @@ public:
|
||||
return count;
|
||||
}
|
||||
|
||||
bool full() const
|
||||
bool full() const CV_OVERRIDE
|
||||
{
|
||||
return count == capacity;
|
||||
}
|
||||
|
||||
|
||||
void addPoint(DistanceType dist, int index)
|
||||
void addPoint(DistanceType dist, int index) CV_OVERRIDE
|
||||
{
|
||||
if (dist >= worst_distance_) return;
|
||||
int i;
|
||||
@ -139,7 +139,7 @@ public:
|
||||
worst_distance_ = dists[capacity-1];
|
||||
}
|
||||
|
||||
DistanceType worstDist() const
|
||||
DistanceType worstDist() const CV_OVERRIDE
|
||||
{
|
||||
return worst_distance_;
|
||||
}
|
||||
@ -176,13 +176,13 @@ public:
|
||||
return count;
|
||||
}
|
||||
|
||||
bool full() const
|
||||
bool full() const CV_OVERRIDE
|
||||
{
|
||||
return count == capacity;
|
||||
}
|
||||
|
||||
|
||||
void addPoint(DistanceType dist, int index)
|
||||
void addPoint(DistanceType dist, int index) CV_OVERRIDE
|
||||
{
|
||||
if (dist >= worst_distance_) return;
|
||||
int i;
|
||||
@ -215,7 +215,7 @@ public:
|
||||
worst_distance_ = dists[capacity-1];
|
||||
}
|
||||
|
||||
DistanceType worstDist() const
|
||||
DistanceType worstDist() const CV_OVERRIDE
|
||||
{
|
||||
return worst_distance_;
|
||||
}
|
||||
@ -310,7 +310,7 @@ public:
|
||||
/** Check the status of the set
|
||||
* @return true if we have k NN
|
||||
*/
|
||||
inline bool full() const
|
||||
inline bool full() const CV_OVERRIDE
|
||||
{
|
||||
return is_full_;
|
||||
}
|
||||
@ -365,7 +365,7 @@ public:
|
||||
* If we don't have enough neighbors, it returns the max possible value
|
||||
* @return
|
||||
*/
|
||||
inline DistanceType worstDist() const
|
||||
inline DistanceType worstDist() const CV_OVERRIDE
|
||||
{
|
||||
return worst_distance_;
|
||||
}
|
||||
@ -402,7 +402,7 @@ public:
|
||||
* @param dist distance for that neighbor
|
||||
* @param index index of that neighbor
|
||||
*/
|
||||
inline void addPoint(DistanceType dist, int index)
|
||||
inline void addPoint(DistanceType dist, int index) CV_OVERRIDE
|
||||
{
|
||||
// Don't do anything if we are worse than the worst
|
||||
if (dist >= worst_distance_) return;
|
||||
@ -422,7 +422,7 @@ public:
|
||||
|
||||
/** Remove all elements in the set
|
||||
*/
|
||||
void clear()
|
||||
void clear() CV_OVERRIDE
|
||||
{
|
||||
dist_indices_.clear();
|
||||
worst_distance_ = std::numeric_limits<DistanceType>::max();
|
||||
@ -461,14 +461,14 @@ public:
|
||||
* @param dist distance for that neighbor
|
||||
* @param index index of that neighbor
|
||||
*/
|
||||
void addPoint(DistanceType dist, int index)
|
||||
void addPoint(DistanceType dist, int index) CV_OVERRIDE
|
||||
{
|
||||
if (dist <= radius_) dist_indices_.insert(DistIndex(dist, index));
|
||||
}
|
||||
|
||||
/** Remove all elements in the set
|
||||
*/
|
||||
inline void clear()
|
||||
inline void clear() CV_OVERRIDE
|
||||
{
|
||||
dist_indices_.clear();
|
||||
}
|
||||
@ -477,7 +477,7 @@ public:
|
||||
/** Check the status of the set
|
||||
* @return alwys false
|
||||
*/
|
||||
inline bool full() const
|
||||
inline bool full() const CV_OVERRIDE
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -486,7 +486,7 @@ public:
|
||||
* If we don't have enough neighbors, it returns the max possible value
|
||||
* @return
|
||||
*/
|
||||
inline DistanceType worstDist() const
|
||||
inline DistanceType worstDist() const CV_OVERRIDE
|
||||
{
|
||||
return radius_;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user