From 036e699553f0103e0c696f5eb17b589b9d74ebd9 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 21 Mar 2018 17:54:17 +0300 Subject: [PATCH] samples: apply CV_OVERRIDE/CV_FINAL --- .../opencv2/optflow/sparse_matching_gpc.hpp | 6 +++--- .../include/opencv2/sfm/simple_pipeline.hpp | 20 +++++++++---------- modules/text/samples/webcam_demo.cpp | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/optflow/include/opencv2/optflow/sparse_matching_gpc.hpp b/modules/optflow/include/opencv2/optflow/sparse_matching_gpc.hpp index 4bd6f53ed..9458ffb32 100644 --- a/modules/optflow/include/opencv2/optflow/sparse_matching_gpc.hpp +++ b/modules/optflow/include/opencv2/optflow/sparse_matching_gpc.hpp @@ -227,7 +227,7 @@ private: ParallelTrailsFilling( const GPCForest *_forest, const std::vector< GPCPatchDescriptor > *_descr, std::vector< Trail > *_trails ) : forest( _forest ), descr( _descr ), trails( _trails ){}; - void operator()( const Range &range ) const + void operator()( const Range &range ) const CV_OVERRIDE { for ( int t = range.start; t < range.end; ++t ) for ( size_t i = 0; i < descr->size(); ++i ) @@ -272,7 +272,7 @@ public: } } - void write( FileStorage &fs ) const + void write( FileStorage &fs ) const CV_OVERRIDE { fs << "ntrees" << T << "trees" << "["; @@ -285,7 +285,7 @@ public: fs << "]"; } - void read( const FileNode &fn ) + void read( const FileNode &fn ) CV_OVERRIDE { CV_Assert( T <= (int)fn["ntrees"] ); FileNodeIterator it = fn["trees"].begin(); diff --git a/modules/sfm/include/opencv2/sfm/simple_pipeline.hpp b/modules/sfm/include/opencv2/sfm/simple_pipeline.hpp index d882fa88f..1bd4e17ff 100644 --- a/modules/sfm/include/opencv2/sfm/simple_pipeline.hpp +++ b/modules/sfm/include/opencv2/sfm/simple_pipeline.hpp @@ -196,7 +196,7 @@ public: - Tracks must be as precise as possible. It does not handle outliers and is very sensible to them. */ CV_WRAP - virtual void run(InputArrayOfArrays points2d) = 0; + virtual void run(InputArrayOfArrays points2d) CV_OVERRIDE = 0; /** @brief Calls the pipeline in order to perform Eclidean reconstruction. @param points2d Input vector of vectors of 2d points (the inner vector is per image). @@ -210,7 +210,7 @@ public: */ CV_WRAP virtual void run(InputArrayOfArrays points2d, InputOutputArray K, OutputArray Rs, - OutputArray Ts, OutputArray points3d) = 0; + OutputArray Ts, OutputArray points3d) CV_OVERRIDE = 0; /** @brief Calls the pipeline in order to perform Eclidean reconstruction. @param images a vector of string with the images paths. @@ -219,7 +219,7 @@ public: - The images must be ordered as they were an image sequence. Additionally, each frame should be as close as posible to the previous and posterior. - For now DAISY features are used in order to compute the 2d points tracks and it only works for 3-4 images. */ - virtual void run(const std::vector &images) = 0; + virtual void run(const std::vector &images) CV_OVERRIDE = 0; /** @brief Calls the pipeline in order to perform Eclidean reconstruction. @param images a vector of string with the images paths. @@ -233,30 +233,30 @@ public: - For now DAISY features are used in order to compute the 2d points tracks and it only works for 3-4 images. */ virtual void run(const std::vector &images, InputOutputArray K, OutputArray Rs, - OutputArray Ts, OutputArray points3d) = 0; + OutputArray Ts, OutputArray points3d) CV_OVERRIDE = 0; /** @brief Returns the computed reprojection error. */ CV_WRAP - virtual double getError() const = 0; + virtual double getError() const CV_OVERRIDE = 0; /** @brief Returns the estimated 3d points. @param points3d Output array with estimated 3d points. */ CV_WRAP - virtual void getPoints(OutputArray points3d) = 0; + virtual void getPoints(OutputArray points3d) CV_OVERRIDE = 0; /** @brief Returns the refined camera calibration matrix. */ CV_WRAP - virtual cv::Mat getIntrinsics() const = 0; + virtual cv::Mat getIntrinsics() const CV_OVERRIDE = 0; /** @brief Returns the estimated camera extrinsic parameters. @param Rs Output vector of 3x3 rotations of the camera. @param Ts Output vector of 3x1 translations of the camera. */ CV_WRAP - virtual void getCameras(OutputArray Rs, OutputArray Ts) = 0; + virtual void getCameras(OutputArray Rs, OutputArray Ts) CV_OVERRIDE = 0; /** @brief Setter method for reconstruction options. @param libmv_reconstruction_options struct with reconstruction options such as initial keyframes, @@ -264,7 +264,7 @@ public: */ CV_WRAP virtual void - setReconstructionOptions(const libmv_ReconstructionOptions &libmv_reconstruction_options) = 0; + setReconstructionOptions(const libmv_ReconstructionOptions &libmv_reconstruction_options) CV_OVERRIDE = 0; /** @brief Setter method for camera intrinsic options. @param libmv_camera_intrinsics_options struct with camera intrinsic options such as camera model and @@ -272,7 +272,7 @@ public: */ CV_WRAP virtual void - setCameraIntrinsicOptions(const libmv_CameraIntrinsicsOptions &libmv_camera_intrinsics_options) = 0; + setCameraIntrinsicOptions(const libmv_CameraIntrinsicsOptions &libmv_camera_intrinsics_options) CV_OVERRIDE = 0; /** @brief Creates an instance of the SFMLibmvEuclideanReconstruction class. Initializes Libmv. */ static Ptr diff --git a/modules/text/samples/webcam_demo.cpp b/modules/text/samples/webcam_demo.cpp index 35a41420d..4fece6b8f 100644 --- a/modules/text/samples/webcam_demo.cpp +++ b/modules/text/samples/webcam_demo.cpp @@ -32,7 +32,7 @@ public: vector >_er_filter1, vector >_er_filter2) : channels(_channels),regions(_regions),er_filter1(_er_filter1),er_filter2(_er_filter2) {} - virtual void operator()( const cv::Range &r ) const + virtual void operator()( const cv::Range &r ) const CV_OVERRIDE { for (int c=r.start; c < r.end; c++) { @@ -63,7 +63,7 @@ public: confidences(_confidences), ocrs(_ocrs) {} - virtual void operator()( const cv::Range &r ) const + virtual void operator()( const cv::Range &r ) const CV_OVERRIDE { for (int c=r.start; c < r.end; c++) {