diff --git a/3rdparty/openjpeg/CMakeLists.txt b/3rdparty/openjpeg/CMakeLists.txt index d3db9e8c47..188381f1e2 100644 --- a/3rdparty/openjpeg/CMakeLists.txt +++ b/3rdparty/openjpeg/CMakeLists.txt @@ -16,6 +16,7 @@ ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-but-set-variable # clang15 -Wmissing-prototypes # clang, function opj_t1_ht_decode_cblk -Wmissing-declarations # gcc, function opj_t1_ht_decode_cblk + -Wdocumentation # clang ) #----------------------------------------------------------------------------- diff --git a/3rdparty/protobuf/CMakeLists.txt b/3rdparty/protobuf/CMakeLists.txt index 5e8e3a9ed2..7df035cac9 100644 --- a/3rdparty/protobuf/CMakeLists.txt +++ b/3rdparty/protobuf/CMakeLists.txt @@ -27,6 +27,8 @@ else() -Wimplicit-fallthrough -Warray-bounds # GCC 9+ -Wstringop-overflow -Wstringop-overread # GCC 11-12 + -Wextra-semi # clang + -Wcomma # clang ) endif() if(CV_ICC) diff --git a/modules/calib3d/perf/perf_stereosgbm.cpp b/modules/calib3d/perf/perf_stereosgbm.cpp index 8ae477748a..0ae3735565 100644 --- a/modules/calib3d/perf/perf_stereosgbm.cpp +++ b/modules/calib3d/perf/perf_stereosgbm.cpp @@ -43,7 +43,7 @@ using namespace testing; static void MakeArtificialExample(Mat& dst_left_view, Mat& dst_view); -CV_ENUM(SGBMModes, StereoSGBM::MODE_SGBM, StereoSGBM::MODE_SGBM_3WAY, StereoSGBM::MODE_HH4); +CV_ENUM(SGBMModes, StereoSGBM::MODE_SGBM, StereoSGBM::MODE_SGBM_3WAY, StereoSGBM::MODE_HH4) typedef tuple SGBMParams; typedef TestBaseWithParam TestStereoCorrespSGBM; diff --git a/modules/calib3d/src/chessboard.hpp b/modules/calib3d/src/chessboard.hpp index f49b83572f..80519d15a5 100644 --- a/modules/calib3d/src/chessboard.hpp +++ b/modules/calib3d/src/chessboard.hpp @@ -203,12 +203,12 @@ class Chessboard: public cv::Feature2D * d12/d34 = d13/d24 * * point order on the line: - * pt1 --> pt2 --> pt3 --> pt4 + * p0 --> p1 --> p2 --> p3 * - * \param[in] pt1 First point coordinate - * \param[in] pt2 Second point coordinate - * \param[in] pt3 Third point coordinate - * \param[out] pt4 Forth point coordinate + * \param[in] p0 First point coordinate + * \param[in] p1 Second point coordinate + * \param[in] p2 Third point coordinate + * \param[out] p3 Forth point coordinate * */ static bool estimatePoint(const cv::Point2f &p0,const cv::Point2f &p1,const cv::Point2f &p2,cv::Point2f &p3); @@ -309,7 +309,7 @@ class Chessboard: public cv::Feature2D * \brief Draws the corners into the given image * * \param[in] m The image - * \param[out] m The resulting image + * \param[out] out The resulting image * \param[in] H optional homography to calculate search area * */ @@ -668,7 +668,7 @@ class Chessboard: public cv::Feature2D * \brief Calculates the average edge sharpness for the chessboard * * \param[in] image The image where the chessboard was detected - * \param[in] rise_distante Rise distance 0.8 means 10% ... 90% + * \param[in] rise_distance Rise distance 0.8 means 10% ... 90% * \param[in] vertical by default only edge response for horiontal lines are calculated * * \returns Scalar(sharpness, average min_val, average max_val) diff --git a/modules/calib3d/src/fundam.cpp b/modules/calib3d/src/fundam.cpp index 8e07efa26d..ed48645a4d 100644 --- a/modules/calib3d/src/fundam.cpp +++ b/modules/calib3d/src/fundam.cpp @@ -113,7 +113,7 @@ public: * 2 columns 1 channel * @param _m2 destination points containing (x,y), depth is CV_32F with 1 column 2 channels or * 2 columns 1 channel - * @param _model, CV_64FC1, 3x3, normalized, i.e., the last element is 1 + * @param _model CV_64FC1, 3x3, normalized, i.e., the last element is 1 */ int runKernel( InputArray _m1, InputArray _m2, OutputArray _model ) const CV_OVERRIDE { @@ -188,7 +188,7 @@ public: * @param _m1 depth CV_32F, 1-channel with 2 columns or 2-channel with 1 column * @param _m2 depth CV_32F, 1-channel with 2 columns or 2-channel with 1 column * @param _model CV_64FC1, 3x3 - * @param _err, output, CV_32FC1, square of the L2 norm + * @param _err output, CV_32FC1, square of the L2 norm */ void computeError( InputArray _m1, InputArray _m2, InputArray _model, OutputArray _err ) const CV_OVERRIDE { diff --git a/modules/calib3d/src/ippe.hpp b/modules/calib3d/src/ippe.hpp index 986210b187..c1d4dd2a21 100644 --- a/modules/calib3d/src/ippe.hpp +++ b/modules/calib3d/src/ippe.hpp @@ -111,7 +111,7 @@ private: /** * @brief Computes the translation solution for a given rotation solution * @param objectPoints Array of corresponding object points, 1xN/Nx1 3-channel where N is the number of points - * @param normalizedImagePoints Array of corresponding image points (undistorted), 1xN/Nx1 2-channel where N is the number of points + * @param normalizedImgPoints Array of corresponding image points (undistorted), 1xN/Nx1 2-channel where N is the number of points * @param R Rotation solution (3x1 rotation vector) * @param t Translation solution (3x1 rotation vector) */ @@ -220,10 +220,10 @@ private: /** * @brief Computes the average depth of an object given its pose in camera coordinates - * @param objectPoints: Object points defined in 3D object space - * @param rvec: Rotation component of pose - * @param tvec: Translation component of pose - * @return: average depth of the object + * @param objectPoints Object points defined in 3D object space + * @param rvec Rotation component of pose + * @param tvec Translation component of pose + * @return average depth of the object */ double meanSceneDepth(InputArray objectPoints, InputArray rvec, InputArray tvec); diff --git a/modules/calib3d/src/p3p.cpp b/modules/calib3d/src/p3p.cpp index 01b1734db8..9a7e96cca2 100644 --- a/modules/calib3d/src/p3p.cpp +++ b/modules/calib3d/src/p3p.cpp @@ -214,8 +214,8 @@ int p3p::solve(double R[4][3][3], double t[4][3], /// Only the solution to the main branch. /// Reference : X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang; "Complete Solution Classification for the Perspective-Three-Point Problem" /// IEEE Trans. on PAMI, vol. 25, No. 8, August 2003 -/// \param lengths3D Lengths of line segments up to four solutions. -/// \param dist3D Distance between 3D points in pairs |BC|, |AC|, |AB|. +/// \param lengths Lengths of line segments up to four solutions. +/// \param distances Distance between 3D points in pairs |BC|, |AC|, |AB|. /// \param cosines Cosine of the angles /_BPC, /_APC, /_APB. /// \returns Number of solutions. /// WARNING: NOT ALL THE DEGENERATE CASES ARE IMPLEMENTED diff --git a/modules/calib3d/src/precomp.hpp b/modules/calib3d/src/precomp.hpp index 610deebfa9..8f598d6709 100644 --- a/modules/calib3d/src/precomp.hpp +++ b/modules/calib3d/src/precomp.hpp @@ -69,7 +69,7 @@ namespace cv * @param ep outlier ratio * @param modelPoints number of model points required for estimation * @param maxIters maximum number of iterations - * @return + * @return The number of iterations according to the formula * \f[ * \frac{\ln(1-p)}{\ln\left(1-(1-ep)^\mathrm{modelPoints}\right)} * \f] diff --git a/modules/calib3d/src/rho.cpp b/modules/calib3d/src/rho.cpp index 341b6b9063..6edb3b8272 100644 --- a/modules/calib3d/src/rho.cpp +++ b/modules/calib3d/src/rho.cpp @@ -490,7 +490,7 @@ void rhoSeed(Ptr p, uint64_t seed){ * Estimates the homography using the given context, matches and parameters to * PROSAC. * - * @param [in/out] p The context to use for homography estimation. Must + * @param [in,out] p The context to use for homography estimation. Must * be already initialized. Cannot be NULL. * @param [in] src The pointer to the source points of the matches. * Must be aligned to 4 bytes. Cannot be NULL. diff --git a/modules/calib3d/src/rho.h b/modules/calib3d/src/rho.h index a8211161af..0410cc0925 100644 --- a/modules/calib3d/src/rho.h +++ b/modules/calib3d/src/rho.h @@ -215,7 +215,7 @@ void rhoSeed(Ptr p, uint64_t seed); * homography with at least the minimum required support, and 0 if it was not. * * - * @param [in/out] p The context to use for homography estimation. Must + * @param [in,out] p The context to use for homography estimation. Must * be already initialized. Cannot be NULL. * @param [in] src The pointer to the source points of the matches. * Must be aligned to 4 bytes. Cannot be NULL. diff --git a/modules/core/include/opencv2/core/dualquaternion.inl.hpp b/modules/core/include/opencv2/core/dualquaternion.inl.hpp index 6abb15924b..1a68f12d30 100644 --- a/modules/core/include/opencv2/core/dualquaternion.inl.hpp +++ b/modules/core/include/opencv2/core/dualquaternion.inl.hpp @@ -36,15 +36,15 @@ namespace cv { template -DualQuat::DualQuat():w(0), x(0), y(0), z(0), w_(0), x_(0), y_(0), z_(0){}; +DualQuat::DualQuat():w(0), x(0), y(0), z(0), w_(0), x_(0), y_(0), z_(0){} template DualQuat::DualQuat(const T vw, const T vx, const T vy, const T vz, const T _w, const T _x, const T _y, const T _z): - w(vw), x(vx), y(vy), z(vz), w_(_w), x_(_x), y_(_y), z_(_z){}; + w(vw), x(vx), y(vy), z(vz), w_(_w), x_(_x), y_(_y), z_(_z){} template DualQuat::DualQuat(const Vec &q):w(q[0]), x(q[1]), y(q[2]), z(q[3]), - w_(q[4]), x_(q[5]), y_(q[6]), z_(q[7]){}; + w_(q[4]), x_(q[5]), y_(q[6]), z_(q[7]){} template DualQuat DualQuat::createFromQuat(const Quat &realPart, const Quat &dualPart) diff --git a/modules/core/include/opencv2/core/hal/intrin_forward.hpp b/modules/core/include/opencv2/core/hal/intrin_forward.hpp index 979f15a277..28f67cc9ef 100644 --- a/modules/core/include/opencv2/core/hal/intrin_forward.hpp +++ b/modules/core/include/opencv2/core/hal/intrin_forward.hpp @@ -188,4 +188,4 @@ CV_CPU_OPTIMIZATION_HAL_NAMESPACE_END //! @endcond -} // cv:: \ No newline at end of file +} // cv:: diff --git a/modules/core/include/opencv2/core/matx.hpp b/modules/core/include/opencv2/core/matx.hpp index 686ff5d99b..d67168518f 100644 --- a/modules/core/include/opencv2/core/matx.hpp +++ b/modules/core/include/opencv2/core/matx.hpp @@ -215,7 +215,7 @@ public: template Matx(const Matx<_Tp, m, l>& a, const Matx<_Tp, l, n>& b, Matx_MatMulOp); Matx(const Matx<_Tp, n, m>& a, Matx_TOp); - _Tp val[m*n]; //< matrix elements + _Tp val[m*n]; ///< matrix elements }; typedef Matx Matx12f; diff --git a/modules/core/include/opencv2/core/ocl.hpp b/modules/core/include/opencv2/core/ocl.hpp index ade972973b..0000343fa7 100644 --- a/modules/core/include/opencv2/core/ocl.hpp +++ b/modules/core/include/opencv2/core/ocl.hpp @@ -779,7 +779,7 @@ public: void start(); void stop(); - uint64 durationNS() const; //< duration in nanoseconds + uint64 durationNS() const; ///< duration in nanoseconds protected: struct Impl; diff --git a/modules/core/include/opencv2/core/types.hpp b/modules/core/include/opencv2/core/types.hpp index 844d8f8950..8a0886f2c8 100644 --- a/modules/core/include/opencv2/core/types.hpp +++ b/modules/core/include/opencv2/core/types.hpp @@ -89,7 +89,7 @@ public: //! conjugation Complex conj() const; - _Tp re, im; //< the real and the imaginary parts + _Tp re, im; ///< the real and the imaginary parts }; typedef Complex Complexf; @@ -2031,8 +2031,8 @@ double jaccardDistance(const Rect_<_Tp>& a, const Rect_<_Tp>& b) { /** @brief Finds out if there is any intersection between two rectangles * * mainly useful for language bindings - * @param rect1 First rectangle - * @param rect2 Second rectangle + * @param a First rectangle + * @param b Second rectangle * @return the area of the intersection */ CV_EXPORTS_W inline double rectangleIntersectionArea(const Rect2d& a, const Rect2d& b) { return (a & b).area(); } diff --git a/modules/core/include/opencv2/core/utils/filesystem.private.hpp b/modules/core/include/opencv2/core/utils/filesystem.private.hpp index 70df64f0d4..c6bd5b316a 100644 --- a/modules/core/include/opencv2/core/utils/filesystem.private.hpp +++ b/modules/core/include/opencv2/core/utils/filesystem.private.hpp @@ -47,11 +47,11 @@ public: explicit FileLock(const char* fname); ~FileLock(); - void lock(); //< acquire exclusive (writer) lock - void unlock(); //< release exclusive (writer) lock + void lock(); ///< acquire exclusive (writer) lock + void unlock(); ///< release exclusive (writer) lock - void lock_shared(); //< acquire shareable (reader) lock - void unlock_shared(); //< release shareable (reader) lock + void lock_shared(); ///< acquire shareable (reader) lock + void unlock_shared(); ///< release shareable (reader) lock struct Impl; protected: diff --git a/modules/core/include/opencv2/core/utils/trace.hpp b/modules/core/include/opencv2/core/utils/trace.hpp index ef5d35b4f2..ea43bbeea1 100644 --- a/modules/core/include/opencv2/core/utils/trace.hpp +++ b/modules/core/include/opencv2/core/utils/trace.hpp @@ -70,11 +70,11 @@ public: struct LocationExtraData; struct LocationStaticStorage { - LocationExtraData** ppExtra; //< implementation specific data - const char* name; //< region name (function name or other custom name) - const char* filename; //< source code filename - int line; //< source code line - int flags; //< flags (implementation code path: Plain, IPP, OpenCL) + LocationExtraData** ppExtra; ///< implementation specific data + const char* name; ///< region name (function name or other custom name) + const char* filename; ///< source code filename + int line; ///< source code line + int flags; ///< flags (implementation code path: Plain, IPP, OpenCL) }; Region(const LocationStaticStorage& location); @@ -100,18 +100,18 @@ private: //! Specify region flags enum RegionLocationFlag { - REGION_FLAG_FUNCTION = (1 << 0), //< region is function (=1) / nested named region (=0) - REGION_FLAG_APP_CODE = (1 << 1), //< region is Application code (=1) / OpenCV library code (=0) - REGION_FLAG_SKIP_NESTED = (1 << 2), //< avoid processing of nested regions + REGION_FLAG_FUNCTION = (1 << 0), ///< region is function (=1) / nested named region (=0) + REGION_FLAG_APP_CODE = (1 << 1), ///< region is Application code (=1) / OpenCV library code (=0) + REGION_FLAG_SKIP_NESTED = (1 << 2), ///< avoid processing of nested regions - REGION_FLAG_IMPL_IPP = (1 << 16), //< region is part of IPP code path - REGION_FLAG_IMPL_OPENCL = (2 << 16), //< region is part of OpenCL code path - REGION_FLAG_IMPL_OPENVX = (3 << 16), //< region is part of OpenVX code path + REGION_FLAG_IMPL_IPP = (1 << 16), ///< region is part of IPP code path + REGION_FLAG_IMPL_OPENCL = (2 << 16), ///< region is part of OpenCL code path + REGION_FLAG_IMPL_OPENVX = (3 << 16), ///< region is part of OpenVX code path REGION_FLAG_IMPL_MASK = (15 << 16), REGION_FLAG_REGION_FORCE = (1 << 30), - REGION_FLAG_REGION_NEXT = (1 << 31), //< close previous region (see #CV_TRACE_REGION_NEXT macro) + REGION_FLAG_REGION_NEXT = (1 << 31), ///< close previous region (see #CV_TRACE_REGION_NEXT macro) ENUM_REGION_FLAG_FORCE_INT = INT_MAX }; diff --git a/modules/core/misc/python/pyopencv_async.hpp b/modules/core/misc/python/pyopencv_async.hpp index 6a8e73526e..625365ac50 100644 --- a/modules/core/misc/python/pyopencv_async.hpp +++ b/modules/core/misc/python/pyopencv_async.hpp @@ -2,7 +2,7 @@ #include "opencv2/core/async.hpp" -CV_PY_TO_CLASS(AsyncArray); -CV_PY_FROM_CLASS(AsyncArray); +CV_PY_TO_CLASS(AsyncArray) +CV_PY_FROM_CLASS(AsyncArray) #endif diff --git a/modules/core/misc/python/pyopencv_cuda.hpp b/modules/core/misc/python/pyopencv_cuda.hpp index 5be4977ca0..a424498f27 100644 --- a/modules/core/misc/python/pyopencv_cuda.hpp +++ b/modules/core/misc/python/pyopencv_cuda.hpp @@ -20,18 +20,18 @@ template<> struct pyopencvVecConverter } }; -CV_PY_TO_CLASS(cuda::GpuMat); -CV_PY_TO_CLASS(cuda::Stream); -CV_PY_TO_CLASS(cuda::Event); -CV_PY_TO_CLASS(cuda::HostMem); +CV_PY_TO_CLASS(cuda::GpuMat) +CV_PY_TO_CLASS(cuda::Stream) +CV_PY_TO_CLASS(cuda::Event) +CV_PY_TO_CLASS(cuda::HostMem) -CV_PY_TO_CLASS_PTR(cuda::GpuMat); -CV_PY_TO_CLASS_PTR(cuda::GpuMat::Allocator); +CV_PY_TO_CLASS_PTR(cuda::GpuMat) +CV_PY_TO_CLASS_PTR(cuda::GpuMat::Allocator) -CV_PY_FROM_CLASS(cuda::GpuMat); -CV_PY_FROM_CLASS(cuda::Stream); -CV_PY_FROM_CLASS(cuda::HostMem); +CV_PY_FROM_CLASS(cuda::GpuMat) +CV_PY_FROM_CLASS(cuda::Stream) +CV_PY_FROM_CLASS(cuda::HostMem) -CV_PY_FROM_CLASS_PTR(cuda::GpuMat::Allocator); +CV_PY_FROM_CLASS_PTR(cuda::GpuMat::Allocator) #endif diff --git a/modules/core/misc/python/pyopencv_umat.hpp b/modules/core/misc/python/pyopencv_umat.hpp index 697adaf202..63f002503b 100644 --- a/modules/core/misc/python/pyopencv_umat.hpp +++ b/modules/core/misc/python/pyopencv_umat.hpp @@ -4,8 +4,8 @@ typedef std::vector vector_Range; -CV_PY_TO_CLASS(UMat); -CV_PY_FROM_CLASS(UMat); +CV_PY_TO_CLASS(UMat) +CV_PY_FROM_CLASS(UMat) static bool cv_mappable_to(const Ptr& src, Ptr& dst) { diff --git a/modules/core/perf/perf_allocation.cpp b/modules/core/perf/perf_allocation.cpp index 2f3bf3eaa7..237a8dc1a3 100755 --- a/modules/core/perf/perf_allocation.cpp +++ b/modules/core/perf/perf_allocation.cpp @@ -45,4 +45,4 @@ PERF_TEST_P(MatDepth_tb, DISABLED_Allocation_Aligned, SANITY_CHECK_NOTHING(); } -}; +} diff --git a/modules/core/src/alloc.cpp b/modules/core/src/alloc.cpp index a0def9db2e..cb2db71e2c 100644 --- a/modules/core/src/alloc.cpp +++ b/modules/core/src/alloc.cpp @@ -53,7 +53,6 @@ #undef CV__ALLOCATOR_STATS_LOG //#define OPENCV_ALLOC_ENABLE_STATISTICS -#define OPENCV_ALLOC_STATISTICS_LIMIT 4096 // don't track buffers less than N bytes #ifdef HAVE_POSIX_MEMALIGN @@ -63,6 +62,7 @@ #endif #ifdef OPENCV_ALLOC_ENABLE_STATISTICS +#define OPENCV_ALLOC_STATISTICS_LIMIT 4096 // don't track buffers less than N bytes #include #endif diff --git a/modules/core/src/arithm.dispatch.cpp b/modules/core/src/arithm.dispatch.cpp index 1cbceaee29..b6a854379d 100644 --- a/modules/core/src/arithm.dispatch.cpp +++ b/modules/core/src/arithm.dispatch.cpp @@ -8,4 +8,4 @@ #include "arithm.simd_declarations.hpp" #define ARITHM_DISPATCHING_ONLY -#include "arithm.simd.hpp" \ No newline at end of file +#include "arithm.simd.hpp" diff --git a/modules/core/src/arithm_ipp.hpp b/modules/core/src/arithm_ipp.hpp index 4aa7d006e4..ed722113a7 100644 --- a/modules/core/src/arithm_ipp.hpp +++ b/modules/core/src/arithm_ipp.hpp @@ -414,4 +414,4 @@ inline int arithm_ipp_mul32f(const float *src1, size_t step1, const float *src2, #if !ARITHM_USE_IPP #define ARITHM_CALL_IPP(...) -#endif \ No newline at end of file +#endif diff --git a/modules/core/src/dxt.cpp b/modules/core/src/dxt.cpp index dbf5a52c17..6dca818b1c 100644 --- a/modules/core/src/dxt.cpp +++ b/modules/core/src/dxt.cpp @@ -64,8 +64,6 @@ namespace cv Discrete Fourier Transform \****************************************************************************************/ -#define CV_MAX_LOCAL_DFT_SIZE (1 << 15) - static unsigned char bitrevTab[] = { 0x00,0x80,0x40,0xc0,0x20,0xa0,0x60,0xe0,0x10,0x90,0x50,0xd0,0x30,0xb0,0x70,0xf0, diff --git a/modules/core/src/hal_replacement.hpp b/modules/core/src/hal_replacement.hpp index 7e0902063e..1f2b259920 100644 --- a/modules/core/src/hal_replacement.hpp +++ b/modules/core/src/hal_replacement.hpp @@ -69,10 +69,14 @@ /** Add: _dst[i] = src1[i] + src2[i]_ @n Sub: _dst[i] = src1[i] - src2[i]_ -@param src1_data,src1_step first source image data and step -@param src2_data,src2_step second source image data and step -@param dst_data,dst_step destination image data and step -@param width,height dimensions of the images +@param src1_data first source image data +@param src1_step first source image step +@param src2_data second source image data +@param src2_step second source image step +@param dst_data destination image data +@param dst_step destination image step +@param width width of the images +@param height height of the images */ //! @addtogroup core_hal_interface_addsub Element-wise add and subtract //! @{ @@ -96,10 +100,14 @@ inline int hal_ni_sub64f(const double *src1_data, size_t src1_step, const double /** Minimum: _dst[i] = min(src1[i], src2[i])_ @n Maximum: _dst[i] = max(src1[i], src2[i])_ -@param src1_data,src1_step first source image data and step -@param src2_data,src2_step second source image data and step -@param dst_data,dst_step destination image data and step -@param width,height dimensions of the images +@param src1_data first source image data +@param src1_step first source image step +@param src2_data second source image data +@param src2_step second source image step +@param dst_data destination image data +@param dst_step destination image step +@param width width of the images +@param height height of the images */ //! @addtogroup core_hal_interface_minmax Element-wise minimum or maximum //! @{ @@ -122,11 +130,14 @@ inline int hal_ni_min64f(const double *src1_data, size_t src1_step, const double /** Absolute difference: _dst[i] = | src1[i] - src2[i] |_ -@param src1_data,src1_step first source image data and step -@param src2_data,src2_step second source image data and step -@param dst_data,dst_step destination image data and step -@param width,height dimensions of the images -@param scale additional multiplier +@param src1_data first source image data +@param src1_step first source image step +@param src2_data second source image data +@param src2_step second source image step +@param dst_data destination image data +@param dst_step destination image step +@param width width of the images +@param height height of the images */ //! @addtogroup core_hal_interface_absdiff Element-wise absolute difference //! @{ @@ -144,10 +155,14 @@ Bitwise AND: _dst[i] = src1[i] & src2[i]_ @n Bitwise OR: _dst[i] = src1[i] | src2[i]_ @n Bitwise XOR: _dst[i] = src1[i] ^ src2[i]_ @n Bitwise NOT: _dst[i] = !src[i]_ -@param src1_data,src1_step first source image data and step -@param src2_data,src2_step second source image data and step -@param dst_data,dst_step destination image data and step -@param width,height dimensions of the images +@param src1_data first source image data +@param src1_step first source image step +@param src2_data second source image data +@param src2_step second source image step +@param dst_data destination image data +@param dst_step destination image step +@param width width of the images +@param height height of the images */ //! @addtogroup core_hal_interface_logical Bitwise logical operations //! @{ @@ -201,10 +216,14 @@ inline int hal_ni_not8u(const uchar *src_data, size_t src_step, uchar *dst_data, /** Compare: _dst[i] = src1[i] op src2[i]_ -@param src1_data,src1_step first source image data and step -@param src2_data,src2_step second source image data and step -@param dst_data,dst_step destination image data and step -@param width,height dimensions of the images +@param src1_data first source image data +@param src1_step first source image step +@param src2_data second source image data +@param src2_step second source image step +@param dst_data destination image data +@param dst_step destination image step +@param width width of the images +@param height height of the images @param operation one of (CV_HAL_CMP_EQ, CV_HAL_CMP_GT, ...) */ //! @addtogroup core_hal_interface_compare Element-wise compare @@ -230,10 +249,14 @@ inline int hal_ni_cmp64f(const double *src1_data, size_t src1_step, const double /** Multiply: _dst[i] = scale * src1[i] * src2[i]_ -@param src1_data,src1_step first source image data and step -@param src2_data,src2_step second source image data and step -@param dst_data,dst_step destination image data and step -@param width,height dimensions of the images +@param src1_data first source image data +@param src1_step first source image step +@param src2_data second source image data +@param src2_step second source image step +@param dst_data destination image data +@param dst_step destination image step +@param width width of the images +@param height height of the images @param scale additional multiplier */ //! @addtogroup core_hal_interface_multiply Element-wise multiply @@ -249,10 +272,14 @@ inline int hal_ni_mul64f(const double *src1_data, size_t src1_step, const double /** Divide: _dst[i] = scale * src1[i] / src2[i]_ -@param src1_data,src1_step first source image data and step -@param src2_data,src2_step second source image data and step -@param dst_data,dst_step destination image data and step -@param width,height dimensions of the images +@param src1_data first source image data and step +@param src1_step first source image data and step +@param src2_data second source image data and step +@param src2_step second source image data and step +@param dst_data destination image data and step +@param dst_step destination image data and step +@param width dimensions of the images +@param height dimensions of the images @param scale additional multiplier */ //! @addtogroup core_hal_interface_divide Element-wise divide @@ -268,9 +295,12 @@ inline int hal_ni_div64f(const double *src1_data, size_t src1_step, const double /** Computes reciprocial: _dst[i] = scale / src[i]_ -@param src_data,src_step source image data and step -@param dst_data,dst_step destination image data and step -@param width,height dimensions of the images +@param src_data source image data +@param src_step source image step +@param dst_data destination image data +@param dst_step destination image step +@param width width of the images +@param height height of the images @param scale additional multiplier */ //! @addtogroup core_hal_interface_reciprocial Element-wise reciprocial @@ -310,10 +340,14 @@ inline int hal_ni_recip64f(const double *src_data, size_t src_step, double *dst_ /** Computes weighted sum of two arrays using formula: _dst[i] = a * src1[i] + b * src2[i] + c_ -@param src1_data,src1_step first source image data and step -@param src2_data,src2_step second source image data and step -@param dst_data,dst_step destination image data and step -@param width,height dimensions of the images +@param src1_data first source image data +@param src1_step first source image step +@param src2_data second source image data +@param src2_step second source image step +@param dst_data destination image data +@param dst_step destination image step +@param width width of the images +@param height height of the images @param scalars numbers _a_, _b_, and _c_ */ //! @addtogroup core_hal_interface_addWeighted Element-wise weighted sum @@ -381,7 +415,8 @@ inline int hal_ni_merge64s(const int64 **src_data, int64 *dst_data, int len, int /** -@param y,x source Y and X arrays +@param y source Y arrays +@param x source X arrays @param dst destination array @param len length of arrays @param angleInDegrees if set to true return angles in degrees, otherwise in radians @@ -399,7 +434,8 @@ inline int hal_ni_fastAtan64f(const double* y, const double* x, double* dst, int /** -@param x,y source X and Y arrays +@param x source X array +@param y source Y array @param dst destination array @param len length of arrays */ @@ -530,7 +566,8 @@ inline int hal_ni_dftFree1D(cvhalDFT *context) { return CV_HAL_ERROR_NOT_IMPLEME /** @param context double pointer to context storing all necessary data -@param width,height image dimensions +@param width image width +@param height image height @param depth image type (CV_32F or CV_64F) @param src_channels number of channels in input image @param dst_channels number of channels in output image @@ -540,8 +577,10 @@ inline int hal_ni_dftFree1D(cvhalDFT *context) { return CV_HAL_ERROR_NOT_IMPLEME inline int hal_ni_dftInit2D(cvhalDFT **context, int width, int height, int depth, int src_channels, int dst_channels, int flags, int nonzero_rows) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } /** @param context pointer to context storing all necessary data -@param src_data,src_step source image data and step -@param dst_data,dst_step destination image data and step +@param src_data source image data +@param src_step source image step +@param dst_data destination image data +@param dst_step destination image step */ inline int hal_ni_dft2D(cvhalDFT *context, const uchar *src_data, size_t src_step, uchar *dst_data, size_t dst_step) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } /** @@ -557,15 +596,18 @@ inline int hal_ni_dftFree2D(cvhalDFT *context) { return CV_HAL_ERROR_NOT_IMPLEME /** @param context double pointer to context storing all necessary data -@param width,height image dimensions +@param width image width +@param height image height @param depth image type (CV_32F or CV_64F) @param flags algorithm options (combination of CV_HAL_DFT_INVERSE, ...) */ inline int hal_ni_dctInit2D(cvhalDFT **context, int width, int height, int depth, int flags) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } /** @param context pointer to context storing all necessary data -@param src_data,src_step source image data and step -@param dst_data,dst_step destination image data and step +@param src_data source image data +@param src_step source image step +@param dst_data destination image data +@param dst_step destination image step */ inline int hal_ni_dct2D(cvhalDFT *context, const uchar *src_data, size_t src_step, uchar *dst_data, size_t dst_step) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } /** @@ -717,11 +759,15 @@ inline int hal_ni_gemm64fc(const double* src1, size_t src1_step, const double* s /** @brief Finds the global minimum and maximum in an array. - @param src_data,src_step Source image - @param width,height Source image dimensions + @param src_data Source image + @param src_step Source image + @param width Source image dimensions + @param height Source image dimensions @param depth Depth of source image - @param minVal,maxVal Pointer to the returned global minimum and maximum in an array. - @param minIdx,maxIdx Pointer to the returned minimum and maximum location. + @param minVal Pointer to the returned global minimum and maximum in an array. + @param maxVal Pointer to the returned global minimum and maximum in an array. + @param minIdx Pointer to the returned minimum and maximum location. + @param maxIdx Pointer to the returned minimum and maximum location. @param mask Specified array region. */ inline int hal_ni_minMaxIdx(const uchar* src_data, size_t src_step, int width, int height, int depth, double* minVal, double* maxVal, diff --git a/modules/core/src/minmax.cpp b/modules/core/src/minmax.cpp index bf2471a076..3a5be11a37 100644 --- a/modules/core/src/minmax.cpp +++ b/modules/core/src/minmax.cpp @@ -1545,9 +1545,9 @@ void cv::minMaxIdx(InputArray _src, double* minVal, if (!src.empty() && mask.empty()) { if( minidx == 0 ) - minidx = 1; - if( maxidx == 0 ) - maxidx = 1; + minidx = 1; + if( maxidx == 0 ) + maxidx = 1; } if( minidx == 0 ) diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp index 2b7a75cd4f..4525928b94 100644 --- a/modules/core/src/parallel.cpp +++ b/modules/core/src/parallel.cpp @@ -791,7 +791,7 @@ int getThreadNum() return 0; #endif #elif defined HAVE_HPX - return (int)(hpx::get_num_worker_threads()); + return (int)(hpx::get_num_worker_threads()); #elif defined HAVE_OPENMP return omp_get_thread_num(); #elif defined HAVE_GCD diff --git a/modules/core/src/persistence_base64_encoding.cpp b/modules/core/src/persistence_base64_encoding.cpp index 7d90fd422b..3fce79c080 100644 --- a/modules/core/src/persistence_base64_encoding.cpp +++ b/modules/core/src/persistence_base64_encoding.cpp @@ -367,4 +367,4 @@ size_t base64::RawDataToBinaryConvertor::make_to_binary_funcs(const std::string return offset_packed; } -} \ No newline at end of file +} diff --git a/modules/core/src/persistence_base64_encoding.hpp b/modules/core/src/persistence_base64_encoding.hpp index 1ee5201e14..8b66e94095 100644 --- a/modules/core/src/persistence_base64_encoding.hpp +++ b/modules/core/src/persistence_base64_encoding.hpp @@ -124,4 +124,4 @@ private: } } -#endif \ No newline at end of file +#endif diff --git a/modules/core/src/softfloat.cpp b/modules/core/src/softfloat.cpp index a876ee14e2..b5ac5d7dc5 100644 --- a/modules/core/src/softfloat.cpp +++ b/modules/core/src/softfloat.cpp @@ -306,9 +306,6 @@ softdouble cos(const softdouble& a) { return f64_cos(a); } | The values to return on conversions to 32-bit integer formats that raise an | invalid exception. *----------------------------------------------------------------------------*/ -#define ui32_fromPosOverflow 0xFFFFFFFF -#define ui32_fromNegOverflow 0 -#define ui32_fromNaN 0xFFFFFFFF #define i32_fromPosOverflow 0x7FFFFFFF #define i32_fromNegOverflow (-0x7FFFFFFF - 1) #define i32_fromNaN 0x7FFFFFFF @@ -317,9 +314,6 @@ softdouble cos(const softdouble& a) { return f64_cos(a); } | The values to return on conversions to 64-bit integer formats that raise an | invalid exception. *----------------------------------------------------------------------------*/ -#define ui64_fromPosOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF ) -#define ui64_fromNegOverflow 0 -#define ui64_fromNaN UINT64_C( 0xFFFFFFFFFFFFFFFF ) #define i64_fromPosOverflow UINT64_C( 0x7FFFFFFFFFFFFFFF ) //fixed unsigned unary minus: -x == ~x + 1 //#define i64_fromNegOverflow (-UINT64_C( 0x7FFFFFFFFFFFFFFF ) - 1) @@ -422,34 +416,6 @@ struct uint64_extra { uint64_t v, extra; }; struct uint128_extra { struct uint128 v; uint64_t extra; }; #endif -/*---------------------------------------------------------------------------- -| These macros are used to isolate the differences in word order between big- -| endian and little-endian platforms. -*----------------------------------------------------------------------------*/ -#ifndef WORDS_BIGENDIAN -#define wordIncr 1 -#define indexWord( total, n ) (n) -#define indexWordHi( total ) ((total) - 1) -#define indexWordLo( total ) 0 -#define indexMultiword( total, m, n ) (n) -#define indexMultiwordHi( total, n ) ((total) - (n)) -#define indexMultiwordLo( total, n ) 0 -#define indexMultiwordHiBut( total, n ) (n) -#define indexMultiwordLoBut( total, n ) 0 -#define INIT_UINTM4( v3, v2, v1, v0 ) { v0, v1, v2, v3 } -#else -#define wordIncr -1 -#define indexWord( total, n ) ((total) - 1 - (n)) -#define indexWordHi( total ) 0 -#define indexWordLo( total ) ((total) - 1) -#define indexMultiword( total, m, n ) ((total) - 1 - (m)) -#define indexMultiwordHi( total, n ) 0 -#define indexMultiwordLo( total, n ) ((total) - (n)) -#define indexMultiwordHiBut( total, n ) 0 -#define indexMultiwordLoBut( total, n ) (n) -#define INIT_UINTM4( v3, v2, v1, v0 ) { v3, v2, v1, v0 } -#endif - enum { softfloat_mulAdd_subC = 1, softfloat_mulAdd_subProd = 2 diff --git a/modules/core/src/split.simd.hpp b/modules/core/src/split.simd.hpp index 88414161b8..109d759f24 100644 --- a/modules/core/src/split.simd.hpp +++ b/modules/core/src/split.simd.hpp @@ -220,4 +220,4 @@ void split64s(const int64* src, int64** dst, int len, int cn ) #endif CV_CPU_OPTIMIZATION_NAMESPACE_END -}} // namespace \ No newline at end of file +}} // namespace diff --git a/modules/core/test/test_arithm.cpp b/modules/core/test/test_arithm.cpp index 848a2e8b6a..f26e47bc03 100644 --- a/modules/core/test/test_arithm.cpp +++ b/modules/core/test/test_arithm.cpp @@ -648,7 +648,7 @@ static void inRangeS(const Mat& src, const Scalar& lb, const Scalar& rb, Mat& ds } } // namespace -CVTEST_GUARD_SYMBOL(inRange); +CVTEST_GUARD_SYMBOL(inRange) struct InRangeSOp : public BaseElemWiseOp { @@ -1178,7 +1178,7 @@ struct MeanOp : public BaseElemWiseOp MeanOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK+SCALAR_OUTPUT, 1, 1, Scalar::all(0)) { context = 3; - }; + } void op(const vector& src, Mat& dst, const Mat& mask) { dst.create(1, 1, CV_64FC4); @@ -1201,7 +1201,7 @@ struct SumOp : public BaseElemWiseOp SumOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SCALAR_OUTPUT, 1, 1, Scalar::all(0)) { context = 3; - }; + } void op(const vector& src, Mat& dst, const Mat&) { dst.create(1, 1, CV_64FC4); @@ -1261,7 +1261,7 @@ struct MeanStdDevOp : public BaseElemWiseOp { cn = 0; context = 7; - }; + } void op(const vector& src, Mat& dst, const Mat& mask) { dst.create(1, 2, CV_64FC4); @@ -1302,7 +1302,7 @@ struct NormOp : public BaseElemWiseOp { context = 1; normType = 0; - }; + } int getRandomType(RNG& rng) { int type = cvtest::randomType(rng, _OutputArray::DEPTH_MASK_ALL_BUT_8S, 1, 4); @@ -1348,7 +1348,7 @@ struct MinMaxLocOp : public BaseElemWiseOp MinMaxLocOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK+SCALAR_OUTPUT, 1, 1, Scalar::all(0)) { context = ARITHM_MAX_NDIMS*2 + 2; - }; + } int getRandomType(RNG& rng) { return cvtest::randomType(rng, _OutputArray::DEPTH_MASK_ALL_BUT_8S, 1, 1); @@ -1395,7 +1395,7 @@ struct reduceArgMinMaxOp : public BaseElemWiseOp isLast(false), isMax(false), axis(0) { context = ARITHM_MAX_NDIMS*2 + 2; - }; + } int getRandomType(RNG& rng) override { return cvtest::randomType(rng, _OutputArray::DEPTH_MASK_ALL_BUT_8S, 1, 1); diff --git a/modules/dnn/include/opencv2/dnn/all_layers.hpp b/modules/dnn/include/opencv2/dnn/all_layers.hpp index b00d3f54a6..587eda102f 100644 --- a/modules/dnn/include/opencv2/dnn/all_layers.hpp +++ b/modules/dnn/include/opencv2/dnn/all_layers.hpp @@ -588,11 +588,11 @@ CV__DNN_INLINE_NS_BEGIN { public: virtual void forwardSlice(const float* src, float* dst, int len, - size_t outPlaneSize, int cn0, int cn1) const {}; + size_t outPlaneSize, int cn0, int cn1) const {} virtual void forwardSlice(const int* src, const int* lut, int* dst, int len, - size_t outPlaneSize, int cn0, int cn1) const {}; + size_t outPlaneSize, int cn0, int cn1) const {} virtual void forwardSlice(const int8_t* src, const int8_t* lut, int8_t* dst, int len, - size_t outPlaneSize, int cn0, int cn1) const {}; + size_t outPlaneSize, int cn0, int cn1) const {} }; class CV_EXPORTS ReLULayer : public ActivationLayer diff --git a/modules/dnn/src/graph_simplifier.hpp b/modules/dnn/src/graph_simplifier.hpp index 39d6262c1b..22bc50e3e5 100644 --- a/modules/dnn/src/graph_simplifier.hpp +++ b/modules/dnn/src/graph_simplifier.hpp @@ -17,7 +17,7 @@ namespace cv { namespace dnn { class ImportNodeWrapper { public: - virtual ~ImportNodeWrapper() {}; + virtual ~ImportNodeWrapper() {} virtual int getNumInputs() const = 0; @@ -33,7 +33,7 @@ public: class ImportGraphWrapper { public: - virtual ~ImportGraphWrapper() {}; + virtual ~ImportGraphWrapper() {} virtual Ptr getNode(int idx) const = 0; diff --git a/modules/dnn/src/layers/convolution_layer.cpp b/modules/dnn/src/layers/convolution_layer.cpp index d6e0aba1c6..dd6fa7bc1d 100644 --- a/modules/dnn/src/layers/convolution_layer.cpp +++ b/modules/dnn/src/layers/convolution_layer.cpp @@ -242,8 +242,6 @@ public: }; -#define IS_POWER_LAYER(layer) \ - (!layer.empty() && !layer->type.compare("Power")) //TODO: simultaneously convolution and bias addition for cache optimization class ConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl { diff --git a/modules/dnn/src/layers/elementwise_layers.cpp b/modules/dnn/src/layers/elementwise_layers.cpp index 051622f69b..815bc2dda4 100644 --- a/modules/dnn/src/layers/elementwise_layers.cpp +++ b/modules/dnn/src/layers/elementwise_layers.cpp @@ -2768,11 +2768,6 @@ template<> const char* const ReciprocalFunctor::BaseDefaultFunctor::ocl_kernel_name = "ReciprocalForward"; -#define ACTIVATION_CREATOR_FOR(_Layer, _Functor, ...) \ -Ptr<_Layer> _Layer::create() { \ - return return Ptr<_Layer>( new ElementWiseLayer<_Functor>(_Functor()) ); } - - Ptr ReLULayer::create(const LayerParams& params) { float negativeSlope = params.get("negative_slope", 0.f); diff --git a/modules/dnn/src/legacy_backend.cpp b/modules/dnn/src/legacy_backend.cpp index b092fb057c..12ccdf6904 100644 --- a/modules/dnn/src/legacy_backend.cpp +++ b/modules/dnn/src/legacy_backend.cpp @@ -24,7 +24,7 @@ BackendNode::BackendNode(int backendId) : backendId(backendId) {} -BackendNode::~BackendNode() {}; +BackendNode::~BackendNode() {} BackendWrapper::BackendWrapper(int backendId, int targetId) : backendId(backendId) diff --git a/modules/dnn/src/model.cpp b/modules/dnn/src/model.cpp index 8d1a788956..64b2706d38 100644 --- a/modules/dnn/src/model.cpp +++ b/modules/dnn/src/model.cpp @@ -306,9 +306,9 @@ void ClassificationModel::classify(InputArray frame, int& classId, float& conf) } KeypointsModel::KeypointsModel(const String& model, const String& config) - : Model(model, config) {}; + : Model(model, config) {} -KeypointsModel::KeypointsModel(const Net& network) : Model(network) {}; +KeypointsModel::KeypointsModel(const Net& network) : Model(network) {} std::vector KeypointsModel::estimate(InputArray frame, float thresh) { @@ -364,9 +364,9 @@ std::vector KeypointsModel::estimate(InputArray frame, float thresh) } SegmentationModel::SegmentationModel(const String& model, const String& config) - : Model(model, config) {}; + : Model(model, config) {} -SegmentationModel::SegmentationModel(const Net& network) : Model(network) {}; +SegmentationModel::SegmentationModel(const Net& network) : Model(network) {} void SegmentationModel::segment(InputArray frame, OutputArray mask) { diff --git a/modules/dnn/src/onnx/onnx_importer.cpp b/modules/dnn/src/onnx/onnx_importer.cpp index c2585293b3..8cad34695f 100644 --- a/modules/dnn/src/onnx/onnx_importer.cpp +++ b/modules/dnn/src/onnx/onnx_importer.cpp @@ -1498,7 +1498,7 @@ void ONNXImporter::lstm_extractConsts(LayerParams& layerParams, const opencv_onn blob = Mat(blobShape, CV_32FC1, 0.); } layerParams.blobs.push_back(blob); -}; +} void ONNXImporter::lstm_add_reshape(const std::string& input_name, const std::string& output_name, int* layerShape, size_t n) { @@ -1513,7 +1513,7 @@ void ONNXImporter::lstm_add_reshape(const std::string& input_name, const std::st reshape_proto.add_input(input_name); reshape_proto.add_output(output_name); addLayer(reshapeLp, reshape_proto); -}; +} std::string ONNXImporter::lstm_add_slice(int index, const std::string& input_name, int* begin, int* end, size_t n) { @@ -1532,7 +1532,7 @@ std::string ONNXImporter::lstm_add_slice(int index, const std::string& input_nam addLayer(sliceLP, slice_proto); return slice_proto.output(0); -}; +} std::string ONNXImporter::lstm_fix_dims(LayerParams& layerParams, const opencv_onnx::NodeProto& lstm_proto, int batch_size, int num_directions, int hidden_size, bool need_y, const std::string& y_name, @@ -1560,7 +1560,7 @@ std::string ONNXImporter::lstm_fix_dims(LayerParams& layerParams, const opencv_o addLayer(permuteLP, permute_proto); return permute_proto.output(0); -}; +} void ONNXImporter::lstm_add_transform(int num_directions, int batch_size, int hidden_size, int index, const std::string& input_name, const std::string& output_name) @@ -1602,7 +1602,7 @@ void ONNXImporter::lstm_add_transform(int num_directions, int batch_size, int hi int layerShape[] = {2, batch_size, hidden_size}; lstm_add_reshape(concat_proto.output(0), output_name, layerShape, sizeof(layerShape) / sizeof(layerShape[0])); } -}; +} void ONNXImporter::parseLSTM(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto_) { diff --git a/modules/dnn/src/tensorflow/tf_importer.cpp b/modules/dnn/src/tensorflow/tf_importer.cpp index 756bdc949c..28744c586a 100644 --- a/modules/dnn/src/tensorflow/tf_importer.cpp +++ b/modules/dnn/src/tensorflow/tf_importer.cpp @@ -3227,7 +3227,7 @@ void TFLayerHandler::fillRegistry(const tensorflow::GraphDef& net) } } printMissing(); -}; +} bool TFLayerHandler::handleMissing(const tensorflow::NodeDef& layer) { diff --git a/modules/dnn/test/test_main.cpp b/modules/dnn/test/test_main.cpp index a0d876b087..b7b95d2485 100644 --- a/modules/dnn/test/test_main.cpp +++ b/modules/dnn/test/test_main.cpp @@ -4,4 +4,4 @@ #include #endif -CV_TEST_MAIN("", initDNNTests()); +CV_TEST_MAIN("", initDNNTests()) diff --git a/modules/dnn/test/test_onnx_conformance.cpp b/modules/dnn/test/test_onnx_conformance.cpp index b238427dfb..13c5c5b232 100644 --- a/modules/dnn/test/test_onnx_conformance.cpp +++ b/modules/dnn/test/test_onnx_conformance.cpp @@ -1257,4 +1257,4 @@ INSTANTIATE_TEST_CASE_P(/**/, Test_ONNX_conformance, printOnnxConfParams ); -}; +} diff --git a/modules/features2d/src/hal_replacement.hpp b/modules/features2d/src/hal_replacement.hpp index f9fbf96daa..6476d21651 100644 --- a/modules/features2d/src/hal_replacement.hpp +++ b/modules/features2d/src/hal_replacement.hpp @@ -64,9 +64,12 @@ //! @{ /** @brief Detects corners using the FAST algorithm, returns mask. - @param src_data,src_step Source image - @param dst_data,dst_step Destination mask - @param width,height Source image dimensions + @param src_data Source image data + @param src_step Source image step + @param dst_data Destination mask data + @param dst_step Destination mask step + @param width Source image width + @param height Source image height @param type FAST type */ inline int hal_ni_FAST_dense(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, cv::FastFeatureDetector::DetectorType type) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } @@ -89,8 +92,10 @@ inline int hal_ni_FAST_NMS(const uchar* src_data, size_t src_step, uchar* dst_da /** @brief Detects corners using the FAST algorithm. - @param src_data,src_step Source image - @param width,height Source image dimensions + @param src_data Source image data + @param src_step Source image step + @param width Source image width + @param height Source image height @param keypoints_data Pointer to keypoints @param keypoints_count Count of keypoints @param threshold Threshold for keypoint diff --git a/modules/features2d/src/kaze/nldiffusion_functions.cpp b/modules/features2d/src/kaze/nldiffusion_functions.cpp index 59939a2bbf..942b8d7875 100644 --- a/modules/features2d/src/kaze/nldiffusion_functions.cpp +++ b/modules/features2d/src/kaze/nldiffusion_functions.cpp @@ -86,9 +86,9 @@ void image_derivatives_scharr(const cv::Mat& src, cv::Mat& dst, int xorder, int /** * @brief This function computes the Perona and Malik conductivity coefficient g1 * g1 = exp(-|dL|^2/k^2) - * @param Lx First order image derivative in X-direction (horizontal) - * @param Ly First order image derivative in Y-direction (vertical) - * @param dst Output image + * @param _Lx First order image derivative in X-direction (horizontal) + * @param _Ly First order image derivative in Y-direction (vertical) + * @param _dst Output image * @param k Contrast factor parameter */ void pm_g1(InputArray _Lx, InputArray _Ly, OutputArray _dst, float k) { @@ -117,9 +117,9 @@ void pm_g1(InputArray _Lx, InputArray _Ly, OutputArray _dst, float k) { /** * @brief This function computes the Perona and Malik conductivity coefficient g2 * g2 = 1 / (1 + dL^2 / k^2) - * @param Lx First order image derivative in X-direction (horizontal) - * @param Ly First order image derivative in Y-direction (vertical) - * @param dst Output image + * @param _Lx First order image derivative in X-direction (horizontal) + * @param _Ly First order image derivative in Y-direction (vertical) + * @param _dst Output image * @param k Contrast factor parameter */ void pm_g2(InputArray _Lx, InputArray _Ly, OutputArray _dst, float k) { @@ -146,9 +146,9 @@ void pm_g2(InputArray _Lx, InputArray _Ly, OutputArray _dst, float k) { /* ************************************************************************* */ /** * @brief This function computes Weickert conductivity coefficient gw - * @param Lx First order image derivative in X-direction (horizontal) - * @param Ly First order image derivative in Y-direction (vertical) - * @param dst Output image + * @param _Lx First order image derivative in X-direction (horizontal) + * @param _Ly First order image derivative in Y-direction (vertical) + * @param _dst Output image * @param k Contrast factor parameter * @note For more information check the following paper: J. Weickert * Applications of nonlinear diffusion in image processing and computer vision, @@ -183,9 +183,9 @@ void weickert_diffusivity(InputArray _Lx, InputArray _Ly, OutputArray _dst, floa /** * @brief This function computes Charbonnier conductivity coefficient gc * gc = 1 / sqrt(1 + dL^2 / k^2) -* @param Lx First order image derivative in X-direction (horizontal) -* @param Ly First order image derivative in Y-direction (vertical) -* @param dst Output image +* @param _Lx First order image derivative in X-direction (horizontal) +* @param _Ly First order image derivative in Y-direction (vertical) +* @param _dst Output image * @param k Contrast factor parameter * @note For more information check the following paper: J. Weickert * Applications of nonlinear diffusion in image processing and computer vision, @@ -323,7 +323,7 @@ void compute_scharr_derivatives(const cv::Mat& src, cv::Mat& dst, int xorder, in * @param _ky Vertical kernel values * @param dx Derivative order in X-direction (horizontal) * @param dy Derivative order in Y-direction (vertical) - * @param scale_ Scale factor or derivative size + * @param scale Scale factor or derivative size */ void compute_derivative_kernels(cv::OutputArray _kx, cv::OutputArray _ky, int dx, int dy, int scale) { CV_INSTRUMENT_REGION(); @@ -415,7 +415,7 @@ private: /* ************************************************************************* */ /** * @brief This function performs a scalar non-linear diffusion step -* @param Ld2 Output image in the evolution +* @param Ld Output image in the evolution * @param c Conductivity image * @param Lstep Previous image in the evolution * @param stepsize The step size in time units @@ -490,7 +490,7 @@ void nld_step_scalar(cv::Mat& Ld, const cv::Mat& c, cv::Mat& Lstep, float stepsi /* ************************************************************************* */ /** * @brief This function downsamples the input image using OpenCV resize -* @param img Input image to be downsampled +* @param src Input image to be downsampled * @param dst Output image with half of the resolution of the input image */ void halfsample_image(const cv::Mat& src, cv::Mat& dst) { diff --git a/modules/features2d/src/kaze/utils.h b/modules/features2d/src/kaze/utils.h index 44e5b76935..6319943062 100644 --- a/modules/features2d/src/kaze/utils.h +++ b/modules/features2d/src/kaze/utils.h @@ -6,7 +6,7 @@ * @brief This function computes the value of a 2D Gaussian function * @param x X Position * @param y Y Position - * @param sig Standard Deviation + * @param sigma Standard Deviation */ inline float gaussian(float x, float y, float sigma) { return expf(-(x*x + y*y) / (2.0f*sigma*sigma)); diff --git a/modules/flann/include/opencv2/flann/composite_index.h b/modules/flann/include/opencv2/flann/composite_index.h index f1af41ac26..37a6223f88 100644 --- a/modules/flann/include/opencv2/flann/composite_index.h +++ b/modules/flann/include/opencv2/flann/composite_index.h @@ -80,7 +80,6 @@ public: * @param inputData dataset containing the points to index * @param params Index parameters * @param d Distance functor - * @return */ CompositeIndex(const Matrix& inputData, const IndexParams& params = CompositeIndexParams(), Distance d = Distance()) : index_params_(params) diff --git a/modules/flann/include/opencv2/flann/dynamic_bitset.h b/modules/flann/include/opencv2/flann/dynamic_bitset.h index a00ce1bb7e..676cb0b71e 100644 --- a/modules/flann/include/opencv2/flann/dynamic_bitset.h +++ b/modules/flann/include/opencv2/flann/dynamic_bitset.h @@ -97,7 +97,6 @@ public: } /** @brief set one bit to 0 - * @param index */ void reset(size_t index) { @@ -108,7 +107,6 @@ public: * This function is useful when resetting a given set of bits so that the * whole bitset ends up being 0: if that's the case, we don't care about setting * other bits to 0 - * @param index */ void reset_block(size_t index) { @@ -116,7 +114,6 @@ public: } /** resize the bitset so that it contains at least sz bits - * @param sz */ void resize(size_t sz) { diff --git a/modules/flann/include/opencv2/flann/logger.h b/modules/flann/include/opencv2/flann/logger.h index 8911812a77..31f9bbd77f 100644 --- a/modules/flann/include/opencv2/flann/logger.h +++ b/modules/flann/include/opencv2/flann/logger.h @@ -101,7 +101,6 @@ public: * Print log message * @param level Log level * @param fmt Message format - * @return */ static int log(int level, const char* fmt, ...) { diff --git a/modules/flann/include/opencv2/flann/lsh_table.h b/modules/flann/include/opencv2/flann/lsh_table.h index a189562d3a..3b8ffd4075 100644 --- a/modules/flann/include/opencv2/flann/lsh_table.h +++ b/modules/flann/include/opencv2/flann/lsh_table.h @@ -214,8 +214,6 @@ public: } /** Get a bucket given the key - * @param key - * @return */ inline const Bucket* getBucketFromKey(BucketKey key) const { @@ -253,7 +251,6 @@ public: } /** Get statistics about the table - * @return */ LshStats getStats() const; diff --git a/modules/flann/include/opencv2/flann/random.h b/modules/flann/include/opencv2/flann/random.h index 2c1809c3a9..5a12ef3046 100644 --- a/modules/flann/include/opencv2/flann/random.h +++ b/modules/flann/include/opencv2/flann/random.h @@ -106,7 +106,6 @@ public: /** * Constructor. * @param n Size of the interval from which to generate - * @return */ UniqueRandom(int n) { diff --git a/modules/flann/include/opencv2/flann/result_set.h b/modules/flann/include/opencv2/flann/result_set.h index c5d31e8ade..aa679df71c 100644 --- a/modules/flann/include/opencv2/flann/result_set.h +++ b/modules/flann/include/opencv2/flann/result_set.h @@ -360,7 +360,6 @@ public: } /** The number of neighbors in the set - * @return */ size_t size() const { @@ -369,7 +368,6 @@ public: /** The distance of the furthest neighbor * If we don't have enough neighbors, it returns the max possible value - * @return */ inline DistanceType worstDist() const CV_OVERRIDE { @@ -490,7 +488,6 @@ public: /** The distance of the furthest neighbor * If we don't have enough neighbors, it returns the max possible value - * @return */ inline DistanceType worstDist() const CV_OVERRIDE { diff --git a/modules/flann/src/flann.cpp b/modules/flann/src/flann.cpp index 388418f889..b7930c548a 100644 --- a/modules/flann/src/flann.cpp +++ b/modules/flann/src/flann.cpp @@ -35,7 +35,7 @@ namespace cvflann * \deprecated Provided for backward compatibility */ flann_distance_t flann_distance_type_ = FLANN_DIST_L2; - flann_distance_t flann_distance_type() { return flann_distance_type_; } + CV_DEPRECATED flann_distance_t flann_distance_type() { return flann_distance_type_; } /** * Set distance type to used diff --git a/modules/gapi/include/opencv2/gapi/garg.hpp b/modules/gapi/include/opencv2/gapi/garg.hpp index bfe147f8f0..2a8315f9d8 100644 --- a/modules/gapi/include/opencv2/gapi/garg.hpp +++ b/modules/gapi/include/opencv2/gapi/garg.hpp @@ -241,6 +241,7 @@ namespace gapi * * @brief G-API functions and classes for serialization and deserialization. */ + /** @brief Wraps deserialized output GRunArgs to GRunArgsP which can be used by GCompiled. * * Since it's impossible to get modifiable output arguments from deserialization @@ -254,6 +255,7 @@ namespace gapi * @see deserialize */ GAPI_EXPORTS cv::GRunArgsP bind(cv::GRunArgs &out_args); + /** @brief Wraps output GRunArgsP available during graph execution to GRunArgs which can be serialized. * * GRunArgsP is pointer-to-value, so to be serialized they need to be binded to real values diff --git a/modules/gapi/include/opencv2/gapi/garray.hpp b/modules/gapi/include/opencv2/gapi/garray.hpp index b6aa715518..a2951993f2 100644 --- a/modules/gapi/include/opencv2/gapi/garray.hpp +++ b/modules/gapi/include/opencv2/gapi/garray.hpp @@ -102,17 +102,17 @@ namespace detail GAPI_Assert(m_hint != nullptr); using U = typename std::decay::type; return dynamic_cast*>(m_hint.get()) != nullptr; - }; + } template void GArrayU::specifyType(){ m_hint.reset(new TypeHint::type>); - }; + } template void GArrayU::storeKind(){ setKind(cv::detail::GOpaqueTraits::kind); - }; + } // This class represents a typed STL vector reference. // Depending on origins, this reference may be either "just a" reference to diff --git a/modules/gapi/include/opencv2/gapi/gcomputation.hpp b/modules/gapi/include/opencv2/gapi/gcomputation.hpp index 13944c7852..196eb37c6b 100644 --- a/modules/gapi/include/opencv2/gapi/gcomputation.hpp +++ b/modules/gapi/include/opencv2/gapi/gcomputation.hpp @@ -50,6 +50,7 @@ namespace s11n { * * @brief G-API classes for constructed and compiled graphs. */ + /** * @brief GComputation class represents a captured computation * graph. GComputation objects form boundaries for expression code diff --git a/modules/gapi/include/opencv2/gapi/gkernel.hpp b/modules/gapi/include/opencv2/gapi/gkernel.hpp index 1b910adc82..6ec6bf573d 100644 --- a/modules/gapi/include/opencv2/gapi/gkernel.hpp +++ b/modules/gapi/include/opencv2/gapi/gkernel.hpp @@ -430,7 +430,7 @@ namespace gapi { virtual ~GFunctor() = default; protected: - GFunctor(const char* id) : m_id(id) { }; + GFunctor(const char* id) : m_id(id) { } private: const char* m_id; }; @@ -692,7 +692,7 @@ namespace gapi { int unused[] = { 0, (pkg.include(), 0)... }; cv::util::suppress_unused_warning(unused); return pkg; - }; + } template GKernelPackage kernels(FF&... functors) @@ -701,7 +701,7 @@ namespace gapi { int unused[] = { 0, (pkg.include(functors), 0)... }; cv::util::suppress_unused_warning(unused); return pkg; - }; + } /** @} */ diff --git a/modules/gapi/include/opencv2/gapi/gmat.hpp b/modules/gapi/include/opencv2/gapi/gmat.hpp index 7bea97bbc5..198cb728d0 100644 --- a/modules/gapi/include/opencv2/gapi/gmat.hpp +++ b/modules/gapi/include/opencv2/gapi/gmat.hpp @@ -48,6 +48,7 @@ struct GOrigin; * `cv::GOpaque` | T * cv::GFrame | cv::MediaFrame */ + /** * @brief GMat class represents image or tensor data in the * graph. diff --git a/modules/gapi/include/opencv2/gapi/gopaque.hpp b/modules/gapi/include/opencv2/gapi/gopaque.hpp index 1d12f127da..a3f98a9867 100644 --- a/modules/gapi/include/opencv2/gapi/gopaque.hpp +++ b/modules/gapi/include/opencv2/gapi/gopaque.hpp @@ -98,18 +98,18 @@ namespace detail GAPI_Assert(m_hint != nullptr); using U = util::decay_t; return dynamic_cast*>(m_hint.get()) != nullptr; - }; + } template void GOpaqueU::specifyType(){ m_hint.reset(new TypeHint>); - }; + } template void GOpaqueU::storeKind(){ // FIXME: Add assert here on cv::Mat and cv::Scalar? setKind(cv::detail::GOpaqueTraits::kind); - }; + } // This class represents a typed object reference. // Depending on origins, this reference may be either "just a" reference to diff --git a/modules/gapi/include/opencv2/gapi/gstreaming.hpp b/modules/gapi/include/opencv2/gapi/gstreaming.hpp index 5677768a96..e8f534ee5f 100644 --- a/modules/gapi/include/opencv2/gapi/gstreaming.hpp +++ b/modules/gapi/include/opencv2/gapi/gstreaming.hpp @@ -409,7 +409,7 @@ namespace streaming { struct GAPI_EXPORTS_W_SIMPLE queue_capacity { GAPI_WRAP - explicit queue_capacity(size_t cap = 1) : capacity(cap) { }; + explicit queue_capacity(size_t cap = 1) : capacity(cap) { } GAPI_PROP_RW size_t capacity; }; diff --git a/modules/gapi/include/opencv2/gapi/gtransform.hpp b/modules/gapi/include/opencv2/gapi/gtransform.hpp index 109bc87b7f..ce88c894d7 100644 --- a/modules/gapi/include/opencv2/gapi/gtransform.hpp +++ b/modules/gapi/include/opencv2/gapi/gtransform.hpp @@ -91,7 +91,7 @@ public: { \ struct G_DESCR_HELPER_CLASS(Class) \ { \ - static constexpr const char *descr() { return Descr; }; \ + static constexpr const char *descr() { return Descr; } \ }; \ } diff --git a/modules/gapi/include/opencv2/gapi/gtype_traits.hpp b/modules/gapi/include/opencv2/gapi/gtype_traits.hpp index a1703a52cb..c42d64a761 100644 --- a/modules/gapi/include/opencv2/gapi/gtype_traits.hpp +++ b/modules/gapi/include/opencv2/gapi/gtype_traits.hpp @@ -231,10 +231,10 @@ template struct GObtainCtor { static HostCtor get() { return HostCtor{}; } }; template struct GObtainCtor > { - static HostCtor get() { return HostCtor{ConstructVec{&GArray::VCtor}}; }; + static HostCtor get() { return HostCtor{ConstructVec{&GArray::VCtor}}; } }; template struct GObtainCtor > { - static HostCtor get() { return HostCtor{ConstructOpaque{&GOpaque::Ctor}}; }; + static HostCtor get() { return HostCtor{ConstructOpaque{&GOpaque::Ctor}}; } }; } // namespace detail } // namespace cv diff --git a/modules/gapi/include/opencv2/gapi/gtyped.hpp b/modules/gapi/include/opencv2/gapi/gtyped.hpp index c1c16d1767..2acc2f7ffb 100644 --- a/modules/gapi/include/opencv2/gapi/gtyped.hpp +++ b/modules/gapi/include/opencv2/gapi/gtyped.hpp @@ -40,7 +40,7 @@ namespace detail //workaround for MSVC 19.0 bug template auto make_default()->decltype(T{}) {return {};} -}; // detail +} // detail /** * @brief This class is a typed wrapper over a regular GComputation. diff --git a/modules/gapi/include/opencv2/gapi/infer/ie.hpp b/modules/gapi/include/opencv2/gapi/infer/ie.hpp index b403479ca2..9f9518d0b8 100644 --- a/modules/gapi/include/opencv2/gapi/infer/ie.hpp +++ b/modules/gapi/include/opencv2/gapi/infer/ie.hpp @@ -173,7 +173,7 @@ public: , {} , {} , {} } { - }; + } /** @overload Use this constructor to work with pre-compiled network. @@ -202,7 +202,7 @@ public: , {} , {} , {} } { - }; + } /** @brief Specifies sequence of network input layers names for inference. @@ -547,7 +547,7 @@ public: detail::ParamDesc::Kind::Load, true, {}, {}, {}, 1u, {}, {}, {}, {}, InferMode::Async, {}, {}, {}, {} }, m_tag(tag) { - }; + } /** @overload @@ -565,7 +565,7 @@ public: detail::ParamDesc::Kind::Import, true, {}, {}, {}, 1u, {}, {}, {}, {}, InferMode::Async, {}, {}, {}, {} }, m_tag(tag) { - }; + } /** @see ie::Params::pluginConfig. */ Params& pluginConfig(const IEConfig& cfg) { diff --git a/modules/gapi/include/opencv2/gapi/infer/onnx.hpp b/modules/gapi/include/opencv2/gapi/infer/onnx.hpp index ff5febcf90..4efb750439 100644 --- a/modules/gapi/include/opencv2/gapi/infer/onnx.hpp +++ b/modules/gapi/include/opencv2/gapi/infer/onnx.hpp @@ -293,7 +293,7 @@ public: desc.num_out = std::tuple_size::value; desc.is_generic = false; desc.disable_mem_pattern = false; - }; + } /** @brief Specifies sequence of network input layers names for inference. diff --git a/modules/gapi/include/opencv2/gapi/media.hpp b/modules/gapi/include/opencv2/gapi/media.hpp index 5da8eeab48..1470f00d04 100644 --- a/modules/gapi/include/opencv2/gapi/media.hpp +++ b/modules/gapi/include/opencv2/gapi/media.hpp @@ -33,6 +33,7 @@ namespace cv { * @brief Extra G-API data structures used to pass input/output data * to the graph for processing. */ + /** * @brief cv::MediaFrame class represents an image/media frame * obtained from an external source. diff --git a/modules/gapi/include/opencv2/gapi/own/convert.hpp b/modules/gapi/include/opencv2/gapi/own/convert.hpp index 1a8ecd8bc6..f587e24787 100644 --- a/modules/gapi/include/opencv2/gapi/own/convert.hpp +++ b/modules/gapi/include/opencv2/gapi/own/convert.hpp @@ -31,7 +31,7 @@ namespace cv return (m.dims == 2) ? cv::gapi::own::Mat{m.rows, m.cols, m.type(), m.data, m.step} : cv::gapi::own::Mat{to_own(m.size), m.type(), m.data}; - }; + } namespace gapi { diff --git a/modules/gapi/include/opencv2/gapi/own/scalar.hpp b/modules/gapi/include/opencv2/gapi/own/scalar.hpp index bda91c83b5..3b107befcc 100644 --- a/modules/gapi/include/opencv2/gapi/own/scalar.hpp +++ b/modules/gapi/include/opencv2/gapi/own/scalar.hpp @@ -21,7 +21,7 @@ class GAPI_EXPORTS Scalar { public: Scalar() = default; - explicit Scalar(double v0) { val[0] = v0; }; + explicit Scalar(double v0) { val[0] = v0; } Scalar(double v0, double v1, double v2 = 0, double v3 = 0) : val{v0, v1, v2, v3} { diff --git a/modules/gapi/include/opencv2/gapi/s11n.hpp b/modules/gapi/include/opencv2/gapi/s11n.hpp index 0bf368a856..a94f55c249 100644 --- a/modules/gapi/include/opencv2/gapi/s11n.hpp +++ b/modules/gapi/include/opencv2/gapi/s11n.hpp @@ -337,7 +337,7 @@ namespace detail { template IOStream& put_v(IOStream&, const V&, std::size_t) { GAPI_Error("variant>>: requested index is invalid"); -}; +} template IOStream& put_v(IOStream& os, const V& v, std::size_t x) { diff --git a/modules/gapi/misc/python/pyopencv_gapi.hpp b/modules/gapi/misc/python/pyopencv_gapi.hpp index 3269a7d470..a13b8e545d 100644 --- a/modules/gapi/misc/python/pyopencv_gapi.hpp +++ b/modules/gapi/misc/python/pyopencv_gapi.hpp @@ -321,7 +321,7 @@ PyObject* pyopencv_from(const cv::detail::OpaqueRef& o) PyErr_SetString(PyExc_TypeError, "Unsupported GOpaque type"); return NULL; -}; +} template <> PyObject* pyopencv_from(const cv::detail::VectorRef& v) diff --git a/modules/gapi/misc/python/python_bridge.hpp b/modules/gapi/misc/python/python_bridge.hpp index 53edf38b30..8926b21a79 100644 --- a/modules/gapi/misc/python/python_bridge.hpp +++ b/modules/gapi/misc/python/python_bridge.hpp @@ -137,7 +137,7 @@ public: using Storage = cv::detail::MakeVariantType; template - GOpaqueT(cv::GOpaque arg) : m_type(cv::detail::ArgTypeTraits::type), m_arg(arg) { }; + GOpaqueT(cv::GOpaque arg) : m_type(cv::detail::ArgTypeTraits::type), m_arg(arg) { } GAPI_WRAP GOpaqueT(gapi::ArgType type) : m_type(type) { @@ -175,7 +175,7 @@ public: using Storage = cv::detail::MakeVariantType; template - GArrayT(cv::GArray arg) : m_type(cv::detail::ArgTypeTraits::type), m_arg(arg) { }; + GArrayT(cv::GArray arg) : m_type(cv::detail::ArgTypeTraits::type), m_arg(arg) { } GAPI_WRAP GArrayT(gapi::ArgType type) : m_type(type) { diff --git a/modules/gapi/perf/common/gapi_render_perf_tests_inl.hpp b/modules/gapi/perf/common/gapi_render_perf_tests_inl.hpp index 66e8c37319..04d814eac7 100644 --- a/modules/gapi/perf/common/gapi_render_perf_tests_inl.hpp +++ b/modules/gapi/perf/common/gapi_render_perf_tests_inl.hpp @@ -16,7 +16,7 @@ void create_rand_mats(const cv::Size &size, MatType type, cv::Mat &ref_mat, cv:: ref_mat.create(size, type); cv::randu(ref_mat, cv::Scalar::all(0), cv::Scalar::all(255)); ref_mat.copyTo(gapi_mat); -}; +} } // namespace diff --git a/modules/gapi/src/api/render_ocv.cpp b/modules/gapi/src/api/render_ocv.cpp index f1e9be4b48..e15f56bfeb 100644 --- a/modules/gapi/src/api/render_ocv.cpp +++ b/modules/gapi/src/api/render_ocv.cpp @@ -67,7 +67,7 @@ inline void mosaic(cv::Mat& mat, const cv::Rect &rect, int cellSz) cell_roi = cv::mean(cell_roi); } } -}; +} inline void blendImage(const cv::Mat& img, const cv::Mat& alpha, @@ -120,7 +120,7 @@ inline void poly(cv::Mat& mat, { std::vector> points{pp.points}; cv::fillPoly(mat, points, pp.color, pp.lt, pp.shift); -}; +} struct BGR2YUVConverter { @@ -133,13 +133,13 @@ struct BGR2YUVConverter return {y, u, v}; } - void cvtImg(const cv::Mat& in, cv::Mat& out) { cv::cvtColor(in, out, cv::COLOR_BGR2YUV); }; + void cvtImg(const cv::Mat& in, cv::Mat& out) { cv::cvtColor(in, out, cv::COLOR_BGR2YUV); } }; struct EmptyConverter { - cv::Scalar cvtColor(const cv::Scalar& bgr) const { return bgr; }; - void cvtImg(const cv::Mat& in, cv::Mat& out) const { out = in; }; + cv::Scalar cvtColor(const cv::Scalar& bgr) const { return bgr; } + void cvtImg(const cv::Mat& in, cv::Mat& out) const { out = in; } }; // FIXME util::visitor ? diff --git a/modules/gapi/src/backends/common/serialization.cpp b/modules/gapi/src/backends/common/serialization.cpp index 2a71a782b0..6fe924e61b 100644 --- a/modules/gapi/src/backends/common/serialization.cpp +++ b/modules/gapi/src/backends/common/serialization.cpp @@ -8,9 +8,8 @@ #include // map #include // indexed -#define NOMINMAX - #ifdef _WIN32 +#define NOMINMAX #include // htonl, ntohl #else #include // htonl, ntohl diff --git a/modules/gapi/src/backends/common/serialization.hpp b/modules/gapi/src/backends/common/serialization.hpp index a64805e25c..384004c725 100644 --- a/modules/gapi/src/backends/common/serialization.hpp +++ b/modules/gapi/src/backends/common/serialization.hpp @@ -195,7 +195,7 @@ class GAPI_EXPORTS ByteMemoryInStream final: public IIStream { size_t m_idx = 0u; void check(std::size_t n) { (void) n; GAPI_DbgAssert(m_idx+n-1 < m_storage.size()); } - uint32_t getU32() { uint32_t v{}; *this >> v; return v; }; + uint32_t getU32() { uint32_t v{}; *this >> v; return v; } //virtual IIStream& operator>> (uint32_t &) final; diff --git a/modules/gapi/src/backends/streaming/gstreamingbackend.cpp b/modules/gapi/src/backends/streaming/gstreamingbackend.cpp index ae7125f2e5..0f966648d8 100644 --- a/modules/gapi/src/backends/streaming/gstreamingbackend.cpp +++ b/modules/gapi/src/backends/streaming/gstreamingbackend.cpp @@ -159,7 +159,7 @@ struct Copy: public cv::detail::KernelTag return cv::gapi::streaming::IActor::Ptr(new Actor(args)); } - static cv::gapi::streaming::GStreamingKernel kernel() { return {&create}; }; + static cv::gapi::streaming::GStreamingKernel kernel() { return {&create}; } }; void Copy::Actor::run(cv::gimpl::GIslandExecutable::IInput &in, @@ -249,7 +249,7 @@ struct GOCVBGR: public cv::detail::KernelTag { return cv::gapi::streaming::IActor::Ptr(new Actor(args)); } - static cv::gapi::streaming::GStreamingKernel kernel() { return {&create}; }; + static cv::gapi::streaming::GStreamingKernel kernel() { return {&create}; } }; void GOCVBGR::Actor::extractRMat(const cv::MediaFrame& frame, cv::RMat& rmat) @@ -323,7 +323,7 @@ struct GOCVY: public cv::detail::KernelTag { return cv::gapi::streaming::IActor::Ptr(new Actor(args)); } - static cv::gapi::streaming::GStreamingKernel kernel() { return {&create}; }; + static cv::gapi::streaming::GStreamingKernel kernel() { return {&create}; } }; void GOCVY::Actor::extractRMat(const cv::MediaFrame& frame, cv::RMat& rmat) @@ -389,7 +389,7 @@ struct GOCVUV: public cv::detail::KernelTag { return cv::gapi::streaming::IActor::Ptr(new Actor(args)); } - static cv::gapi::streaming::GStreamingKernel kernel() { return {&create}; }; + static cv::gapi::streaming::GStreamingKernel kernel() { return {&create}; } }; void GOCVUV::Actor::extractRMat(const cv::MediaFrame& frame, cv::RMat& rmat) diff --git a/modules/gapi/src/compiler/gcompiled_priv.hpp b/modules/gapi/src/compiler/gcompiled_priv.hpp index 3f873aba23..20b76781a5 100644 --- a/modules/gapi/src/compiler/gcompiled_priv.hpp +++ b/modules/gapi/src/compiler/gcompiled_priv.hpp @@ -27,7 +27,7 @@ namespace cv { namespace gimpl { struct GRuntimeArgs; -}; +} // FIXME: GAPI_EXPORTS is here only due to tests and Windows linker issues class GAPI_EXPORTS GCompiled::Priv diff --git a/modules/gapi/src/compiler/gstreaming_priv.hpp b/modules/gapi/src/compiler/gstreaming_priv.hpp index 0fd5fc7b7f..fc5ba73be0 100644 --- a/modules/gapi/src/compiler/gstreaming_priv.hpp +++ b/modules/gapi/src/compiler/gstreaming_priv.hpp @@ -16,7 +16,7 @@ namespace cv { namespace gimpl { struct GRuntimeArgs; -}; +} // FIXME: GAPI_EXPORTS is here only due to tests and Windows linker issues // FIXME: It seems it clearly duplicates the GStreamingCompiled and diff --git a/modules/gapi/src/compiler/passes/pattern_matching.cpp b/modules/gapi/src/compiler/passes/pattern_matching.cpp index d52b48a631..71ed859413 100644 --- a/modules/gapi/src/compiler/passes/pattern_matching.cpp +++ b/modules/gapi/src/compiler/passes/pattern_matching.cpp @@ -73,7 +73,7 @@ bool compareDataNodes(const ade::NodeHandle& first, const std::vector().port; } -}; +} inline bool IS_STARTPOINT(const ade::NodeHandle& nh){ return nh->inEdges().empty(); diff --git a/modules/gapi/test/common/gapi_core_tests_inl.hpp b/modules/gapi/test/common/gapi_core_tests_inl.hpp index 11b6e066a6..ae81ca2055 100644 --- a/modules/gapi/test/common/gapi_core_tests_inl.hpp +++ b/modules/gapi/test/common/gapi_core_tests_inl.hpp @@ -1699,7 +1699,7 @@ namespace { return cv::MediaFrame::View(std::move(pp), std::move(ss)); } }; -}; +} namespace { class TestMediaGray final : public cv::MediaFrame::IAdapter { @@ -1718,7 +1718,7 @@ namespace { return cv::MediaFrame::View(std::move(pp), std::move(ss)); } }; -}; +} TEST_P(SizeMFTest, ParseTest) { diff --git a/modules/gapi/test/common/gapi_render_tests.cpp b/modules/gapi/test/common/gapi_render_tests.cpp index e29406d783..abfef99121 100644 --- a/modules/gapi/test/common/gapi_render_tests.cpp +++ b/modules/gapi/test/common/gapi_render_tests.cpp @@ -92,6 +92,6 @@ void blendImageRef(cv::Mat& mat, const cv::Point& org, const cv::Mat& img, const roi32f += img32f; roi32f.convertTo(roi, CV_8U, 255.0); -}; +} } // namespace opencv_test diff --git a/modules/gapi/test/common/gapi_render_tests.hpp b/modules/gapi/test/common/gapi_render_tests.hpp index 30caca9e6d..73924d96ac 100644 --- a/modules/gapi/test/common/gapi_render_tests.hpp +++ b/modules/gapi/test/common/gapi_render_tests.hpp @@ -115,7 +115,7 @@ struct Fixture : public RenderNV12TestBase API { \ __WRAP_VAARGS(DEFINE_SPECIFIC_PARAMS_##Number(__VA_ARGS__)) \ Fixture() { \ Init(sz_); \ - }; \ + } \ }; #define GAPI_RENDER_TEST_FIXTURE_BGR(Fixture, API, Number, ...) \ @@ -123,7 +123,7 @@ struct Fixture : public RenderBGRTestBase API { \ __WRAP_VAARGS(DEFINE_SPECIFIC_PARAMS_##Number(__VA_ARGS__)) \ Fixture() { \ Init(sz_); \ - }; \ + } \ }; #define GET_VA_ARGS(...) __VA_ARGS__ diff --git a/modules/gapi/test/cpu/gapi_ocv_stateful_kernel_tests.cpp b/modules/gapi/test/cpu/gapi_ocv_stateful_kernel_tests.cpp index b462e701f2..850b0e2e6c 100644 --- a/modules/gapi/test/cpu/gapi_ocv_stateful_kernel_tests.cpp +++ b/modules/gapi/test/cpu/gapi_ocv_stateful_kernel_tests.cpp @@ -165,7 +165,7 @@ namespace out = true; } }; -}; +} TEST(StatefulKernel, StateInitOnceInRegularMode) { @@ -190,7 +190,7 @@ TEST(StatefulKernel, StateInitOnceInRegularMode) EXPECT_TRUE(params.pSetupsCount != nullptr); EXPECT_EQ(1, *params.pSetupsCount); } -}; +} struct StateInitOnce : public ::testing::TestWithParam{}; TEST_P(StateInitOnce, StreamingCompiledWithMeta) diff --git a/modules/gapi/test/gapi_async_test.cpp b/modules/gapi/test/gapi_async_test.cpp index 5a7194a17f..7086f47c5c 100644 --- a/modules/gapi/test/gapi_async_test.cpp +++ b/modules/gapi/test/gapi_async_test.cpp @@ -207,7 +207,7 @@ struct CallBack: crtp_cast { mtx.unlock(); cv.notify_one(); }; - }; + } template void start_async(Args&&... args){ diff --git a/modules/gapi/test/gapi_fluid_test.cpp b/modules/gapi/test/gapi_fluid_test.cpp index 03c98e3ef3..22884934ed 100644 --- a/modules/gapi/test/gapi_fluid_test.cpp +++ b/modules/gapi/test/gapi_fluid_test.cpp @@ -28,12 +28,12 @@ namespace void WriteFunction(uint8_t* row, int nr, int w) { for (int i = 0; i < w; i++) row[i] = static_cast(nr+i); - }; + } void ReadFunction1x1(const uint8_t* row, int w) { for (int i = 0; i < w; i++) std::cout << std::setw(4) << static_cast(row[i]) << " "; std::cout << "\n"; - }; + } void ReadFunction3x3(const uint8_t* rows[3], int w) { for (int i = 0; i < 3; i++) { for (int j = -1; j < w+1; j++) { @@ -42,7 +42,7 @@ namespace std::cout << "\n"; } std::cout << "\n"; - }; + } } TEST(FluidBuffer, InputTest) diff --git a/modules/gapi/test/gapi_kernel_tests.cpp b/modules/gapi/test/gapi_kernel_tests.cpp index dbb0a7f269..5adb668752 100644 --- a/modules/gapi/test/gapi_kernel_tests.cpp +++ b/modules/gapi/test/gapi_kernel_tests.cpp @@ -215,7 +215,7 @@ TEST(KernelPackage, RemoveBackend) EXPECT_FALSE(pkg.includes()); EXPECT_FALSE(pkg.includes()); EXPECT_TRUE(pkg.includes()); -}; +} TEST(KernelPackage, RemoveAPI) { @@ -228,7 +228,7 @@ TEST(KernelPackage, RemoveAPI) pkg.remove(); EXPECT_TRUE(pkg.includes()); EXPECT_FALSE(pkg.includes()); -}; +} TEST(KernelPackage, CreateHetero) { diff --git a/modules/gapi/test/internal/gapi_int_executor_tests.cpp b/modules/gapi/test/internal/gapi_int_executor_tests.cpp index 79117aebf3..9bed7b5058 100644 --- a/modules/gapi/test/internal/gapi_int_executor_tests.cpp +++ b/modules/gapi/test/internal/gapi_int_executor_tests.cpp @@ -55,7 +55,7 @@ public: GMockExecutable(bool can_reshape = true) : m_priv(new Priv{can_reshape, 0, 0}) { - }; + } void setReshape(bool can_reshape) { m_priv->m_can_reshape = can_reshape; } @@ -92,7 +92,7 @@ class GMockBackendImpl final: public cv::gapi::GBackend::Priv } public: - GMockBackendImpl(const GMockExecutable& exec) : m_exec(exec) { }; + GMockBackendImpl(const GMockExecutable& exec) : m_exec(exec) { } int getCompileCounter() const { return m_compile_counter; } }; @@ -124,8 +124,8 @@ GMockFunctor mock_kernel(const cv::gapi::GBackend& backend, Callable c) }; } -void dummyFooImpl(const cv::Mat&, cv::Mat&) { }; -void dummyBarImpl(const cv::Mat&, const cv::Mat&, cv::Mat&) { }; +void dummyFooImpl(const cv::Mat&, cv::Mat&) { } +void dummyBarImpl(const cv::Mat&, const cv::Mat&, cv::Mat&) { } struct GExecutorReshapeTest: public ::testing::Test { @@ -155,7 +155,7 @@ struct GExecutorReshapeTest: public ::testing::Test std::shared_ptr backend_impl2; cv::gapi::GBackend backend2; cv::GKernelPackage pkg; - cv::Mat in_mat1, in_mat2, out_mat;; + cv::Mat in_mat1, in_mat2, out_mat; }; } // anonymous namespace diff --git a/modules/gapi/test/internal/gapi_int_island_tests.cpp b/modules/gapi/test/internal/gapi_int_island_tests.cpp index 7da1670ecc..dbc6ad12f4 100644 --- a/modules/gapi/test/internal/gapi_int_island_tests.cpp +++ b/modules/gapi/test/internal/gapi_int_island_tests.cpp @@ -627,7 +627,7 @@ namespace void assignIsland(const std::string &s) { cv::gapi::island(s, cv::GIn(tmp[0]), cv::GOut(tmp[2])); - }; + } }; TEST_P(CheckName, Test) { diff --git a/modules/highgui/include/opencv2/highgui.hpp b/modules/highgui/include/opencv2/highgui.hpp index 71c0cf6e85..e6a40caf3d 100644 --- a/modules/highgui/include/opencv2/highgui.hpp +++ b/modules/highgui/include/opencv2/highgui.hpp @@ -300,9 +300,7 @@ You can call cv::destroyWindow or cv::destroyAllWindows to close the window and memory usage. For a simple program, you do not really have to call these functions because all the resources and windows of the application are closed automatically by the operating system upon exit. -@note - -Qt backend supports additional flags: +@note Qt backend supports additional flags: - **WINDOW_NORMAL or WINDOW_AUTOSIZE:** WINDOW_NORMAL enables you to resize the window, whereas WINDOW_AUTOSIZE adjusts automatically the window size to fit the displayed image (see imshow ), and you cannot change the window size manually. @@ -335,9 +333,7 @@ CV_EXPORTS_W int startWindowThread(); /** @brief Similar to #waitKey, but returns full key code. -@note - -Key code is implementation specific and depends on used backend: QT/GTK/Win32/etc +@note Key code is implementation specific and depends on used backend: QT/GTK/Win32/etc */ CV_EXPORTS_W int waitKeyEx(int delay = 0); @@ -404,11 +400,7 @@ For example, **waitKey(0)** will display the window infinitely until any keypres for image display). **waitKey(25)** will display a frame and wait approximately 25 ms for a key press (suitable for displaying a video frame-by-frame). To remove the window, use cv::destroyWindow. -@note - -[__Windows Backend Only__] Pressing Ctrl+C will copy the image to the clipboard. - -[__Windows Backend Only__] Pressing Ctrl+S will show a dialog to save the image. +@note [__Windows Backend Only__] Pressing Ctrl+C will copy the image to the clipboard. Pressing Ctrl+S will show a dialog to save the image. @param winname Name of the window. @param mat Image to be shown. @@ -417,10 +409,8 @@ CV_EXPORTS_W void imshow(const String& winname, InputArray mat); /** @brief Resizes the window to the specified size -@note - -- The specified window size is for the image area. Toolbars are not counted. -- Only windows created without cv::WINDOW_AUTOSIZE flag can be resized. +@note The specified window size is for the image area. Toolbars are not counted. +Only windows created without cv::WINDOW_AUTOSIZE flag can be resized. @param winname Window name. @param width The new window width. @@ -502,9 +492,7 @@ For cv::EVENT_MOUSEWHEEL positive and negative values mean forward and backward respectively. For cv::EVENT_MOUSEHWHEEL, where available, positive and negative values mean right and left scrolling, respectively. -@note - -Mouse-wheel events are currently supported only on Windows and Cocoa +@note Mouse-wheel events are currently supported only on Windows and Cocoa. @param flags The mouse callback flags parameter. */ @@ -559,9 +547,7 @@ and range, assigns a variable value to be a position synchronized with the track the callback function onChange to be called on the trackbar position change. The created trackbar is displayed in the specified window winname. -@note - -[__Qt Backend Only__] winname can be empty if the trackbar should be attached to the +@note [__Qt Backend Only__] winname can be empty if the trackbar should be attached to the control panel. Clicking the label of each trackbar enables editing the trackbar values manually. @@ -587,9 +573,7 @@ CV_EXPORTS int createTrackbar(const String& trackbarname, const String& winname, The function returns the current position of the specified trackbar. -@note - -[__Qt Backend Only__] winname can be empty if the trackbar is attached to the control +@note [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control panel. @param trackbarname Name of the trackbar. @@ -601,9 +585,7 @@ CV_EXPORTS_W int getTrackbarPos(const String& trackbarname, const String& winnam The function sets the position of the specified trackbar in the specified window. -@note - -[__Qt Backend Only__] winname can be empty if the trackbar is attached to the control +@note [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control panel. @param trackbarname Name of the trackbar. @@ -616,9 +598,7 @@ CV_EXPORTS_W void setTrackbarPos(const String& trackbarname, const String& winna The function sets the maximum position of the specified trackbar in the specified window. -@note - -[__Qt Backend Only__] winname can be empty if the trackbar is attached to the control +@note [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control panel. @param trackbarname Name of the trackbar. @@ -631,9 +611,7 @@ CV_EXPORTS_W void setTrackbarMax(const String& trackbarname, const String& winna The function sets the minimum position of the specified trackbar in the specified window. -@note - -[__Qt Backend Only__] winname can be empty if the trackbar is attached to the control +@note [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control panel. @param trackbarname Name of the trackbar. diff --git a/modules/highgui/src/registry.impl.hpp b/modules/highgui/src/registry.impl.hpp index 66693f1b07..23f4e9f4e1 100644 --- a/modules/highgui/src/registry.impl.hpp +++ b/modules/highgui/src/registry.impl.hpp @@ -61,7 +61,7 @@ std::vector& getBuiltinBackendsInfo() #endif }; return g_backends; -}; +} static bool sortByPriority(const BackendInfo &lhs, const BackendInfo &rhs) diff --git a/modules/highgui/src/roiSelector.cpp b/modules/highgui/src/roiSelector.cpp index 1bbd246c05..56881a97f4 100644 --- a/modules/highgui/src/roiSelector.cpp +++ b/modules/highgui/src/roiSelector.cpp @@ -118,7 +118,7 @@ class ROISelector bool drawFromCenter; // initializer list - handlerT() : isDrawing(false), drawFromCenter(true){}; + handlerT() : isDrawing(false), drawFromCenter(true){} } selectorParams; private: diff --git a/modules/imgcodecs/include/opencv2/imgcodecs.hpp b/modules/imgcodecs/include/opencv2/imgcodecs.hpp index 5e201b52fb..2d3bc4e6f2 100644 --- a/modules/imgcodecs/include/opencv2/imgcodecs.hpp +++ b/modules/imgcodecs/include/opencv2/imgcodecs.hpp @@ -319,8 +319,8 @@ See cv::imread for the list of supported formats and flags description. CV_EXPORTS_W Mat imdecode( InputArray buf, int flags ); /** @overload -@param buf -@param flags +@param buf Input array or vector of bytes. +@param flags The same flags as in cv::imread, see cv::ImreadModes. @param dst The optional output placeholder for the decoded matrix. It can save the image reallocations when the function is called repeatedly for images of the same size. */ diff --git a/modules/imgcodecs/src/exif.cpp b/modules/imgcodecs/src/exif.cpp index 28d52047d8..5ca3cc315d 100644 --- a/modules/imgcodecs/src/exif.cpp +++ b/modules/imgcodecs/src/exif.cpp @@ -133,7 +133,7 @@ bool ExifReader::parseExif(unsigned char* data, const size_t size) * @brief Filling m_exif member with exif directory elements * This is internal function and is not exposed to client * - * @return The function doesn't return any value. In case of unsuccessful parsing + * The function doesn't return any value. In case of unsuccessful parsing * the m_exif member is not filled up */ void ExifReader::parseExif() diff --git a/modules/imgcodecs/src/grfmt_tiff.cpp b/modules/imgcodecs/src/grfmt_tiff.cpp index 4febee36db..7fbdfce1fd 100644 --- a/modules/imgcodecs/src/grfmt_tiff.cpp +++ b/modules/imgcodecs/src/grfmt_tiff.cpp @@ -72,11 +72,6 @@ static void extend_cvtColor( InputArray _src, OutputArray _dst, int code ); CV_Error(Error::StsError, "OpenCV TIFF: failed " #call); \ } -#define CV_TIFF_CHECK_CALL_INFO(call) \ - if (0 == (call)) { \ - CV_LOG_INFO(NULL, "OpenCV TIFF(line " << __LINE__ << "): failed optional call: " #call ", ignoring"); \ - } - #define CV_TIFF_CHECK_CALL_DEBUG(call) \ if (0 == (call)) { \ CV_LOG_DEBUG(NULL, "OpenCV TIFF(line " << __LINE__ << "): failed optional call: " #call ", ignoring"); \ diff --git a/modules/imgproc/include/opencv2/imgproc.hpp b/modules/imgproc/include/opencv2/imgproc.hpp index 13ce0fcac2..647ea1862b 100644 --- a/modules/imgproc/include/opencv2/imgproc.hpp +++ b/modules/imgproc/include/opencv2/imgproc.hpp @@ -3699,10 +3699,10 @@ stored in two planes. This function only supports YUV420 to RGB conversion as of now. -@param src1: 8-bit image (#CV_8U) of the Y plane. -@param src2: image containing interleaved U/V plane. -@param dst: output image. -@param code: Specifies the type of conversion. It can take any of the following values: +@param src1 8-bit image (#CV_8U) of the Y plane. +@param src2 image containing interleaved U/V plane. +@param dst output image. +@param code Specifies the type of conversion. It can take any of the following values: - #COLOR_YUV2BGR_NV12 - #COLOR_YUV2RGB_NV12 - #COLOR_YUV2BGRA_NV12 diff --git a/modules/imgproc/perf/perf_integral.cpp b/modules/imgproc/perf/perf_integral.cpp index 2b1ab381e7..0a4fc49329 100644 --- a/modules/imgproc/perf/perf_integral.cpp +++ b/modules/imgproc/perf/perf_integral.cpp @@ -13,7 +13,7 @@ enum PerfSqMatDepth{ DEPTH_32F_64F, DEPTH_64F_64F}; -CV_ENUM(IntegralOutputDepths, DEPTH_32S_32S, DEPTH_32S_32F, DEPTH_32S_64F, DEPTH_32F_32F, DEPTH_32F_64F, DEPTH_64F_64F); +CV_ENUM(IntegralOutputDepths, DEPTH_32S_32S, DEPTH_32S_32F, DEPTH_32S_64F, DEPTH_32F_32F, DEPTH_32F_64F, DEPTH_64F_64F) static int extraOutputDepths[6][2] = {{CV_32S, CV_32S}, {CV_32S, CV_32F}, {CV_32S, CV_64F}, {CV_32F, CV_32F}, {CV_32F, CV_64F}, {CV_64F, CV_64F}}; diff --git a/modules/imgproc/src/accum.dispatch.cpp b/modules/imgproc/src/accum.dispatch.cpp index 8bbf37cc4a..4d2e044933 100644 --- a/modules/imgproc/src/accum.dispatch.cpp +++ b/modules/imgproc/src/accum.dispatch.cpp @@ -17,4 +17,4 @@ DEF_ACC_FLT_FUNCS(32f, float, float) DEF_ACC_FLT_FUNCS(32f64f, float, double) DEF_ACC_FLT_FUNCS(64f, double, double) -} //cv::hal \ No newline at end of file +} //cv::hal diff --git a/modules/imgproc/src/contours.cpp b/modules/imgproc/src/contours.cpp index 3e3096e7a5..32fa221c28 100644 --- a/modules/imgproc/src/contours.cpp +++ b/modules/imgproc/src/contours.cpp @@ -170,9 +170,6 @@ typedef struct _CvContourScanner } _CvContourScanner; -#define _CV_FIND_CONTOURS_FLAGS_EXTERNAL_ONLY 1 -#define _CV_FIND_CONTOURS_FLAGS_HIERARCHIC 2 - /* Initializes scanner structure. Prepare image for scanning ( clear borders and convert all pixels to 0-1. diff --git a/modules/imgproc/src/drawing.cpp b/modules/imgproc/src/drawing.cpp index 40ba22430f..d69007a320 100644 --- a/modules/imgproc/src/drawing.cpp +++ b/modules/imgproc/src/drawing.cpp @@ -2584,9 +2584,6 @@ void cv::drawContours( InputOutputArray _image, InputArrayOfArrays _contours, static const int CodeDeltas[8][2] = { {1, 0}, {1, -1}, {0, -1}, {-1, -1}, {-1, 0}, {-1, 1}, {0, 1}, {1, 1} }; -#define CV_ADJUST_EDGE_COUNT( count, seq ) \ - ((count) -= ((count) == (seq)->total && !CV_IS_SEQ_CLOSED(seq))) - CV_IMPL void cvDrawContours( void* _img, CvSeq* contour, CvScalar _externalColor, CvScalar _holeColor, diff --git a/modules/imgproc/src/filter.dispatch.cpp b/modules/imgproc/src/filter.dispatch.cpp index 90f2e36c2a..b5acbc866d 100644 --- a/modules/imgproc/src/filter.dispatch.cpp +++ b/modules/imgproc/src/filter.dispatch.cpp @@ -163,8 +163,6 @@ void FilterEngine::init( const Ptr& _filter2D, wholeSize = Size(-1,-1); } -#define VEC_ALIGN CV_MALLOC_ALIGN - int FilterEngine::start(const Size& _wholeSize, const Size& sz, const Point& ofs) { CV_INSTRUMENT_REGION(); diff --git a/modules/imgproc/src/hal_replacement.hpp b/modules/imgproc/src/hal_replacement.hpp index 6eb956bfee..f285f4c1b0 100644 --- a/modules/imgproc/src/hal_replacement.hpp +++ b/modules/imgproc/src/hal_replacement.hpp @@ -300,9 +300,12 @@ inline int hal_ni_warpPerspective(int src_type, const uchar *src_data, size_t sr /** @brief hal_cvtBGRtoBGR - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U, CV_16U, CV_32F) @param scn source image channels (3 or 4) @param dcn destination image channels (3 or 4) @@ -313,9 +316,12 @@ inline int hal_ni_cvtBGRtoBGR(const uchar * src_data, size_t src_step, uchar * d /** @brief hal_cvtBGRtoBGR5x5 - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param scn source image channels (3 or 4) @param swapBlue if set to true B and R source channels will be swapped (treat as RGB) @param greenBits number of bits for green channel (5 or 6) @@ -326,9 +332,12 @@ inline int hal_ni_cvtBGRtoBGR5x5(const uchar * src_data, size_t src_step, uchar /** @brief hal_cvtBGR5x5toBGR - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param dcn destination image channels (3 or 4) @param swapBlue if set to true B and R destination channels will be swapped (write RGB) @param greenBits number of bits for green channel (5 or 6) @@ -339,9 +348,12 @@ inline int hal_ni_cvtBGR5x5toBGR(const uchar * src_data, size_t src_step, uchar /** @brief hal_cvtBGRtoGray - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U, CV_16U or CV_32F) @param scn source image channels (3 or 4) @param swapBlue if set to true B and R source channels will be swapped (treat as RGB) @@ -351,9 +363,12 @@ inline int hal_ni_cvtBGRtoGray(const uchar * src_data, size_t src_step, uchar * /** @brief hal_cvtGraytoBGR - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U, CV_16U or CV_32F) @param dcn destination image channels (3 or 4) Convert from 1-channel gray to BGR, RGB, RGBA or BGRA. @@ -362,9 +377,12 @@ inline int hal_ni_cvtGraytoBGR(const uchar * src_data, size_t src_step, uchar * /** @brief hal_cvtBGR5x5toGray - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param greenBits number of bits for green channel (5 or 6) Convert from packed BGR (16 bits per pixel, 555 or 565) to 1-channel gray. Support only CV_8U images. @@ -373,9 +391,12 @@ inline int hal_ni_cvtBGR5x5toGray(const uchar * src_data, size_t src_step, uchar /** @brief hal_cvtGraytoBGR5x5 - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param greenBits number of bits for green channel (5 or 6) Convert from 1-channel gray to packed BGR (16 bits per pixel, 555 or 565). Support only CV_8U images. @@ -384,9 +405,12 @@ inline int hal_ni_cvtGraytoBGR5x5(const uchar * src_data, size_t src_step, uchar /** @brief hal_cvtBGRtoYUV - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U, CV_16U or CV_32F) @param scn source image channels (3 or 4) @param swapBlue if set to true B and R source channels will be swapped (treat as RGB) @@ -397,9 +421,12 @@ inline int hal_ni_cvtBGRtoYUV(const uchar * src_data, size_t src_step, uchar * d /** @brief hal_cvtYUVtoBGR - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U, CV_16U or CV_32F) @param dcn destination image channels (3 or 4) @param swapBlue if set to true B and R destination channels will be swapped (write RGB) @@ -410,9 +437,12 @@ inline int hal_ni_cvtYUVtoBGR(const uchar * src_data, size_t src_step, uchar * d /** @brief hal_cvtBGRtoXYZ - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U, CV_16U or CV_32F) @param scn source image channels (3 or 4) @param swapBlue if set to true B and R source channels will be swapped (treat as RGB) @@ -422,9 +452,12 @@ inline int hal_ni_cvtBGRtoXYZ(const uchar * src_data, size_t src_step, uchar * d /** @brief hal_cvtXYZtoBGR - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U, CV_16U or CV_32F) @param dcn destination image channels (3 or 4) @param swapBlue if set to true B and R destination channels will be swapped (write RGB) @@ -434,9 +467,12 @@ inline int hal_ni_cvtXYZtoBGR(const uchar * src_data, size_t src_step, uchar * d /** @brief hal_cvtBGRtoHSV - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U or CV_32F) @param scn source image channels (3 or 4) @param swapBlue if set to true B and R source channels will be swapped (treat as RGB) @@ -448,9 +484,12 @@ inline int hal_ni_cvtBGRtoHSV(const uchar * src_data, size_t src_step, uchar * d /** @brief hal_cvtHSVtoBGR - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U or CV_32F) @param dcn destination image channels (3 or 4) @param swapBlue if set to true B and R destination channels will be swapped (write RGB) @@ -462,9 +501,12 @@ inline int hal_ni_cvtHSVtoBGR(const uchar * src_data, size_t src_step, uchar * d /** @brief hal_cvtBGRtoLab - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U or CV_32F) @param scn source image channels (3 or 4) @param swapBlue if set to true B and R source channels will be swapped (treat as RGB) @@ -476,9 +518,12 @@ inline int hal_ni_cvtBGRtoLab(const uchar * src_data, size_t src_step, uchar * d /** @brief hal_cvtLabtoBGR - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param depth image depth (one of CV_8U or CV_32F) @param dcn destination image channels (3 or 4) @param swapBlue if set to true B and R destination channels will be swapped (write RGB) @@ -490,9 +535,12 @@ inline int hal_ni_cvtLabtoBGR(const uchar * src_data, size_t src_step, uchar * d /** @brief hal_cvtTwoPlaneYUVtoBGR - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param dst_width,dst_height destination image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param dst_width destination image width + @param dst_height destination image height @param dcn destination image channels (3 or 4) @param swapBlue if set to true B and R destination channels will be swapped (write RGB) @param uIdx U-channel index in the interleaved U/V plane (0 or 1) @@ -503,10 +551,14 @@ inline int hal_ni_cvtTwoPlaneYUVtoBGR(const uchar * src_data, size_t src_step, u /** @brief Extended version of hal_cvtTwoPlaneYUVtoBGR. - @param y_data,y_step source image data and step (Y-plane) - @param uv_data,uv_step source image data and step (UV-plane) - @param dst_data,dst_step destination image data and step - @param dst_width,dst_height destination image size + @param y_data source image data (Y-plane) + @param y_step source image step (Y-plane) + @param uv_data source image data (UV-plane) + @param uv_step source image step (UV-plane) + @param dst_data destination image data + @param dst_step destination image step + @param dst_width destination image width + @param dst_height destination image height @param dcn destination image channels (3 or 4) @param swapBlue if set to true B and R destination channels will be swapped (write RGB) @param uIdx U-channel index in the interleaved U/V plane (0 or 1) @@ -519,10 +571,14 @@ inline int hal_ni_cvtTwoPlaneYUVtoBGREx(const uchar * y_data, size_t y_step, con /** @brief hal_cvtBGRtoTwoPlaneYUV - @param src_data,src_step source image data and step - @param y_data,y_step destination image data and step (Y-plane) - @param uv_data,uv_step destination image data and step (UV-plane) - @param width,height image size + @param src_data source image data + @param src_step source image step + @param y_data destination image data (Y-plane) + @param y_step destination image step (Y-plane) + @param uv_data destination image data (UV-plane) + @param uv_step destination image step (UV-plane) + @param width image width + @param height image height @param scn source image channels (3 or 4) @param swapBlue if set to true B and R source channels will be swapped (treat as RGB) @param uIdx U-channel plane index (0 or 1) @@ -536,9 +592,12 @@ inline int hal_ni_cvtBGRtoTwoPlaneYUV(const uchar * src_data, size_t src_step, /** @brief hal_cvtThreePlaneYUVtoBGR - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param dst_width,dst_height destination image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param dst_width destination image width + @param dst_height destination image height @param dcn destination image channels (3 or 4) @param swapBlue if set to true B and R destination channels will be swapped (write RGB) @param uIdx U-channel plane index (0 or 1) @@ -549,9 +608,12 @@ inline int hal_ni_cvtThreePlaneYUVtoBGR(const uchar * src_data, size_t src_step, /** @brief hal_cvtBGRtoThreePlaneYUV - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param scn source image channels (3 or 4) @param swapBlue if set to true B and R source channels will be swapped (treat as RGB) @param uIdx U-channel plane index (0 or 1) @@ -562,9 +624,12 @@ inline int hal_ni_cvtBGRtoThreePlaneYUV(const uchar * src_data, size_t src_step, /** @brief hal_cvtOnePlaneYUVtoBGR - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height @param dcn destination image channels (3 or 4) @param swapBlue if set to true B and R destination channels will be swapped (write RGB) @param uIdx U-channel index (0 or 1) @@ -577,9 +642,12 @@ inline int hal_ni_cvtOnePlaneYUVtoBGR(const uchar * src_data, size_t src_step, u /** @brief hal_cvtRGBAtoMultipliedRGBA - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height Convert from BGRA or RGBA to format with multiplied alpha channel. Only for CV_8U. */ @@ -587,9 +655,12 @@ inline int hal_ni_cvtRGBAtoMultipliedRGBA(const uchar * src_data, size_t src_ste /** @brief hal_cvtMultipliedRGBAtoRGBA - @param src_data,src_step source image data and step - @param dst_data,dst_step destination image data and step - @param width,height image size + @param src_data source image data + @param src_step source image step + @param dst_data destination image data + @param dst_step destination image step + @param width image width + @param height image height Convert from format with multiplied alpha channel to BGRA or RGBA. Only for CV_8U. */ @@ -623,12 +694,19 @@ inline int hal_ni_cvtMultipliedRGBAtoRGBA(const uchar * src_data, size_t src_ste /** @brief Calculate integral image - @param depth,sdepth,sqdepth Depths of source image, sum image and square sum image - @param src_data,src_step Source image - @param sum_data,sum_step Sum image - @param sqsum_data,sqsum_step Square sum image - @param tilted_data,tilted_step Tilted sum image - @param width,height Source image dimensions + @param depth Depth of source image + @param sdepth Depth of sum image + @param sqdepth Depth of square sum image + @param src_data Source image data + @param src_step Source image step + @param sum_data Sum image data + @param sum_step Sum image step + @param sqsum_data Square sum image data + @param sqsum_step Square sum image step + @param tilted_data Tilted sum image data + @param tilted_step Tilted sum image step + @param width Source image width + @param height Source image height @param cn Number of channels @note Following combinations of image depths are used: Source | Sum | Square sum @@ -655,9 +733,12 @@ inline int hal_ni_integral(int depth, int sdepth, int sqdepth, const uchar * src /** @brief Calculate medianBlur filter - @param src_data,src_step Source image - @param dst_data,dst_step Destination image - @param width,height Source image dimensions + @param src_data Source image data + @param src_step Source image step + @param dst_data Destination image data + @param dst_step Destination image step + @param width Source image width + @param height Source image height @param depth Depths of source and destination image @param cn Number of channels @param ksize Size of kernel @@ -670,9 +751,12 @@ inline int hal_ni_medianBlur(const uchar* src_data, size_t src_step, uchar* dst_ /** @brief Calculates adaptive threshold - @param src_data,src_step Source image - @param dst_data,dst_step Destination image - @param width,height Source image dimensions + @param src_data Source image data + @param src_step Source image step + @param dst_data Destination image data + @param dst_step Destination image step + @param width Source image width + @param height Source image height @param maxValue Value assigned to the pixels for which the condition is satisfied @param adaptiveMethod Adaptive thresholding algorithm @param thresholdType Thresholding type @@ -687,9 +771,12 @@ inline int hal_ni_adaptiveThreshold(const uchar* src_data, size_t src_step, ucha /** @brief Calculates fixed-level threshold to each array element - @param src_data,src_step Source image - @param dst_data,dst_step Destination image - @param width,height Source image dimensions + @param src_data Source image data + @param src_step Source image step + @param dst_data Destination image data + @param dst_step Destination image step + @param width Source image width + @param height Source image height @param depth Depths of source and destination image @param cn Number of channels @param thresh Threshold value @@ -704,14 +791,23 @@ inline int hal_ni_threshold(const uchar* src_data, size_t src_step, uchar* dst_d /** @brief Calculate box filter - @param src_data,src_step Source image - @param dst_data,dst_step Destination image - @param width,height Source image dimensions - @param src_depth,dst_depth Depths of source and destination image + @param src_data Source image data + @param src_step Source image step + @param dst_data Destination image data + @param dst_step Destination image step + @param width Source image width + @param height Source image height + @param src_depth Depth of source image + @param dst_depth Depts of destination image @param cn Number of channels - @param margin_left,margin_top,margin_right,margin_bottom Margins for source image - @param ksize_width,ksize_height Size of kernel - @param anchor_x,anchor_y Anchor point + @param margin_left Left margins for source image + @param margin_top Top margins for source image + @param margin_right Right margins for source image + @param margin_bottom Bottom margins for source image + @param ksize_width Width of kernel + @param ksize_height Height of kernel + @param anchor_x Anchor point x coordinate + @param anchor_y Anchor point y coordinate @param normalize If true then result is normalized @param border_type Border type */ @@ -723,14 +819,22 @@ inline int hal_ni_boxFilter(const uchar* src_data, size_t src_step, uchar* dst_d /** @brief Blurs an image using a Gaussian filter. - @param src_data,src_step Source image - @param dst_data,dst_step Destination image - @param width,height Source image dimensions + @param src_data Source image data + @param src_step Source image step + @param dst_data Destination image data + @param dst_step Destination image step + @param width Source image width + @param height Source image height @param depth Depth of source and destination image @param cn Number of channels - @param margin_left,margin_top,margin_right,margin_bottom Margins for source image - @param ksize_width,ksize_height Size of kernel - @param sigmaX,sigmaY Gaussian kernel standard deviation. + @param margin_left Left margins for source image + @param margin_top Top margins for source image + @param margin_right Right margins for source image + @param margin_bottom Bottom margins for source image + @param ksize_width Width of kernel + @param ksize_height Height of kernel + @param sigmaX Gaussian kernel standard deviation. + @param sigmaY Gaussian kernel standard deviation. @param border_type Border type */ inline int hal_ni_gaussianBlur(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int depth, int cn, size_t margin_left, size_t margin_top, size_t margin_right, size_t margin_bottom, size_t ksize_width, size_t ksize_height, double sigmaX, double sigmaY, int border_type) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } @@ -741,13 +845,21 @@ inline int hal_ni_gaussianBlur(const uchar* src_data, size_t src_step, uchar* ds /** @brief Computes Sobel derivatives - @param src_depth,dst_depth Depths of source and destination image - @param src_data,src_step Source image - @param dst_data,dst_step Destination image - @param width,height Source image dimensions + @param src_depth Depth of source image + @param dst_depth Depts of destination image + @param src_data Source image data + @param src_step Source image step + @param dst_data Destination image data + @param dst_step Destination image step + @param width Source image width + @param height Source image height @param cn Number of channels - @param margin_left,margin_top,margin_right,margin_bottom Margins for source image - @param dx,dy orders of the derivative x and y respectively + @param margin_left Left margins for source image + @param margin_top Top margins for source image + @param margin_right Right margins for source image + @param margin_bottom Bottom margins for source image + @param dx orders of the derivative x + @param dy orders of the derivative y @param ksize Size of kernel @param scale Scale factor for the computed derivative values @param delta Delta value that is added to the results prior to storing them in dst @@ -761,13 +873,21 @@ inline int hal_ni_sobel(const uchar* src_data, size_t src_step, uchar* dst_data, /** @brief Computes Scharr filter - @param src_depth,dst_depth Depths of source and destination image - @param src_data,src_step Source image - @param dst_data,dst_step Destination image - @param width,height Source image dimensions + @param src_depth Depth of source image + @param dst_depth Depts of destination image + @param src_data Source image data + @param src_step Source image step + @param dst_data Destination image data + @param dst_step Destination image step + @param width Source image width + @param height Source image height @param cn Number of channels - @param margin_left,margin_top,margin_right,margin_bottom Margins for source image - @param dx,dy orders of the derivative x and y respectively + @param margin_left Left margins for source image + @param margin_top Top margins for source image + @param margin_right Right margins for source image + @param margin_bottom Bottom margins for source image + @param dx orders of the derivative x + @param dy orders of the derivative y @param scale Scale factor for the computed derivative values @param delta Delta value that is added to the results prior to storing them in dst @param border_type Border type @@ -781,10 +901,14 @@ inline int hal_ni_scharr(const uchar* src_data, size_t src_step, uchar* dst_data /** @brief Perform Gaussian Blur and downsampling for input tile. @param depth Depths of source and destination image - @param src_data,src_step Source image - @param dst_data,dst_step Destination image - @param src_width,src_height Source image dimensions - @param dst_width,dst_height Destination image dimensions + @param src_data Source image data + @param src_step Source image step + @param dst_data Destination image data + @param dst_step Destination image step + @param src_width Source image width + @param src_height Source image height + @param dst_width Destination image width + @param dst_height Destination image height @param cn Number of channels @param border_type Border type */ @@ -796,11 +920,15 @@ inline int hal_ni_pyrdown(const uchar* src_data, size_t src_step, int src_width, /** @brief Canny edge detector - @param src_data,src_step Source image - @param dst_data,dst_step Destination image - @param width,height Source image dimensions + @param src_data Source image data + @param src_step Source image step + @param dst_data Destination image data + @param dst_step Destination image step + @param width Source image width + @param height Source image height @param cn Number of channels - @param lowThreshold, highThreshold Thresholds value + @param lowThreshold low hresholds value + @param highThreshold high thresholds value @param ksize Kernel size for Sobel operator. @param L2gradient Flag, indicating use L2 or L1 norma. */ diff --git a/modules/imgproc/src/intelligent_scissors.cpp b/modules/imgproc/src/intelligent_scissors.cpp index 6e2dfc3288..2007575891 100644 --- a/modules/imgproc/src/intelligent_scissors.cpp +++ b/modules/imgproc/src/intelligent_scissors.cpp @@ -90,9 +90,9 @@ struct IntelligentScissorsMB::Impl int laplacianKernelSize = 3; // 1 or 3 // image features - Mat_ gradient_direction; //< I: normalized laplacian x/y components - Mat_ gradient_magnitude; //< Fg: gradient cost function - Mat_ non_edge_feature; //< Fz: zero-crossing function + Mat_ gradient_direction; ///< I: normalized laplacian x/y components + Mat_ gradient_magnitude; ///< Fg: gradient cost function + Mat_ non_edge_feature; ///< Fz: zero-crossing function float weight_non_edge_compute = 0.0f; diff --git a/modules/imgproc/src/lsd.cpp b/modules/imgproc/src/lsd.cpp index 8d26a016ab..3b5b412e25 100644 --- a/modules/imgproc/src/lsd.cpp +++ b/modules/imgproc/src/lsd.cpp @@ -214,7 +214,7 @@ public: /** * Draw lines on the given canvas. * - * @param image The image, where lines will be drawn. + * @param _image The image, where lines will be drawn. * Should have the size of the image, where the lines were found * @param lines The lines that need to be drawn */ @@ -226,7 +226,7 @@ public: * @param size The size of the image, where lines1 and lines2 were found. * @param lines1 The first lines that need to be drawn. Color - Blue. * @param lines2 The second lines that need to be drawn. Color - Red. - * @param image An optional image, where lines will be drawn. + * @param _image An optional image, where lines will be drawn. * Should have the size of the image, where the lines were found * @return The number of mismatching pixels between lines1 and lines2. */ @@ -308,8 +308,6 @@ private: * * @param threshold The minimum value of the angle that is considered defined, otherwise NOTDEF * @param n_bins The number of bins with which gradients are ordered by, using bucket sort. - * @param ordered_points Return: Vector of coordinate points that are pseudo ordered by magnitude. - * Pixels would be ordered by norm value, up to a precision given by max_grad/n_bins. */ void ll_angle(const double& threshold, const unsigned int& n_bins); diff --git a/modules/imgproc/src/sumpixels.avx512_skx.hpp b/modules/imgproc/src/sumpixels.avx512_skx.hpp index 81d9d1d846..09b777b268 100644 --- a/modules/imgproc/src/sumpixels.avx512_skx.hpp +++ b/modules/imgproc/src/sumpixels.avx512_skx.hpp @@ -26,7 +26,7 @@ template class IntegralCalculator; template class IntegralCalculator { public: - IntegralCalculator() {}; + IntegralCalculator() {} void calculate_integral_avx512(const uchar *src, size_t _srcstep, diff --git a/modules/imgproc/test/ocl/test_houghlines.cpp b/modules/imgproc/test/ocl/test_houghlines.cpp index 4e7b8917ac..64d5b248a3 100644 --- a/modules/imgproc/test/ocl/test_houghlines.cpp +++ b/modules/imgproc/test/ocl/test_houghlines.cpp @@ -181,4 +181,4 @@ OCL_INSTANTIATE_TEST_CASE_P(Imgproc, HoughLinesP, Combine(Values(100, 150), } } // namespace opencv_test::ocl -#endif // HAVE_OPENCL \ No newline at end of file +#endif // HAVE_OPENCL diff --git a/modules/imgproc/test/test_houghlines.cpp b/modules/imgproc/test/test_houghlines.cpp index 003420ae65..2d784d7a7a 100644 --- a/modules/imgproc/test/test_houghlines.cpp +++ b/modules/imgproc/test/test_houghlines.cpp @@ -53,7 +53,7 @@ struct SimilarWith T value; float theta_eps; float rho_eps; - SimilarWith(T val, float e, float r_e): value(val), theta_eps(e), rho_eps(r_e) { }; + SimilarWith(T val, float e, float r_e): value(val), theta_eps(e), rho_eps(r_e) { } bool operator()(const T& other); }; diff --git a/modules/imgproc/test/test_pc.cpp b/modules/imgproc/test/test_pc.cpp index 7b06e3bd65..87f0d804b2 100644 --- a/modules/imgproc/test/test_pc.cpp +++ b/modules/imgproc/test/test_pc.cpp @@ -301,7 +301,7 @@ static std::pair divide_complex_numbers( const double nu_re, con const double result_re = nu_re * de_re + nu_im * de_im; const double result_im = nu_re * (-de_im) + nu_im * de_re; return std::pair(result_re / result_de, result_im / result_de); -}; +} /// Helper function to divide a DFT in src1 by a DFT in src2 with depths depth_t. The DFTs are /// complex matrices. diff --git a/modules/imgproc/test/test_subdivision2d.cpp b/modules/imgproc/test/test_subdivision2d.cpp index 0a366206b3..17549b6b15 100644 --- a/modules/imgproc/test/test_subdivision2d.cpp +++ b/modules/imgproc/test/test_subdivision2d.cpp @@ -50,4 +50,4 @@ TEST(Imgproc_Subdiv2D_getTriangleList, regression_5788) EXPECT_EQ(trig_cnt, 105); } -}}; +}} diff --git a/modules/ml/src/svm.cpp b/modules/ml/src/svm.cpp index 6c3db22b72..40c18c03ea 100644 --- a/modules/ml/src/svm.cpp +++ b/modules/ml/src/svm.cpp @@ -638,9 +638,6 @@ public: #undef is_lower_bound #define is_lower_bound(i) (alpha_status[i] < 0) - #undef is_free - #define is_free(i) (alpha_status[i] == 0) - #undef get_C #define get_C(i) (C[y[i]>0]) @@ -648,9 +645,6 @@ public: #define update_alpha_status(i) \ alpha_status[i] = (schar)(alpha[i] >= get_C(i) ? 1 : alpha[i] <= 0 ? -1 : 0) - #undef reconstruct_gradient - #define reconstruct_gradient() /* empty for now */ - bool solve_generic( SolutionInfo& si ) { const schar* y = &y_vec[0]; diff --git a/modules/ml/test/test_mltests.cpp b/modules/ml/test/test_mltests.cpp index c7353057d3..a67f6b0bf2 100644 --- a/modules/ml/test/test_mltests.cpp +++ b/modules/ml/test/test_mltests.cpp @@ -55,7 +55,7 @@ static DatasetDesc & getDataset(const string & name) // interfaces and templates -template string modelName() { return "Unknown"; }; +template string modelName() { return "Unknown"; } template Ptr tuneModel(const DatasetDesc &, Ptr m) { return m; } struct IModelFactory diff --git a/modules/objdetect/include/opencv2/objdetect.hpp b/modules/objdetect/include/opencv2/objdetect.hpp index 8b3cd7c97b..ae8c2bf1ef 100644 --- a/modules/objdetect/include/opencv2/objdetect.hpp +++ b/modules/objdetect/include/opencv2/objdetect.hpp @@ -730,19 +730,21 @@ public: ECI_UTF8 = 26 }; - /** @brief QR code encoder parameters. - @param version The optional version of QR code (by default - maximum possible depending on - the length of the string). - @param correction_level The optional level of error correction (by default - the lowest). - @param mode The optional encoding mode - Numeric, Alphanumeric, Byte, Kanji, ECI or Structured Append. - @param structure_number The optional number of QR codes to generate in Structured Append mode. - */ + /** @brief QR code encoder parameters. */ struct CV_EXPORTS_W_SIMPLE Params { CV_WRAP Params(); + + //! The optional version of QR code (by default - maximum possible depending on the length of the string). CV_PROP_RW int version; + + //! The optional level of error correction (by default - the lowest). CV_PROP_RW CorrectionLevel correction_level; + + //! The optional encoding mode - Numeric, Alphanumeric, Byte, Kanji, ECI or Structured Append. CV_PROP_RW EncodeMode mode; + + //! The optional number of QR codes to generate in Structured Append mode. CV_PROP_RW int structure_number; }; diff --git a/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp b/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp index f885a2af87..c93caa06c2 100644 --- a/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp +++ b/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp @@ -56,7 +56,7 @@ struct CV_EXPORTS_W_SIMPLE DetectorParameters { useAruco3Detection = false; minSideLengthCanonicalImg = 32; minMarkerLengthRatioOriginalImg = 0.0; - }; + } /** @brief Read a new set of DetectorParameters from FileNode (use FileStorage.root()). */ diff --git a/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp b/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp index fb96c668a5..8050278b42 100644 --- a/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp +++ b/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp @@ -192,7 +192,7 @@ class CV_EXPORTS DetectionBasedTracker { lastPositions.push_back(rect); id=getNextId(); - }; + } static int getNextId() { diff --git a/modules/objdetect/include/opencv2/objdetect/face.hpp b/modules/objdetect/include/opencv2/objdetect/face.hpp index a8e98c4012..d8e96b5dfd 100644 --- a/modules/objdetect/include/opencv2/objdetect/face.hpp +++ b/modules/objdetect/include/opencv2/objdetect/face.hpp @@ -20,7 +20,7 @@ model download link: https://github.com/opencv/opencv_zoo/tree/master/models/fac class CV_EXPORTS_W FaceDetectorYN { public: - virtual ~FaceDetectorYN() {}; + virtual ~FaceDetectorYN() {} /** @brief Set the size for the network input, which overwrites the input size of creating model. Call this method when the size of input image does not match the input size when creating model * @@ -99,7 +99,7 @@ model download link: https://github.com/opencv/opencv_zoo/tree/master/models/fac class CV_EXPORTS_W FaceRecognizerSF { public: - virtual ~FaceRecognizerSF() {}; + virtual ~FaceRecognizerSF() {} /** @brief Definition of distance used for calculating the distance between two face features */ diff --git a/modules/objdetect/src/aruco/aruco_detector.cpp b/modules/objdetect/src/aruco/aruco_detector.cpp index b18ddd98ba..c3754a6bd5 100644 --- a/modules/objdetect/src/aruco/aruco_detector.cpp +++ b/modules/objdetect/src/aruco/aruco_detector.cpp @@ -692,7 +692,7 @@ static void _identifyCandidates(InputArray grey, /** * Line fitting A * B = C :: Called from function refineCandidateLines - * @param nContours, contour-container + * @param nContours contour-container */ static Point3f _interpolate2Dline(const vector& nContours){ CV_Assert(nContours.size() >= 2); @@ -748,10 +748,8 @@ static Point2f _getCrossPoint(Point3f nLine1, Point3f nLine2){ /** * Refine Corners using the contour vector :: Called from function detectMarkers - * @param nContours, contour-container - * @param nCorners, candidate Corners - * @param camMatrix, cameraMatrix input 3x3 floating-point camera matrix - * @param distCoeff, distCoeffs vector of distortion coefficient + * @param nContours contour-container + * @param nCorners candidate Corners */ static void _refineCandidateLines(vector& nContours, vector& nCorners){ vector contour2f(nContours.begin(), nContours.end()); diff --git a/modules/objdetect/src/face_recognize.cpp b/modules/objdetect/src/face_recognize.cpp index 497303e42b..8183573ce9 100644 --- a/modules/objdetect/src/face_recognize.cpp +++ b/modules/objdetect/src/face_recognize.cpp @@ -25,7 +25,7 @@ public: net.setPreferableBackend(backend_id); net.setPreferableTarget(target_id); - }; + } void alignCrop(InputArray _src_img, InputArray _face_mat, OutputArray _aligned_img) const override { Mat face_mat = _face_mat.getMat(); @@ -39,13 +39,13 @@ public: } Mat warp_mat = getSimilarityTransformMatrix(src_point); warpAffine(_src_img, _aligned_img, warp_mat, Size(112, 112), INTER_LINEAR); - }; + } void feature(InputArray _aligned_img, OutputArray _face_feature) override { Mat inputBolb = dnn::blobFromImage(_aligned_img, 1, Size(112, 112), Scalar(0, 0, 0), true, false); net.setInput(inputBolb); net.forward(_face_feature); - }; + } double match(InputArray _face_feature1, InputArray _face_feature2, int dis_type) const override { Mat face_feature1 = _face_feature1.getMat(), face_feature2 = _face_feature2.getMat(); @@ -60,7 +60,7 @@ public: throw std::invalid_argument("invalid parameter " + std::to_string(dis_type)); } - }; + } private: Mat getSimilarityTransformMatrix(float src[5][2]) const { diff --git a/modules/objdetect/src/qrcode_encoder.cpp b/modules/objdetect/src/qrcode_encoder.cpp index 24a9548899..4ab1e1ac40 100644 --- a/modules/objdetect/src/qrcode_encoder.cpp +++ b/modules/objdetect/src/qrcode_encoder.cpp @@ -703,7 +703,7 @@ bool QRCodeEncoderImpl::stringToBits(const std::string& input_info) default: return encodeAuto(input_info, payload); } -}; +} void QRCodeEncoderImpl::eccGenerate(vector > &data_blocks, vector > &ecc_blocks) { diff --git a/modules/photo/include/opencv2/photo/cuda.hpp b/modules/photo/include/opencv2/photo/cuda.hpp index b6ab40a764..709ad2d26f 100644 --- a/modules/photo/include/opencv2/photo/cuda.hpp +++ b/modules/photo/include/opencv2/photo/cuda.hpp @@ -78,7 +78,7 @@ CV_WRAP inline void nonLocalMeans(const GpuMat& src, CV_OUT GpuMat& dst, Stream& stream = Stream::Null()) { nonLocalMeans(InputArray(src), OutputArray(dst), h, search_window, block_size, borderMode, stream); -}; +} /** @brief Perform image denoising using Non-local Means Denoising algorithm with several computational diff --git a/modules/photo/src/denoise_tvl1.cpp b/modules/photo/src/denoise_tvl1.cpp index df756c4c85..5f49de1421 100644 --- a/modules/photo/src/denoise_tvl1.cpp +++ b/modules/photo/src/denoise_tvl1.cpp @@ -42,8 +42,6 @@ #include #include -#define ABSCLIP(val,threshold) MIN(MAX((val),-(threshold)),(threshold)) - namespace cv{ class AddFloatToCharScaled{ diff --git a/modules/photo/src/fast_nlmeans_denoising_invoker_commons.hpp b/modules/photo/src/fast_nlmeans_denoising_invoker_commons.hpp index d36c85a840..9da5c0cf8c 100644 --- a/modules/photo/src/fast_nlmeans_denoising_invoker_commons.hpp +++ b/modules/photo/src/fast_nlmeans_denoising_invoker_commons.hpp @@ -174,7 +174,7 @@ public: static inline int calcUpDownDist(T a_up, T a_down, T b_up, T b_down) { return calcDist(a_down, b_down) - calcDist(a_up, b_up); - }; + } template static inline WT calcWeight(double dist, const float *h, @@ -296,7 +296,7 @@ public: static inline int calcUpDownDist(T a_up, T a_down, T b_up, T b_down) { return calcUpDownDist_::f(a_up, a_down, b_up, b_down); - }; + } template static inline WT calcWeight(double dist, const float *h, diff --git a/modules/python/src2/gen2.py b/modules/python/src2/gen2.py index 78f9c79b06..ff967b90d3 100755 --- a/modules/python/src2/gen2.py +++ b/modules/python/src2/gen2.py @@ -432,7 +432,7 @@ class ClassInfo(object): if self.constructor is not None: constructor_name = self.constructor.get_wrapper_name() - return 'CVPY_TYPE({}, {}, {}, {}, {}, {}, "{}");\n'.format( + return 'CVPY_TYPE({}, {}, {}, {}, {}, {}, "{}")\n'.format( self.export_name, self.class_id, self.cname if self.issimple else "Ptr<{}>".format(self.cname), @@ -1291,7 +1291,7 @@ class PythonWrapperGenerator(object): code = "" if re.sub(r"^cv\.", "", enum_name) != wname: code += "typedef {0} {1};\n".format(cname, wname) - code += "CV_PY_FROM_ENUM({0});\nCV_PY_TO_ENUM({0});\n\n".format(wname) + code += "CV_PY_FROM_ENUM({0})\nCV_PY_TO_ENUM({0})\n\n".format(wname) self.code_enums.write(code) def save(self, path, name, buf): diff --git a/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp b/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp index 074c9b6dfb..dea76c957b 100644 --- a/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp +++ b/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp @@ -85,10 +85,10 @@ public: @param mask Image mask */ CV_WRAP virtual void apply(int index, Point corner, InputOutputArray image, InputArray mask) = 0; - CV_WRAP virtual void getMatGains(CV_OUT std::vector& ) {CV_Error(Error::StsInternal, "");}; - CV_WRAP virtual void setMatGains(std::vector& ) { CV_Error(Error::StsInternal, ""); }; - CV_WRAP void setUpdateGain(bool b) { updateGain = b; }; - CV_WRAP bool getUpdateGain() { return updateGain; }; + CV_WRAP virtual void getMatGains(CV_OUT std::vector& ) {CV_Error(Error::StsInternal, "");} + CV_WRAP virtual void setMatGains(std::vector& ) { CV_Error(Error::StsInternal, ""); } + CV_WRAP void setUpdateGain(bool b) { updateGain = b; } + CV_WRAP bool getUpdateGain() { return updateGain; } protected : bool updateGain; }; @@ -101,8 +101,8 @@ public: void feed(const std::vector &/*corners*/, const std::vector &/*images*/, const std::vector > &/*masks*/) CV_OVERRIDE { } CV_WRAP void apply(int /*index*/, Point /*corner*/, InputOutputArray /*image*/, InputArray /*mask*/) CV_OVERRIDE { } - CV_WRAP void getMatGains(CV_OUT std::vector& umv) CV_OVERRIDE { umv.clear(); return; }; - CV_WRAP void setMatGains(std::vector& umv) CV_OVERRIDE { umv.clear(); return; }; + CV_WRAP void getMatGains(CV_OUT std::vector& umv) CV_OVERRIDE { umv.clear(); return; } + CV_WRAP void setMatGains(std::vector& umv) CV_OVERRIDE { umv.clear(); return; } }; /** @brief Exposure compensator which tries to remove exposure related artifacts by adjusting image diff --git a/modules/stitching/include/opencv2/stitching/detail/matchers.hpp b/modules/stitching/include/opencv2/stitching/detail/matchers.hpp index b0ad1847cf..e25668308e 100644 --- a/modules/stitching/include/opencv2/stitching/detail/matchers.hpp +++ b/modules/stitching/include/opencv2/stitching/detail/matchers.hpp @@ -61,7 +61,7 @@ struct CV_EXPORTS_W_SIMPLE ImageFeatures CV_PROP_RW Size img_size; CV_PROP_RW std::vector keypoints; CV_PROP_RW UMat descriptors; - CV_WRAP std::vector getKeypoints() { return keypoints; }; + CV_WRAP std::vector getKeypoints() { return keypoints; } }; /** @brief @@ -109,8 +109,8 @@ struct CV_EXPORTS_W_SIMPLE MatchesInfo CV_PROP_RW int num_inliers; //!< Number of geometrically consistent matches CV_PROP_RW Mat H; //!< Estimated transformation CV_PROP_RW double confidence; //!< Confidence two images are from the same panorama - CV_WRAP std::vector getMatches() { return matches; }; - CV_WRAP std::vector getInliers() { return inliers_mask; }; + CV_WRAP std::vector getMatches() { return matches; } + CV_WRAP std::vector getInliers() { return inliers_mask; } }; /** @brief Feature matchers base class. */ @@ -138,7 +138,7 @@ public: @sa detail::MatchesInfo */ CV_WRAP_AS(apply2) void operator ()(const std::vector &features, CV_OUT std::vector &pairwise_matches, - const cv::UMat &mask = cv::UMat()) { match(features, pairwise_matches, mask); }; + const cv::UMat &mask = cv::UMat()) { match(features, pairwise_matches, mask); } /** @return True, if it's possible to use the same matcher instance in parallel, false otherwise */ diff --git a/modules/stitching/include/opencv2/stitching/warpers.hpp b/modules/stitching/include/opencv2/stitching/warpers.hpp index aa1ce5a6a7..0a5bf63de2 100644 --- a/modules/stitching/include/opencv2/stitching/warpers.hpp +++ b/modules/stitching/include/opencv2/stitching/warpers.hpp @@ -53,7 +53,7 @@ namespace cv { public: CV_WRAP PyRotationWarper(String type, float scale); - CV_WRAP PyRotationWarper() {}; + CV_WRAP PyRotationWarper() {} ~PyRotationWarper() {} /** @brief Projects the image point. diff --git a/modules/ts/include/opencv2/ts/ts_ext.hpp b/modules/ts/include/opencv2/ts/ts_ext.hpp index e7e01fb3ed..eebf4c594b 100644 --- a/modules/ts/include/opencv2/ts/ts_ext.hpp +++ b/modules/ts/include/opencv2/ts/ts_ext.hpp @@ -13,7 +13,7 @@ void checkIppStatus(); extern bool skipUnstableTests; extern bool runBigDataTests; extern int testThreads; -extern int debugLevel; //< 0 - no debug, 1 - basic test debug information, >1 - extra debug information +extern int debugLevel; ///< 0 - no debug, 1 - basic test debug information, >1 - extra debug information void testSetUp(); void testTearDown(); diff --git a/modules/video/include/opencv2/video/detail/tracking.detail.hpp b/modules/video/include/opencv2/video/detail/tracking.detail.hpp index 1e6107900d..3c7823b7dc 100644 --- a/modules/video/include/opencv2/video/detail/tracking.detail.hpp +++ b/modules/video/include/opencv2/video/detail/tracking.detail.hpp @@ -171,7 +171,7 @@ width, height, orientation, etc. class CV_EXPORTS TrackerTargetState { public: - virtual ~TrackerTargetState() {}; + virtual ~TrackerTargetState() {} /** @brief Get the position * @return The position */ diff --git a/modules/video/include/opencv2/video/tracking.hpp b/modules/video/include/opencv2/video/tracking.hpp index 7f93a79a72..8dbcfbf216 100644 --- a/modules/video/include/opencv2/video/tracking.hpp +++ b/modules/video/include/opencv2/video/tracking.hpp @@ -166,7 +166,7 @@ performance boost. The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See @cite Bouguet00 . The function is parallelized with the TBB library. -@note +@note Some examples: - An example using the Lucas-Kanade optical flow algorithm can be found at opencv_source_code/samples/cpp/lkdemo.cpp @@ -213,7 +213,7 @@ The function finds an optical flow for each prev pixel using the @cite Farneback \f[\texttt{prev} (y,x) \sim \texttt{next} ( y + \texttt{flow} (y,x)[1], x + \texttt{flow} (y,x)[0])\f] -@note +@note Some examples: - An example using the optical flow algorithm described by Gunnar Farneback can be found at opencv_source_code/samples/cpp/fback.cpp diff --git a/modules/video/src/tracking/detail/tracker_mil_model.hpp b/modules/video/src/tracking/detail/tracker_mil_model.hpp index dddfae5536..027ddd0679 100644 --- a/modules/video/src/tracking/detail/tracker_mil_model.hpp +++ b/modules/video/src/tracking/detail/tracker_mil_model.hpp @@ -36,7 +36,7 @@ public: /** * \brief Destructor */ - ~TrackerMILModel() {}; + ~TrackerMILModel() {} /** * \brief Set the mode diff --git a/modules/video/src/tracking/detail/tracker_mil_state.hpp b/modules/video/src/tracking/detail/tracker_mil_state.hpp index 12af1c33df..f4eeee9796 100644 --- a/modules/video/src/tracking/detail/tracker_mil_state.hpp +++ b/modules/video/src/tracking/detail/tracker_mil_state.hpp @@ -34,7 +34,7 @@ public: */ TrackerMILTargetState(const Point2f& position, int width, int height, bool foreground, const Mat& features); - ~TrackerMILTargetState() {}; + ~TrackerMILTargetState() {} /** @brief Set label: true for target foreground, false for background @param foreground Label for background/foreground diff --git a/modules/video/src/tracking/detail/tracking_online_mil.cpp b/modules/video/src/tracking/detail/tracking_online_mil.cpp index c9472aa947..b1d74916f7 100644 --- a/modules/video/src/tracking/detail/tracking_online_mil.cpp +++ b/modules/video/src/tracking/detail/tracking_online_mil.cpp @@ -29,7 +29,7 @@ public: bool operator<(SortableElementRev& b) { return (_val < b._val); - }; + } }; static bool CompareSortableElementRev(const SortableElementRev& i, const SortableElementRev& j) @@ -57,7 +57,7 @@ void sort_order_des(std::vector& v, std::vector& order) order[i] = v2[i]._ind; v[i] = v2[i]._val; } -}; +} //implementations for strong classifier diff --git a/modules/video/test/ocl/test_dis.cpp b/modules/video/test/ocl/test_dis.cpp index 4df7f9a197..0a49452f13 100644 --- a/modules/video/test/ocl/test_dis.cpp +++ b/modules/video/test/ocl/test_dis.cpp @@ -46,7 +46,7 @@ namespace opencv_test { namespace { -CV_ENUM(DIS_TestPresets, DISOpticalFlow::PRESET_ULTRAFAST, DISOpticalFlow::PRESET_FAST, DISOpticalFlow::PRESET_MEDIUM); +CV_ENUM(DIS_TestPresets, DISOpticalFlow::PRESET_ULTRAFAST, DISOpticalFlow::PRESET_FAST, DISOpticalFlow::PRESET_MEDIUM) typedef ocl::TSTestWithParam OCL_DenseOpticalFlow_DIS; diff --git a/modules/videoio/include/opencv2/videoio.hpp b/modules/videoio/include/opencv2/videoio.hpp index d946ccd7ce..dc1985e068 100644 --- a/modules/videoio/include/opencv2/videoio.hpp +++ b/modules/videoio/include/opencv2/videoio.hpp @@ -195,7 +195,7 @@ enum VideoCaptureProperties { CAP_PROP_HW_ACCELERATION_USE_OPENCL=52, //!< (**open-only**) If non-zero, create new OpenCL context and bind it to current thread. The OpenCL context created with Video Acceleration context attached it (if not attached yet) for optimized GPU data copy between HW accelerated decoder and cv::UMat. CAP_PROP_OPEN_TIMEOUT_MSEC=53, //!< (**open-only**) timeout in milliseconds for opening a video capture (applicable for FFmpeg and GStreamer back-ends only) CAP_PROP_READ_TIMEOUT_MSEC=54, //!< (**open-only**) timeout in milliseconds for reading from a video capture (applicable for FFmpeg and GStreamer back-ends only) - CAP_PROP_STREAM_OPEN_TIME_USEC =55, // param; class AudioBaseTest { protected: - AudioBaseTest(){}; + AudioBaseTest(){} void getValidAudioData() { const double step = 3.14/22050; @@ -157,7 +157,7 @@ public: params = { CAP_PROP_AUDIO_STREAM, 0, CAP_PROP_VIDEO_STREAM, 0, CAP_PROP_AUDIO_DATA_DEPTH, CV_16S }; - }; + } void doTest() { diff --git a/modules/videoio/test/test_precomp.hpp b/modules/videoio/test/test_precomp.hpp index fe2a65b1be..61ecec609d 100644 --- a/modules/videoio/test/test_precomp.hpp +++ b/modules/videoio/test/test_precomp.hpp @@ -94,11 +94,11 @@ inline void generateFrame(int i, int FRAME_COUNT, cv::Mat & frame) class BunnyParameters { public: - inline static int getWidth() { return 672; }; - inline static int getHeight() { return 384; }; - inline static int getFps() { return 24; }; - inline static double getTime() { return 5.21; }; - inline static int getCount() { return cvRound(getFps() * getTime()); }; + inline static int getWidth() { return 672; } + inline static int getHeight() { return 384; } + inline static int getFps() { return 24; } + inline static double getTime() { return 5.21; } + inline static int getCount() { return cvRound(getFps() * getTime()); } inline static std::string getFilename(const std::string &ext) { return cvtest::TS::ptr()->get_data_path() + "video/big_buck_bunny" + ext; diff --git a/samples/cpp/train_HOG.cpp b/samples/cpp/train_HOG.cpp index 4a160fe4eb..c8355ee591 100644 --- a/samples/cpp/train_HOG.cpp +++ b/samples/cpp/train_HOG.cpp @@ -47,7 +47,7 @@ void convert_to_ml( const vector< Mat > & train_samples, Mat& trainData ) //--Convert data const int rows = (int)train_samples.size(); const int cols = (int)std::max( train_samples[0].cols, train_samples[0].rows ); - Mat tmp( 1, cols, CV_32FC1 ); //< used for transposition if needed + Mat tmp( 1, cols, CV_32FC1 ); ///< used for transposition if needed trainData = Mat( rows, cols, CV_32FC1 ); for( size_t i = 0 ; i < train_samples.size(); ++i )