From b2135be5942c98cd638f3cef4845672573668d73 Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Wed, 24 Jul 2019 14:12:40 -0500 Subject: [PATCH 1/7] fast_math: add extra perf/unit tests Add a basic sanity test to verify the rounding functions work as expected. Likewise, extend the rounding performance test to cover the additional float -> int fast math functions. --- modules/core/perf/perf_cvround.cpp | 80 +++++++++++++++++------------- modules/core/test/test_math.cpp | 54 ++++++++++++++++++++ 2 files changed, 99 insertions(+), 35 deletions(-) diff --git a/modules/core/perf/perf_cvround.cpp b/modules/core/perf/perf_cvround.cpp index 933792dcaa..0e3ceb0597 100644 --- a/modules/core/perf/perf_cvround.cpp +++ b/modules/core/perf/perf_cvround.cpp @@ -4,42 +4,52 @@ namespace opencv_test { using namespace perf; -template -static void CvRoundMat(const cv::Mat & src, cv::Mat & dst) -{ - for (int y = 0; y < dst.rows; ++y) - { - const T * sptr = src.ptr(y); - int * dptr = dst.ptr(y); - - for (int x = 0; x < dst.cols; ++x) - dptr[x] = cvRound(sptr[x]); - } -} - -PERF_TEST_P(Size_MatType, CvRound_Float, - testing::Combine(testing::Values(TYPICAL_MAT_SIZES), - testing::Values(CV_32FC1, CV_64FC1))) -{ - Size size = get<0>(GetParam()); - int type = get<1>(GetParam()), depth = CV_MAT_DEPTH(type); - - cv::Mat src(size, type), dst(size, CV_32SC1); - - declare.in(src, WARMUP_RNG).out(dst); - - if (depth == CV_32F) - { - TEST_CYCLE() - CvRoundMat(src, dst); - } - else if (depth == CV_64F) - { - TEST_CYCLE() - CvRoundMat(src, dst); +#define DECL_ROUND_TEST(NAME, OP, EXTRA) \ + template \ + static void OP ## Mat(const cv::Mat & src, cv::Mat & dst) \ + { \ + for (int y = 0; y < dst.rows; ++y) \ + { \ + const T * sptr = src.ptr(y); \ + int * dptr = dst.ptr(y); \ + \ + for (int x = 0; x < dst.cols; ++x) \ + dptr[x] = OP(sptr[x]) EXTRA; \ + } \ + } \ + \ + PERF_TEST_P(Size_MatType, CvRound_Float ## NAME, \ + testing::Combine(testing::Values(TYPICAL_MAT_SIZES), \ + testing::Values(CV_32FC1, CV_64FC1))) \ + { \ + Size size = get<0>(GetParam()); \ + int type = get<1>(GetParam()), depth = CV_MAT_DEPTH(type); \ + \ + cv::Mat src(size, type), dst(size, CV_32SC1); \ + \ + declare.in(src, WARMUP_RNG).out(dst); \ + \ + if (depth == CV_32F) \ + { \ + TEST_CYCLE() \ + OP ## Mat(src, dst); \ + } \ + else if (depth == CV_64F) \ + { \ + TEST_CYCLE() \ + OP ## Mat(src, dst); \ + } \ + \ + SANITY_CHECK_NOTHING(); \ } - SANITY_CHECK_NOTHING(); -} +DECL_ROUND_TEST(,cvRound,) +DECL_ROUND_TEST(_Ceil,cvCeil,) +DECL_ROUND_TEST(_Floor,cvFloor,) + +/* For FP classification tests, try to test them in way which uses + branching logic and avoids extra FP logic. */ +DECL_ROUND_TEST(_NaN,cvIsNaN, ? 1 : 2) +DECL_ROUND_TEST(_Inf,cvIsInf, ? 1 : 2) } // namespace diff --git a/modules/core/test/test_math.cpp b/modules/core/test/test_math.cpp index d65b3fa39e..8b13a391cb 100644 --- a/modules/core/test/test_math.cpp +++ b/modules/core/test/test_math.cpp @@ -3923,5 +3923,59 @@ TEST(Core_SoftFloat, CvRound) } } +template +static void checkRounding(T in, int outCeil, int outFloor) +{ + EXPECT_EQ(outCeil,cvCeil(in)); + EXPECT_EQ(outFloor,cvFloor(in)); + + /* cvRound is not expected to be IEEE compliant. The implementation + should round to one of the above. */ + EXPECT_TRUE((cvRound(in) == outCeil) || (cvRound(in) == outFloor)); +} + +TEST(Core_FastMath, InlineRoundingOps) +{ + struct + { + double in; + int outCeil; + int outFloor; + } values[] = + { + // Values are chosen to convert to binary float 32/64 exactly + { 1.0, 1, 1 }, + { 1.5, 2, 1 }, + { -1.5, -1, -2} + }; + + for (int i = 0, maxi = sizeof(values) / sizeof(values[0]); i < maxi; i++) + { + checkRounding(values[i].in, values[i].outCeil, values[i].outFloor); + checkRounding((float)values[i].in, values[i].outCeil, values[i].outFloor); + } +} + +TEST(Core_FastMath, InlineNaN) +{ + EXPECT_EQ( cvIsNaN((float) NAN), 1); + EXPECT_EQ( cvIsNaN((float) -NAN), 1); + EXPECT_EQ( cvIsNaN(0.0f), 0); + EXPECT_EQ( cvIsNaN((double) NAN), 1); + EXPECT_EQ( cvIsNaN((double) -NAN), 1); + EXPECT_EQ( cvIsNaN(0.0), 0); +} + +TEST(Core_FastMath, InlineIsInf) +{ + // Assume HUGE_VAL is infinity. Strictly speaking, may not always be true. + EXPECT_EQ( cvIsInf((float) HUGE_VAL), 1); + EXPECT_EQ( cvIsInf((float) -HUGE_VAL), 1); + EXPECT_EQ( cvIsInf(0.0f), 0); + EXPECT_EQ( cvIsInf((double) HUGE_VAL), 1); + EXPECT_EQ( cvIsInf((double) -HUGE_VAL), 1); + EXPECT_EQ( cvIsInf(0.0), 0); +} + }} // namespace /* End of file. */ From 3f92bcc11ab122b6cb5167c3548a0e2ce306c94d Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Mon, 22 Jul 2019 14:23:49 -0500 Subject: [PATCH 2/7] fast_math: selectively use GCC rounding builtins when available Add a new macro definition OPENCV_USE_FASTMATH_GCC_BUILTINS to enable usage of GCC inline math functions, if available and requested by the user. Likewise, enable it for POWER. This is nearly always a substantial improvement over using integer manipulation as most operations can be done in several instructions with no branching. The result is a 1.5-1.8x speedup in the ceil/floor operations. 1. As tested with AT 12.0-1 (GCC 8.3.1) compiler on P9 LE. --- .../core/include/opencv2/core/fast_math.hpp | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/modules/core/include/opencv2/core/fast_math.hpp b/modules/core/include/opencv2/core/fast_math.hpp index d9ea28e632..6eb6f1fa00 100644 --- a/modules/core/include/opencv2/core/fast_math.hpp +++ b/modules/core/include/opencv2/core/fast_math.hpp @@ -92,6 +92,19 @@ #define ARM_ROUND_FLT(value) ARM_ROUND(value, "vcvtr.s32.f32 %[temp], %[value]\n vmov %[res], %[temp]") #endif +#if defined __PPC64__ && !defined OPENCV_USE_FASTMATH_GCC_BUILTINS + /* Let GCC inline C math functions when available. Dedicated hardware is available to + round and covert FP values. */ + #define OPENCV_USE_FASTMATH_GCC_BUILTINS +#endif + +/* Enable GCC builtin math functions if possible, desired, and available. + Note, not all math functions inline equally. E.g lrint will not inline + without the -fno-math-errno option. */ +#if defined OPENCV_USE_FASTMATH_GCC_BUILTINS && defined __GNUC__ && !defined __clang__ && !defined (__CUDACC__) + #define _OPENCV_FASTMATH_ENABLE_GCC_MATH_BUILTINS +#endif + /** @brief Rounds floating-point number to the nearest integer @param value floating-point number. If the value is outside of INT_MIN ... INT_MAX range, the @@ -138,8 +151,12 @@ cvRound( double value ) */ CV_INLINE int cvFloor( double value ) { +#if defined _OPENCV_FASTMATH_ENABLE_GCC_MATH_BUILTINS + return __builtin_floor(value); +#else int i = (int)value; return i - (i > value); +#endif } /** @brief Rounds floating-point number to the nearest integer not smaller than the original. @@ -151,8 +168,12 @@ CV_INLINE int cvFloor( double value ) */ CV_INLINE int cvCeil( double value ) { +#if defined _OPENCV_FASTMATH_ENABLE_GCC_MATH_BUILTINS + return __builtin_ceil(value); +#else int i = (int)value; return i + (i < value); +#endif } /** @brief Determines if the argument is Not A Number. @@ -225,8 +246,12 @@ CV_INLINE int cvRound( int value ) /** @overload */ CV_INLINE int cvFloor( float value ) { +#if defined _OPENCV_FASTMATH_ENABLE_GCC_MATH_BUILTINS + return __builtin_floorf(value); +#else int i = (int)value; return i - (i > value); +#endif } /** @overload */ @@ -238,8 +263,12 @@ CV_INLINE int cvFloor( int value ) /** @overload */ CV_INLINE int cvCeil( float value ) { +#if defined _OPENCV_FASTMATH_ENABLE_GCC_MATH_BUILTINS + return __builtin_ceilf(value); +#else int i = (int)value; return i + (i < value); +#endif } /** @overload */ From f38a61c66d8e45ad0b5e21bdc6e55223d1cdb59e Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Mon, 22 Jul 2019 14:23:56 -0500 Subject: [PATCH 3/7] fast_math: implement optimized PPC routines Implement cvRound using inline asm. No compiler support exists today to properly optimize this. This results in about a 4x speedup over the default rounding. Likewise, simplify the growing number of rounding function overloads. For P9 enabled targets, utilize the classification testing instruction to test for Inf/Nan values. Operation speedup is about 1.2x for FP32, and 1.5x for FP64 operands. For P8 targets, fallback to the GCC nan inline. It provides a 1.1/1.4x improvement for FP32/FP64 arguments. --- .../core/include/opencv2/core/fast_math.hpp | 84 ++++++++++++++----- 1 file changed, 62 insertions(+), 22 deletions(-) diff --git a/modules/core/include/opencv2/core/fast_math.hpp b/modules/core/include/opencv2/core/fast_math.hpp index 6eb6f1fa00..b1e8c4202d 100644 --- a/modules/core/include/opencv2/core/fast_math.hpp +++ b/modules/core/include/opencv2/core/fast_math.hpp @@ -74,7 +74,15 @@ # include "tegra_round.hpp" #endif -#if defined __GNUC__ && defined __arm__ && (defined __ARM_PCS_VFP || defined __ARM_VFPV3__ || defined __ARM_NEON__) && !defined __SOFTFP__ && !defined(__CUDACC__) +#if defined __PPC64__ && defined __GNUC__ && defined _ARCH_PWR8 && !defined (__CUDACC__) +# include +#endif + +#if ((defined _MSC_VER && defined _M_ARM) || defined CV_ICC || \ + defined __GNUC__) && defined HAVE_TEGRA_OPTIMIZATION + #define CV_INLINE_ROUND_DBL(value) TEGRA_ROUND_DBL(value); + #define CV_INLINE_ROUND_FLT(value) TEGRA_ROUND_FLT(value); +#elif defined __GNUC__ && defined __arm__ && (defined __ARM_PCS_VFP || defined __ARM_VFPV3__ || defined __ARM_NEON__) && !defined __SOFTFP__ && !defined(__CUDACC__) // 1. general scheme #define ARM_ROUND(_value, _asm_string) \ int res; \ @@ -84,12 +92,32 @@ return res // 2. version for double #ifdef __clang__ - #define ARM_ROUND_DBL(value) ARM_ROUND(value, "vcvtr.s32.f64 %[temp], %[value] \n vmov %[res], %[temp]") + #define CV_INLINE_ROUND_DBL(value) ARM_ROUND(value, "vcvtr.s32.f64 %[temp], %[value] \n vmov %[res], %[temp]") #else - #define ARM_ROUND_DBL(value) ARM_ROUND(value, "vcvtr.s32.f64 %[temp], %P[value] \n vmov %[res], %[temp]") + #define CV_INLINE_ROUND_DBL(value) ARM_ROUND(value, "vcvtr.s32.f64 %[temp], %P[value] \n vmov %[res], %[temp]") #endif // 3. version for float - #define ARM_ROUND_FLT(value) ARM_ROUND(value, "vcvtr.s32.f32 %[temp], %[value]\n vmov %[res], %[temp]") + #define CV_INLINE_ROUND_FLT(value) ARM_ROUND(value, "vcvtr.s32.f32 %[temp], %[value]\n vmov %[res], %[temp]") +#elif defined __PPC64__ && defined __GNUC__ && defined _ARCH_PWR8 && !defined (__CUDACC__) + // P8 and newer machines can convert fp32/64 to int quickly. + #define CV_INLINE_ROUND_DBL(value) \ + int out; \ + double temp; \ + __asm__( "fctiw %[temp],%[in]\n\tmffprwz %[out],%[temp]\n\t" : [out] "=r" (out), [temp] "=d" (temp) : [in] "d" ((double)(value)) : ); \ + return out; + + // FP32 also works with FP64 routine above + #define CV_INLINE_ROUND_FLT(value) CV_INLINE_ROUND_DBL(value) + + #ifdef _ARCH_PWR9 + #define CV_INLINE_ISINF_DBL(value) return scalar_test_data_class(value, 0x30); + #define CV_INLINE_ISNAN_DBL(value) return scalar_test_data_class(value, 0x40); + #define CV_INLINE_ISINF_FLT(value) CV_INLINE_ISINF_DBL(value) + #define CV_INLINE_ISNAN_FLT(value) CV_INLINE_ISNAN_DBL(value) + #endif +#elif defined CV_ICC || defined __GNUC__ + #define CV_INLINE_ROUND_DBL(value) return (int)(lrint(value)); + #define CV_INLINE_ROUND_FLT(value) return (int)(lrintf(value)); #endif #if defined __PPC64__ && !defined OPENCV_USE_FASTMATH_GCC_BUILTINS @@ -105,6 +133,16 @@ #define _OPENCV_FASTMATH_ENABLE_GCC_MATH_BUILTINS #endif +/* Allow overrides for some functions which may benefit from tuning. Likewise, + note that isinf is not used as the return value is signed. */ +#if defined _OPENCV_FASTMATH_ENABLE_GCC_MATH_BUILTINS && !defined CV_INLINE_ISNAN_DBL + #define CV_INLINE_ISNAN_DBL(value) return __builtin_isnan(value); +#endif + +#if defined _OPENCV_FASTMATH_ENABLE_GCC_MATH_BUILTINS && !defined CV_INLINE_ISNAN_FLT + #define CV_INLINE_ISNAN_FLT(value) return __builtin_isnanf(value); +#endif + /** @brief Rounds floating-point number to the nearest integer @param value floating-point number. If the value is outside of INT_MIN ... INT_MAX range, the @@ -125,15 +163,8 @@ cvRound( double value ) fistp t; } return t; -#elif ((defined _MSC_VER && defined _M_ARM) || defined CV_ICC || \ - defined __GNUC__) && defined HAVE_TEGRA_OPTIMIZATION - TEGRA_ROUND_DBL(value); -#elif defined CV_ICC || defined __GNUC__ -# if defined ARM_ROUND_DBL - ARM_ROUND_DBL(value); -# else - return (int)lrint(value); -# endif +#elif defined CV_INLINE_ROUND_DBL + CV_INLINE_ROUND_DBL(value); #else /* it's ok if round does not comply with IEEE754 standard; the tests should allow +/-1 difference when the tested functions use round */ @@ -184,10 +215,14 @@ CV_INLINE int cvCeil( double value ) otherwise. */ CV_INLINE int cvIsNaN( double value ) { +#if defined CV_INLINE_ISNAN_DBL + CV_INLINE_ISNAN_DBL(value); +#else Cv64suf ieee754; ieee754.f = value; return ((unsigned)(ieee754.u >> 32) & 0x7fffffff) + ((unsigned)ieee754.u != 0) > 0x7ff00000; +#endif } /** @brief Determines if the argument is Infinity. @@ -198,10 +233,14 @@ CV_INLINE int cvIsNaN( double value ) and 0 otherwise. */ CV_INLINE int cvIsInf( double value ) { +#if defined CV_INLINE_ISINF_DBL + CV_INLINE_ISINF_DBL(value); +#else Cv64suf ieee754; ieee754.f = value; return ((unsigned)(ieee754.u >> 32) & 0x7fffffff) == 0x7ff00000 && (unsigned)ieee754.u == 0; +#endif } #ifdef __cplusplus @@ -221,15 +260,8 @@ CV_INLINE int cvRound(float value) fistp t; } return t; -#elif ((defined _MSC_VER && defined _M_ARM) || defined CV_ICC || \ - defined __GNUC__) && defined HAVE_TEGRA_OPTIMIZATION - TEGRA_ROUND_FLT(value); -#elif defined CV_ICC || defined __GNUC__ -# if defined ARM_ROUND_FLT - ARM_ROUND_FLT(value); -# else - return (int)lrintf(value); -# endif +#elif defined CV_INLINE_ROUND_FLT + CV_INLINE_ROUND_FLT(value); #else /* it's ok if round does not comply with IEEE754 standard; the tests should allow +/-1 difference when the tested functions use round */ @@ -280,17 +312,25 @@ CV_INLINE int cvCeil( int value ) /** @overload */ CV_INLINE int cvIsNaN( float value ) { +#if defined CV_INLINE_ISNAN_FLT + CV_INLINE_ISNAN_FLT(value); +#else Cv32suf ieee754; ieee754.f = value; return (ieee754.u & 0x7fffffff) > 0x7f800000; +#endif } /** @overload */ CV_INLINE int cvIsInf( float value ) { +#if defined CV_INLINE_ISINF_FLT + CV_INLINE_ISINF_FLT(value); +#else Cv32suf ieee754; ieee754.f = value; return (ieee754.u & 0x7fffffff) == 0x7f800000; +#endif } #endif // __cplusplus From 5ef548a985fc64dc89e8a6fdfa4e3889b1519780 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 18 Jul 2019 13:22:02 +0300 Subject: [PATCH 4/7] cmake: update initialization --- 3rdparty/libjpeg/CMakeLists.txt | 7 -- CMakeLists.txt | 115 +++++++++------------- cmake/OpenCVCRTLinkage.cmake | 10 -- cmake/OpenCVCompilerOptions.cmake | 5 - cmake/OpenCVMinDepVersions.cmake | 4 +- cmake/OpenCVModule.cmake | 4 - cmake/OpenCVUtils.cmake | 3 +- cmake/platforms/OpenCV-Android.cmake | 1 + cmake/platforms/OpenCV-Darwin.cmake | 1 + cmake/platforms/OpenCV-Linux.cmake | 1 + cmake/platforms/OpenCV-WinRT.cmake | 31 ++++++ cmake/platforms/OpenCV-Windows.cmake | 1 + cmake/platforms/OpenCV-WindowsCE.cmake | 1 + cmake/platforms/OpenCV-WindowsPhone.cmake | 6 ++ cmake/platforms/OpenCV-WindowsStore.cmake | 1 + cmake/platforms/OpenCV-iOS.cmake | 1 + modules/core/CMakeLists.txt | 2 +- platforms/android/android.toolchain.cmake | 3 + 18 files changed, 101 insertions(+), 96 deletions(-) create mode 100644 cmake/platforms/OpenCV-Android.cmake create mode 100644 cmake/platforms/OpenCV-Darwin.cmake create mode 100644 cmake/platforms/OpenCV-Linux.cmake create mode 100644 cmake/platforms/OpenCV-WinRT.cmake create mode 100644 cmake/platforms/OpenCV-Windows.cmake create mode 100644 cmake/platforms/OpenCV-WindowsCE.cmake create mode 100644 cmake/platforms/OpenCV-WindowsPhone.cmake create mode 100644 cmake/platforms/OpenCV-WindowsStore.cmake create mode 100644 cmake/platforms/OpenCV-iOS.cmake diff --git a/3rdparty/libjpeg/CMakeLists.txt b/3rdparty/libjpeg/CMakeLists.txt index 4d06bbffd6..b50fc09840 100644 --- a/3rdparty/libjpeg/CMakeLists.txt +++ b/3rdparty/libjpeg/CMakeLists.txt @@ -15,13 +15,6 @@ else() ocv_list_filterout(lib_srcs jmemnobs.c) endif() -if(WINRT) - add_definitions(-DNO_GETENV) - get_directory_property( DirDefs COMPILE_DEFINITIONS ) - message(STATUS "Adding NO_GETENV to compiler definitions for WINRT:") - message(STATUS " COMPILE_DEFINITIONS = ${DirDefs}") -endif() - # ---------------------------------------------------------------------------------- # Define the library target: # ---------------------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index bc90983453..4ac553bbde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,40 +29,19 @@ else() cmake_minimum_required(VERSION "${MIN_VER_CMAKE}" FATAL_ERROR) endif() -option(ENABLE_PIC "Generate position independent code (necessary for shared libraries)" TRUE) -set(CMAKE_POSITION_INDEPENDENT_CODE ${ENABLE_PIC}) - -set(OPENCV_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0" CACHE STRING "URI to a MathJax installation") - -# Following block can break build in case of cross-compiling -# but CMAKE_CROSSCOMPILING variable will be set only on project(OpenCV) command -# so we will try to detect cross-compiling by the presence of CMAKE_TOOLCHAIN_FILE -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - if(NOT CMAKE_TOOLCHAIN_FILE) - # it _must_ go before project(OpenCV) in order to work - if(WIN32) - set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") - else() - set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory") - endif() - else() - #Android: set output folder to ${CMAKE_BINARY_DIR} - set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are compiled to" ) - # any cross-compiling - set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") - endif() -endif() - +# +# Configure CMake policies +# if(POLICY CMP0026) cmake_policy(SET CMP0026 NEW) endif() if(POLICY CMP0042) - cmake_policy(SET CMP0042 NEW) + cmake_policy(SET CMP0042 NEW) # CMake 3.0+ (2.8.12): MacOS "@rpath" in target's install name endif() if(POLICY CMP0046) - cmake_policy(SET CMP0046 NEW) + cmake_policy(SET CMP0046 NEW) # warn about non-existed dependencies endif() if(POLICY CMP0051) @@ -74,17 +53,21 @@ if(POLICY CMP0054) # CMake 3.1: Only interpret if() arguments as variables or k endif() if(POLICY CMP0056) - cmake_policy(SET CMP0056 NEW) + cmake_policy(SET CMP0056 NEW) # try_compile(): link flags endif() if(POLICY CMP0067) - cmake_policy(SET CMP0067 NEW) + cmake_policy(SET CMP0067 NEW) # CMake 3.8: try_compile(): honor language standard variables (like C++11) endif() if(POLICY CMP0068) cmake_policy(SET CMP0068 NEW) # CMake 3.9+: `RPATH` settings on macOS do not affect `install_name`. endif() + +# +# Configure OpenCV CMake hooks +# include(cmake/OpenCVUtils.cmake) ocv_cmake_reset_hooks() ocv_check_environment_variables(OPENCV_CMAKE_HOOKS_DIR) @@ -97,49 +80,46 @@ endif() ocv_cmake_hook(CMAKE_INIT) -# must go before the project command +# must go before the project()/enable_language() commands ocv_update(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE) if(DEFINED CMAKE_BUILD_TYPE) - set_property( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} ) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${CMAKE_CONFIGURATION_TYPES}") +endif() + +option(ENABLE_PIC "Generate position independent code (necessary for shared libraries)" TRUE) +set(CMAKE_POSITION_INDEPENDENT_CODE ${ENABLE_PIC}) + +ocv_cmake_hook(PRE_CMAKE_BOOTSTRAP) + +# Bootstap CMake system: setup CMAKE_SYSTEM_NAME and other vars +enable_language(CXX C) + +ocv_cmake_hook(POST_CMAKE_BOOTSTRAP) + +if(NOT OPENCV_SKIP_CMAKE_SYSTEM_FILE) + include("cmake/platforms/OpenCV-${CMAKE_SYSTEM_NAME}.cmake" OPTIONAL RESULT_VARIABLE "OPENCV_CMAKE_SYSTEM_FILE") + if(NOT OPENCV_CMAKE_SYSTEM_FILE) + message(STATUS "OpenCV: system-specific configuration file is not found: '${CMAKE_SYSTEM_NAME}'") + endif() +endif() + +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) # https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT.html + if(NOT CMAKE_TOOLCHAIN_FILE) + if(WIN32) + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory" FORCE) + else() + set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory" FORCE) + endif() + else() + # any cross-compiling + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory" FORCE) + endif() endif() enable_testing() project(OpenCV CXX C) -if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore) - set(WINRT TRUE) -endif() - -if(WINRT OR WINCE) - add_definitions(-DNO_GETENV) -endif() - -if(WINRT) - add_definitions(-DWINRT) - - # Making definitions available to other configurations and - # to filter dependency restrictions at compile time. - if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone) - set(WINRT_PHONE TRUE) - add_definitions(-DWINRT_PHONE) - elseif(CMAKE_SYSTEM_NAME MATCHES WindowsStore) - set(WINRT_STORE TRUE) - add_definitions(-DWINRT_STORE) - endif() - - if(CMAKE_SYSTEM_VERSION MATCHES 10) - set(WINRT_10 TRUE) - add_definitions(-DWINRT_10) - elseif(CMAKE_SYSTEM_VERSION MATCHES 8.1) - set(WINRT_8_1 TRUE) - add_definitions(-DWINRT_8_1) - elseif(CMAKE_SYSTEM_VERSION MATCHES 8.0) - set(WINRT_8_0 TRUE) - add_definitions(-DWINRT_8_0) - endif() -endif() - if(MSVC) set(CMAKE_USE_RELATIVE_PATHS ON CACHE INTERNAL "" FORCE) endif() @@ -511,6 +491,7 @@ if(ENABLE_IMPL_COLLECTION) add_definitions(-DCV_COLLECT_IMPL_DATA) endif() +set(OPENCV_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0" CACHE STRING "URI to a MathJax installation") # ---------------------------------------------------------------------------- # Get actual OpenCV version number from sources @@ -665,12 +646,12 @@ endif() if(WIN32) # Postfix of DLLs: - set(OPENCV_DLLVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}") - set(OPENCV_DEBUG_POSTFIX d) + ocv_update(OPENCV_DLLVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}") + ocv_update(OPENCV_DEBUG_POSTFIX d) else() # Postfix of so's: - set(OPENCV_DLLVERSION "") - set(OPENCV_DEBUG_POSTFIX "") + ocv_update(OPENCV_DLLVERSION "") + ocv_update(OPENCV_DEBUG_POSTFIX "") endif() if(DEFINED CMAKE_DEBUG_POSTFIX) diff --git a/cmake/OpenCVCRTLinkage.cmake b/cmake/OpenCVCRTLinkage.cmake index 4916800211..b87dfd3a7c 100644 --- a/cmake/OpenCVCRTLinkage.cmake +++ b/cmake/OpenCVCRTLinkage.cmake @@ -4,16 +4,6 @@ if(NOT MSVC) message(FATAL_ERROR "CRT options are available only for MSVC") endif() -if (WINRT) - if (CMAKE_SYSTEM_VERSION MATCHES 10) - add_definitions(/DWINVER=_WIN32_WINNT_WIN10 /DNTDDI_VERSION=NTDDI_WIN10 /D_WIN32_WINNT=_WIN32_WINNT_WIN10) - elseif(CMAKE_SYSTEM_VERSION MATCHES 8.1) - add_definitions(/DWINVER=_WIN32_WINNT_WINBLUE /DNTDDI_VERSION=NTDDI_WINBLUE /D_WIN32_WINNT=_WIN32_WINNT_WINBLUE) - else() - add_definitions(/DWINVER=_WIN32_WINNT_WIN8 /DNTDDI_VERSION=NTDDI_WIN8 /D_WIN32_WINNT=_WIN32_WINNT_WIN8) - endif() -endif() - # Removing LNK4075 warnings for debug WinRT builds # "LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification" # "LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification" diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake index 0b9d6692a4..b166f4c7de 100644 --- a/cmake/OpenCVCompilerOptions.cmake +++ b/cmake/OpenCVCompilerOptions.cmake @@ -280,11 +280,6 @@ if(MSVC) endif() endif() -# Adding additional using directory for WindowsPhone 8.0 to get Windows.winmd properly -if(WINRT_PHONE AND WINRT_8_0) - set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS} /AI\$(WindowsSDK_MetadataPath)") -endif() - include(cmake/OpenCVCompilerOptimizations.cmake) if(COMMAND ocv_compiler_optimization_options) ocv_compiler_optimization_options() diff --git a/cmake/OpenCVMinDepVersions.cmake b/cmake/OpenCVMinDepVersions.cmake index a7e2477956..e67856bb97 100644 --- a/cmake/OpenCVMinDepVersions.cmake +++ b/cmake/OpenCVMinDepVersions.cmake @@ -1,4 +1,6 @@ -set(MIN_VER_CMAKE 2.8.12.2) +if(NOT DEFINED MIN_VER_CMAKE) + set(MIN_VER_CMAKE 2.8.12.2) +endif() set(MIN_VER_CUDA 6.5) set(MIN_VER_PYTHON2 2.7) set(MIN_VER_PYTHON3 3.2) diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index 3f7dfdc6d6..8b1267d951 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -1193,10 +1193,6 @@ endfunction() function(ocv_add_accuracy_tests) ocv_debug_message("ocv_add_accuracy_tests(" ${ARGN} ")") - if(WINRT) - set(OPENCV_DEBUG_POSTFIX "") - endif() - set(test_path "${CMAKE_CURRENT_LIST_DIR}/test") if(BUILD_TESTS AND EXISTS "${test_path}") __ocv_parse_test_sources(TEST ${ARGN}) diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index f8ff242948..541771411d 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -16,7 +16,8 @@ function(ocv_cmake_dump_vars) string(TOLOWER "${__variableName}" __variableName_lower) if((__variableName MATCHES "${regex}" OR __variableName_lower MATCHES "${regex_lower}") AND NOT __variableName_lower MATCHES "^__") - set(__VARS "${__VARS}${__variableName}=${${__variableName}}\n") + get_property(__value VARIABLE PROPERTY "${__variableName}") + set(__VARS "${__VARS}${__variableName}=${__value}\n") endif() endforeach() if(DUMP_TOFILE) diff --git a/cmake/platforms/OpenCV-Android.cmake b/cmake/platforms/OpenCV-Android.cmake new file mode 100644 index 0000000000..1bb8bf6d7f --- /dev/null +++ b/cmake/platforms/OpenCV-Android.cmake @@ -0,0 +1 @@ +# empty diff --git a/cmake/platforms/OpenCV-Darwin.cmake b/cmake/platforms/OpenCV-Darwin.cmake new file mode 100644 index 0000000000..1bb8bf6d7f --- /dev/null +++ b/cmake/platforms/OpenCV-Darwin.cmake @@ -0,0 +1 @@ +# empty diff --git a/cmake/platforms/OpenCV-Linux.cmake b/cmake/platforms/OpenCV-Linux.cmake new file mode 100644 index 0000000000..1bb8bf6d7f --- /dev/null +++ b/cmake/platforms/OpenCV-Linux.cmake @@ -0,0 +1 @@ +# empty diff --git a/cmake/platforms/OpenCV-WinRT.cmake b/cmake/platforms/OpenCV-WinRT.cmake new file mode 100644 index 0000000000..0a5e9f3c7d --- /dev/null +++ b/cmake/platforms/OpenCV-WinRT.cmake @@ -0,0 +1,31 @@ +set(WINRT TRUE) + +add_definitions(-DWINRT -DNO_GETENV) + +# Making definitions available to other configurations and +# to filter dependency restrictions at compile time. +if(WINDOWS_PHONE) + set(WINRT_PHONE TRUE) + add_definitions(-DWINRT_PHONE) +elseif(WINDOWS_STORE) + set(WINRT_STORE TRUE) + add_definitions(-DWINRT_STORE) +endif() + +if(CMAKE_SYSTEM_VERSION MATCHES 10) + set(WINRT_10 TRUE) + add_definitions(-DWINRT_10) + add_definitions(/DWINVER=_WIN32_WINNT_WIN10 /DNTDDI_VERSION=NTDDI_WIN10 /D_WIN32_WINNT=_WIN32_WINNT_WIN10) +elseif(CMAKE_SYSTEM_VERSION MATCHES 8.1) + set(WINRT_8_1 TRUE) + add_definitions(-DWINRT_8_1) + add_definitions(/DWINVER=_WIN32_WINNT_WINBLUE /DNTDDI_VERSION=NTDDI_WINBLUE /D_WIN32_WINNT=_WIN32_WINNT_WINBLUE) +elseif(CMAKE_SYSTEM_VERSION MATCHES 8.0) + set(WINRT_8_0 TRUE) + add_definitions(-DWINRT_8_0) + add_definitions(/DWINVER=_WIN32_WINNT_WIN8 /DNTDDI_VERSION=NTDDI_WIN8 /D_WIN32_WINNT=_WIN32_WINNT_WIN8) +else() + message(STATUS "Unsupported WINRT version (consider upgrading OpenCV): ${CMAKE_SYSTEM_VERSION}") +endif() + +set(OPENCV_DEBUG_POSTFIX "") diff --git a/cmake/platforms/OpenCV-Windows.cmake b/cmake/platforms/OpenCV-Windows.cmake new file mode 100644 index 0000000000..1bb8bf6d7f --- /dev/null +++ b/cmake/platforms/OpenCV-Windows.cmake @@ -0,0 +1 @@ +# empty diff --git a/cmake/platforms/OpenCV-WindowsCE.cmake b/cmake/platforms/OpenCV-WindowsCE.cmake new file mode 100644 index 0000000000..f5ac590754 --- /dev/null +++ b/cmake/platforms/OpenCV-WindowsCE.cmake @@ -0,0 +1 @@ +add_definitions(-DNO_GETENV) diff --git a/cmake/platforms/OpenCV-WindowsPhone.cmake b/cmake/platforms/OpenCV-WindowsPhone.cmake new file mode 100644 index 0000000000..8a496d3a7b --- /dev/null +++ b/cmake/platforms/OpenCV-WindowsPhone.cmake @@ -0,0 +1,6 @@ +include("${CMAKE_CURRENT_LIST_DIR}/OpenCV_WinRT.cmake") + +# Adding additional using directory for WindowsPhone 8.0 to get Windows.winmd properly +if(WINRT_8_0) + set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS} /AI\$(WindowsSDK_MetadataPath)") +endif() diff --git a/cmake/platforms/OpenCV-WindowsStore.cmake b/cmake/platforms/OpenCV-WindowsStore.cmake new file mode 100644 index 0000000000..8b5dfa5556 --- /dev/null +++ b/cmake/platforms/OpenCV-WindowsStore.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/OpenCV_WinRT.cmake") diff --git a/cmake/platforms/OpenCV-iOS.cmake b/cmake/platforms/OpenCV-iOS.cmake new file mode 100644 index 0000000000..1bb8bf6d7f --- /dev/null +++ b/cmake/platforms/OpenCV-iOS.cmake @@ -0,0 +1 @@ +# empty diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt index 96c190f5b8..25cd0d2f68 100644 --- a/modules/core/CMakeLists.txt +++ b/modules/core/CMakeLists.txt @@ -23,7 +23,7 @@ ocv_add_module(core set(extra_libs "") -if(WINRT AND CMAKE_SYSTEM_NAME MATCHES WindowsStore AND CMAKE_SYSTEM_VERSION MATCHES "8.0") +if(WINRT AND WINDOWS_STORE AND CMAKE_SYSTEM_VERSION MATCHES "8.0") list(APPEND extra_libs ole32.lib) endif() diff --git a/platforms/android/android.toolchain.cmake b/platforms/android/android.toolchain.cmake index b37dea01ae..50b342c7a6 100644 --- a/platforms/android/android.toolchain.cmake +++ b/platforms/android/android.toolchain.cmake @@ -1554,6 +1554,9 @@ if( ANDROID_EXPLICIT_CRT_LINK ) endif() # setup output directories +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1) +endif() set( CMAKE_INSTALL_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/user" CACHE STRING "path for installing" ) if( DEFINED LIBRARY_OUTPUT_PATH_ROOT From 32772a5436139296e8d306d3e39ac18d1d7a38e4 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 18 Jul 2019 19:40:23 +0000 Subject: [PATCH 5/7] 3.4: backported changes from 'master' branch --- modules/calib3d/perf/perf_undistort.cpp | 21 +++++++++++++++++++++ modules/core/include/opencv2/core/cvdef.h | 2 +- modules/core/test/test_ptr.cpp | 6 +----- modules/imgproc/perf/perf_warp.cpp | 11 ----------- 4 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 modules/calib3d/perf/perf_undistort.cpp diff --git a/modules/calib3d/perf/perf_undistort.cpp b/modules/calib3d/perf/perf_undistort.cpp new file mode 100644 index 0000000000..e0ee113c2f --- /dev/null +++ b/modules/calib3d/perf/perf_undistort.cpp @@ -0,0 +1,21 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html +#include "perf_precomp.hpp" + +namespace opencv_test +{ +using namespace perf; + +PERF_TEST(Undistort, InitUndistortMap) +{ + Size size_w_h(512 + 3, 512); + Mat k(3, 3, CV_32FC1); + Mat d(1, 14, CV_64FC1); + Mat dst(size_w_h, CV_32FC2); + declare.in(k, d, WARMUP_RNG).out(dst); + TEST_CYCLE() initUndistortRectifyMap(k, d, noArray(), k, size_w_h, CV_32FC2, dst, noArray()); + SANITY_CHECK_NOTHING(); +} + +} // namespace diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h index 079f24c12a..7b81a17664 100644 --- a/modules/core/include/opencv2/core/cvdef.h +++ b/modules/core/include/opencv2/core/cvdef.h @@ -627,7 +627,7 @@ Cv64suf; \****************************************************************************************/ #ifndef CV_NOEXCEPT -# if defined(CV_CXX11) && (!defined(_MSC_VER) || _MSC_VER > 1800) /* MSVC 2015 and above */ +# if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900/*MSVS 2015*/) # define CV_NOEXCEPT noexcept # endif #endif diff --git a/modules/core/test/test_ptr.cpp b/modules/core/test/test_ptr.cpp index ffeb443a1d..d3186afb43 100644 --- a/modules/core/test/test_ptr.cpp +++ b/modules/core/test/test_ptr.cpp @@ -43,10 +43,6 @@ namespace opencv_test { namespace { -#if defined __clang__ && defined __APPLE__ -#pragma clang diagnostic ignored "-Wself-assign-overloaded" // explicitly assigning value of variable of type '...' to itself (p1 = p1) -#endif - #ifdef GTEST_CAN_COMPARE_NULL # define EXPECT_NULL(ptr) EXPECT_EQ(NULL, ptr) #else @@ -161,7 +157,7 @@ TEST(Core_Ptr, assignment) { Ptr p1(new Reporter(&deleted1)); - p1 = p1; + p1 = *&p1; EXPECT_FALSE(deleted1); } diff --git a/modules/imgproc/perf/perf_warp.cpp b/modules/imgproc/perf/perf_warp.cpp index e31a687229..53bacc16d3 100644 --- a/modules/imgproc/perf/perf_warp.cpp +++ b/modules/imgproc/perf/perf_warp.cpp @@ -290,15 +290,4 @@ PERF_TEST(Transform, getPerspectiveTransform_1000) SANITY_CHECK_NOTHING(); } -PERF_TEST(Undistort, InitUndistortMap) -{ - Size size_w_h(512 + 3, 512); - Mat k(3, 3, CV_32FC1); - Mat d(1, 14, CV_64FC1); - Mat dst(size_w_h, CV_32FC2); - declare.in(k, d, WARMUP_RNG).out(dst); - TEST_CYCLE() initUndistortRectifyMap(k, d, noArray(), k, size_w_h, CV_32FC2, dst, noArray()); - SANITY_CHECK_NOTHING(); -} - } // namespace From 57ccf14952915bddbc22222c50a8a94500bc9fa1 Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Wed, 14 Aug 2019 13:33:49 -0400 Subject: [PATCH 6/7] FIx misc. source and comment typos Found via `codespell -q 3 -S ./3rdparty,./modules -L amin,ang,atleast,dof,endwhile,hist,uint` backporting of commit: 32aba5e64ba40b372f02b5fab18c9632f763bb75 --- apps/createsamples/utility.cpp | 4 ++-- cmake/FindCUDA/run_nvcc.cmake | 2 +- cmake/OpenCVCompilerOptimizations.cmake | 2 +- cmake/OpenCVDetectApacheAnt.cmake | 2 +- cmake/OpenCVDetectInferenceEngine.cmake | 2 +- cmake/OpenCVDetectPython.cmake | 2 +- cmake/OpenCVUtils.cmake | 2 +- cmake/android/android_ant_projects.cmake | 2 +- .../js_video/js_lucas_kanade/js_lucas_kanade.markdown | 2 +- doc/tutorials/calib3d/real_time_pose/real_time_pose.markdown | 4 ++-- .../feature_flann_matcher/feature_flann_matcher.markdown | 4 ++-- doc/tutorials/imgcodecs/raster-gdal/raster_io_gdal.markdown | 2 +- .../gausian_median_blur_bilateral_filter.markdown | 2 +- .../imgproc/morph_lines_detection/morph_lines_detection.md | 2 +- .../introduction/transition_guide/transition_guide.markdown | 2 +- doc/tutorials/ios/video_processing/video_processing.markdown | 2 +- doc/tutorials/ml/non_linear_svms/non_linear_svms.markdown | 2 +- .../objdetect/cascade_classifier/cascade_classifier.markdown | 2 +- doc/tutorials/video/optical_flow/optical_flow.markdown | 2 +- samples/cpp/stitching_detailed.cpp | 2 +- samples/cpp/videocapture_gphoto2_autofocus.cpp | 2 +- samples/directx/d3d11_interop.cpp | 2 +- samples/dnn/face_detector/how_to_train_face_detector.txt | 2 +- samples/dnn/openpose.py | 2 +- samples/opencl/opencl-opencv-interop.cpp | 2 +- .../imgProc/threshold_inRange/threshold_inRange.py | 2 +- .../objectDetection/cascade_classifier/objectDetection.py | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/apps/createsamples/utility.cpp b/apps/createsamples/utility.cpp index ab1ca1c789..919ad2dcc4 100644 --- a/apps/createsamples/utility.cpp +++ b/apps/createsamples/utility.cpp @@ -895,7 +895,7 @@ void icvGetNextFromBackgroundData( CvBackgroundData* data, * #pragma omp parallel * { * ... - * icvGetBackgourndImage( cvbgdata, cvbgreader, img ); + * icvGetBackgroundImage( cvbgdata, cvbgreader, img ); * ... * } * ... @@ -990,7 +990,7 @@ static int icvInitBackgroundReaders( const char* filename, Size winsize ) /* * icvDestroyBackgroundReaders * - * Finish backgournd reading process + * Finish background reading process */ static void icvDestroyBackgroundReaders() diff --git a/cmake/FindCUDA/run_nvcc.cmake b/cmake/FindCUDA/run_nvcc.cmake index c372fe44ec..25527b6938 100644 --- a/cmake/FindCUDA/run_nvcc.cmake +++ b/cmake/FindCUDA/run_nvcc.cmake @@ -136,7 +136,7 @@ macro(cuda_execute_process status command) # copy and paste a runnable command line. set(cuda_execute_process_string) foreach(arg ${ARGN}) - # If there are quotes, excape them, so they come through. + # If there are quotes, escape them, so they come through. string(REPLACE "\"" "\\\"" arg ${arg}) # Args with spaces need quotes around them to get them to be parsed as a single argument. if(arg MATCHES " ") diff --git a/cmake/OpenCVCompilerOptimizations.cmake b/cmake/OpenCVCompilerOptimizations.cmake index 9e4691760c..92cce39baa 100644 --- a/cmake/OpenCVCompilerOptimizations.cmake +++ b/cmake/OpenCVCompilerOptimizations.cmake @@ -854,7 +854,7 @@ macro(__ocv_add_dispatched_file filename target_src_var src_directory dst_direct if(";${CPU_DISPATCH_FINAL};" MATCHES "${OPT}" OR __CPU_DISPATCH_INCLUDE_ALL) if(EXISTS "${src_directory}/${filename}.${OPT_LOWER}.cpp") - message(STATUS "Using overrided ${OPT} source: ${src_directory}/${filename}.${OPT_LOWER}.cpp") + message(STATUS "Using overridden ${OPT} source: ${src_directory}/${filename}.${OPT_LOWER}.cpp") else() list(APPEND ${target_src_var} "${__file}") endif() diff --git a/cmake/OpenCVDetectApacheAnt.cmake b/cmake/OpenCVDetectApacheAnt.cmake index 2f8243838e..330ea9f756 100644 --- a/cmake/OpenCVDetectApacheAnt.cmake +++ b/cmake/OpenCVDetectApacheAnt.cmake @@ -27,7 +27,7 @@ if(ANT_EXECUTABLE) unset(ANT_EXECUTABLE CACHE) else() string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" ANT_VERSION "${ANT_VERSION_FULL}") - set(ANT_VERSION "${ANT_VERSION}" CACHE INTERNAL "Detected ant vesion") + set(ANT_VERSION "${ANT_VERSION}" CACHE INTERNAL "Detected ant version") message(STATUS "Found apache ant: ${ANT_EXECUTABLE} (${ANT_VERSION})") endif() diff --git a/cmake/OpenCVDetectInferenceEngine.cmake b/cmake/OpenCVDetectInferenceEngine.cmake index 10901be8d2..a4d0bbddd3 100644 --- a/cmake/OpenCVDetectInferenceEngine.cmake +++ b/cmake/OpenCVDetectInferenceEngine.cmake @@ -5,7 +5,7 @@ # # Detect parameters: # 1. Native cmake IE package: -# - enironment variable InferenceEngine_DIR is set to location of cmake module +# - environment variable InferenceEngine_DIR is set to location of cmake module # 2. Custom location: # - INF_ENGINE_INCLUDE_DIRS - headers search location # - INF_ENGINE_LIB_DIRS - library search location diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake index c3c467002e..1b1fbf17b0 100644 --- a/cmake/OpenCVDetectPython.cmake +++ b/cmake/OpenCVDetectPython.cmake @@ -249,7 +249,7 @@ if(NOT ${found}) # Export return values set(${found} "${_found}" CACHE INTERNAL "") - set(${executable} "${_executable}" CACHE FILEPATH "Path to Python interpretor") + set(${executable} "${_executable}" CACHE FILEPATH "Path to Python interpreter") set(${version_string} "${_version_string}" CACHE INTERNAL "") set(${version_major} "${_version_major}" CACHE INTERNAL "") set(${version_minor} "${_version_minor}" CACHE INTERNAL "") diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index 541771411d..7317398fb2 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -782,7 +782,7 @@ macro(ocv_check_modules define) if(pkgcfg_lib_${define}_${_lib}) list(APPEND _libs "${pkgcfg_lib_${define}_${_lib}}") else() - message(WARNING "ocv_check_modules(${define}): can't find library '${_lib}'. Specify 'pkgcfg_lib_${define}_${_lib}' manualy") + message(WARNING "ocv_check_modules(${define}): can't find library '${_lib}'. Specify 'pkgcfg_lib_${define}_${_lib}' manually") list(APPEND _libs "${_lib}") endif() else() diff --git a/cmake/android/android_ant_projects.cmake b/cmake/android/android_ant_projects.cmake index ed9ce43582..f80a81a8e9 100644 --- a/cmake/android/android_ant_projects.cmake +++ b/cmake/android/android_ant_projects.cmake @@ -49,7 +49,7 @@ macro(android_get_compatible_target VAR) list(GET ANDROID_SDK_TARGETS 0 __lvl) string(REGEX MATCH "[0-9]+$" __lvl "${__lvl}") - #find minimal level mathing to all provided levels + #find minimal level matching to all provided levels foreach(lvl ${ARGN}) string(REGEX MATCH "[0-9]+$" __level "${lvl}") if(__level GREATER __lvl) diff --git a/doc/js_tutorials/js_video/js_lucas_kanade/js_lucas_kanade.markdown b/doc/js_tutorials/js_video/js_lucas_kanade/js_lucas_kanade.markdown index 1d8fa29ee8..a86bf11223 100644 --- a/doc/js_tutorials/js_video/js_lucas_kanade/js_lucas_kanade.markdown +++ b/doc/js_tutorials/js_video/js_lucas_kanade/js_lucas_kanade.markdown @@ -13,7 +13,7 @@ Optical Flow ------------ Optical flow is the pattern of apparent motion of image objects between two consecutive frames -caused by the movemement of object or camera. It is 2D vector field where each vector is a +caused by the movement of object or camera. It is 2D vector field where each vector is a displacement vector showing the movement of points from first frame to second. Consider the image below (Image Courtesy: [Wikipedia article on Optical Flow](http://en.wikipedia.org/wiki/Optical_flow)). diff --git a/doc/tutorials/calib3d/real_time_pose/real_time_pose.markdown b/doc/tutorials/calib3d/real_time_pose/real_time_pose.markdown index 4347d11651..e05e6e11ac 100644 --- a/doc/tutorials/calib3d/real_time_pose/real_time_pose.markdown +++ b/doc/tutorials/calib3d/real_time_pose/real_time_pose.markdown @@ -253,8 +253,8 @@ Here is explained in detail the code for the real time application: @code{.cpp} RobustMatcher rmatcher; // instantiate RobustMatcher - cv::FeatureDetector * detector = new cv::OrbFeatureDetector(numKeyPoints); // instatiate ORB feature detector - cv::DescriptorExtractor * extractor = new cv::OrbDescriptorExtractor(); // instatiate ORB descriptor extractor + cv::FeatureDetector * detector = new cv::OrbFeatureDetector(numKeyPoints); // instantiate ORB feature detector + cv::DescriptorExtractor * extractor = new cv::OrbDescriptorExtractor(); // instantiate ORB descriptor extractor rmatcher.setFeatureDetector(detector); // set feature detector rmatcher.setDescriptorExtractor(extractor); // set descriptor extractor diff --git a/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.markdown b/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.markdown index de04f63504..4b3f3daddf 100644 --- a/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.markdown +++ b/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.markdown @@ -29,8 +29,8 @@ This distance is equivalent to count the number of different elements for binary To filter the matches, Lowe proposed in @cite Lowe:2004:DIF:993451.996342 to use a distance ratio test to try to eliminate false matches. The distance ratio between the two nearest matches of a considered keypoint is computed and it is a good match when this value is below -a thresold. Indeed, this ratio allows helping to discriminate between ambiguous matches (distance ratio between the two nearest neighbors is -close to one) and well discriminated matches. The figure below from the SIFT paper illustrates the probability that a match is correct +a threshold. Indeed, this ratio allows helping to discriminate between ambiguous matches (distance ratio between the two nearest neighbors +is close to one) and well discriminated matches. The figure below from the SIFT paper illustrates the probability that a match is correct based on the nearest-neighbor distance ratio test. ![](images/Feature_FlannMatcher_Lowe_ratio_test.png) diff --git a/doc/tutorials/imgcodecs/raster-gdal/raster_io_gdal.markdown b/doc/tutorials/imgcodecs/raster-gdal/raster_io_gdal.markdown index 2193d26870..432caa69e0 100644 --- a/doc/tutorials/imgcodecs/raster-gdal/raster_io_gdal.markdown +++ b/doc/tutorials/imgcodecs/raster-gdal/raster_io_gdal.markdown @@ -15,7 +15,7 @@ The primary objectives for this tutorial: - How to use OpenCV [imread](@ref imread) to load satellite imagery. - How to use OpenCV [imread](@ref imread) to load SRTM Digital Elevation Models -- Given the corner coordinates of both the image and DEM, correllate the elevation data to the +- Given the corner coordinates of both the image and DEM, correlate the elevation data to the image to find elevations for each pixel. - Show a basic, easy-to-implement example of a terrain heat map. - Show a basic use of DEM data coupled with ortho-rectified imagery. diff --git a/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.markdown b/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.markdown index 92dd1d5ed7..2cab30b0b3 100644 --- a/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.markdown +++ b/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.markdown @@ -157,7 +157,7 @@ already known by now. - *src*: Source image - *dst*: Destination image - *Size(w, h)*: The size of the kernel to be used (the neighbors to be considered). \f$w\f$ and - \f$h\f$ have to be odd and positive numbers otherwise thi size will be calculated using the + \f$h\f$ have to be odd and positive numbers otherwise the size will be calculated using the \f$\sigma_{x}\f$ and \f$\sigma_{y}\f$ arguments. - \f$\sigma_{x}\f$: The standard deviation in x. Writing \f$0\f$ implies that \f$\sigma_{x}\f$ is calculated using kernel size. diff --git a/doc/tutorials/imgproc/morph_lines_detection/morph_lines_detection.md b/doc/tutorials/imgproc/morph_lines_detection/morph_lines_detection.md index cf0e79755a..ccce36270c 100644 --- a/doc/tutorials/imgproc/morph_lines_detection/morph_lines_detection.md +++ b/doc/tutorials/imgproc/morph_lines_detection/morph_lines_detection.md @@ -30,7 +30,7 @@ Two of the most basic morphological operations are dilation and erosion. Dilatio ![Dilation on a Grayscale Image](images/morph6.gif) -- __Erosion__: The vise versa applies for the erosion operation. The value of the output pixel is the minimum value of all the pixels that fall within the structuring element's size and shape. Look the at the example figures below: +- __Erosion__: The vice versa applies for the erosion operation. The value of the output pixel is the minimum value of all the pixels that fall within the structuring element's size and shape. Look the at the example figures below: ![Erosion on a Binary Image](images/morph211.png) diff --git a/doc/tutorials/introduction/transition_guide/transition_guide.markdown b/doc/tutorials/introduction/transition_guide/transition_guide.markdown index a1df271d7b..c5c4320253 100644 --- a/doc/tutorials/introduction/transition_guide/transition_guide.markdown +++ b/doc/tutorials/introduction/transition_guide/transition_guide.markdown @@ -191,7 +191,7 @@ brief->compute(gray, query_kpts, query_desc); //Compute brief descriptors at eac OpenCL {#tutorial_transition_hints_opencl} ------ -All specialized `ocl` implemetations has been hidden behind general C++ algorithm interface. Now the function execution path can be selected dynamically at runtime: CPU or OpenCL; this mechanism is also called "Transparent API". +All specialized `ocl` implementations has been hidden behind general C++ algorithm interface. Now the function execution path can be selected dynamically at runtime: CPU or OpenCL; this mechanism is also called "Transparent API". New class cv::UMat is intended to hide data exchange with OpenCL device in a convenient way. diff --git a/doc/tutorials/ios/video_processing/video_processing.markdown b/doc/tutorials/ios/video_processing/video_processing.markdown index 2776219335..43b0b96338 100644 --- a/doc/tutorials/ios/video_processing/video_processing.markdown +++ b/doc/tutorials/ios/video_processing/video_processing.markdown @@ -101,7 +101,7 @@ using namespace cv; } @endcode In this case, we initialize the camera and provide the imageView as a target for rendering each -frame. CvVideoCamera is basically a wrapper around AVFoundation, so we provie as properties some of +frame. CvVideoCamera is basically a wrapper around AVFoundation, so we provide as properties some of the AVFoundation camera options. For example we want to use the front camera, set the video size to 352x288 and a video orientation (the video camera normally outputs in landscape mode, which results in transposed data when you design a portrait application). diff --git a/doc/tutorials/ml/non_linear_svms/non_linear_svms.markdown b/doc/tutorials/ml/non_linear_svms/non_linear_svms.markdown index d193e3a751..74a15597ac 100644 --- a/doc/tutorials/ml/non_linear_svms/non_linear_svms.markdown +++ b/doc/tutorials/ml/non_linear_svms/non_linear_svms.markdown @@ -13,7 +13,7 @@ In this tutorial you will learn how to: Motivation ---------- -Why is it interesting to extend the SVM optimation problem in order to handle non-linearly separable +Why is it interesting to extend the SVM optimization problem in order to handle non-linearly separable training data? Most of the applications in which SVMs are used in computer vision require a more powerful tool than a simple linear classifier. This stems from the fact that in these tasks __the training data can be rarely separated using an hyperplane__. diff --git a/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.markdown b/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.markdown index 27a506ff82..936b6c31b9 100644 --- a/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.markdown +++ b/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.markdown @@ -113,7 +113,7 @@ This tutorial code's is shown lines below. You can also download it from Result ------ --# Here is the result of running the code above and using as input the video stream of a build-in +-# Here is the result of running the code above and using as input the video stream of a built-in webcam: ![](images/Cascade_Classifier_Tutorial_Result_Haar.jpg) diff --git a/doc/tutorials/video/optical_flow/optical_flow.markdown b/doc/tutorials/video/optical_flow/optical_flow.markdown index b32bf5e72d..a3e3245fba 100644 --- a/doc/tutorials/video/optical_flow/optical_flow.markdown +++ b/doc/tutorials/video/optical_flow/optical_flow.markdown @@ -15,7 +15,7 @@ Optical Flow ------------ Optical flow is the pattern of apparent motion of image objects between two consecutive frames -caused by the movemement of object or camera. It is 2D vector field where each vector is a +caused by the movement of object or camera. It is 2D vector field where each vector is a displacement vector showing the movement of points from first frame to second. Consider the image below (Image Courtesy: [Wikipedia article on Optical Flow](http://en.wikipedia.org/wiki/Optical_flow)). diff --git a/samples/cpp/stitching_detailed.cpp b/samples/cpp/stitching_detailed.cpp index f7f87d3786..dee3ce5ac4 100644 --- a/samples/cpp/stitching_detailed.cpp +++ b/samples/cpp/stitching_detailed.cpp @@ -581,7 +581,7 @@ int main(int argc, char* argv[]) vector sizes(num_images); vector masks(num_images); - // Preapre images masks + // Prepare images masks for (int i = 0; i < num_images; ++i) { masks[i].create(images[i].size(), CV_8U); diff --git a/samples/cpp/videocapture_gphoto2_autofocus.cpp b/samples/cpp/videocapture_gphoto2_autofocus.cpp index d0baa315bf..6e635ee7ca 100644 --- a/samples/cpp/videocapture_gphoto2_autofocus.cpp +++ b/samples/cpp/videocapture_gphoto2_autofocus.cpp @@ -41,7 +41,7 @@ const int MAX_FOCUS_STEP = 32767; const int FOCUS_DIRECTION_INFTY = 1; const int DEFAULT_BREAK_LIMIT = 5; const int DEFAULT_OUTPUT_FPS = 20; -const double epsylon = 0.0005; // compression, noice, etc. +const double epsylon = 0.0005; // compression, noise, etc. struct Args_t { diff --git a/samples/directx/d3d11_interop.cpp b/samples/directx/d3d11_interop.cpp index d00f7cffb8..df40dd3e89 100644 --- a/samples/directx/d3d11_interop.cpp +++ b/samples/directx/d3d11_interop.cpp @@ -83,7 +83,7 @@ public: r = m_pD3D11SwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&m_pBackBuffer); if (FAILED(r)) { - throw std::runtime_error("GetBufer() failed!"); + throw std::runtime_error("GetBuffer() failed!"); } r = m_pD3D11Dev->CreateRenderTargetView(m_pBackBuffer, NULL, &m_pRenderTarget); diff --git a/samples/dnn/face_detector/how_to_train_face_detector.txt b/samples/dnn/face_detector/how_to_train_face_detector.txt index 11602297f2..3f6b1ba42d 100644 --- a/samples/dnn/face_detector/how_to_train_face_detector.txt +++ b/samples/dnn/face_detector/how_to_train_face_detector.txt @@ -67,7 +67,7 @@ You need to prepare 2 LMDB databases: one for training images, one for validatio 3. Train your detector For training you need to have 3 files: train.prototxt, test.prototxt and solver.prototxt. You can find these files in the same directory as for this readme. -Also you need to edit train.prototxt and test.prototxt to replace paths for your LMDB databases to actual databases you've crated in step 2. +Also you need to edit train.prototxt and test.prototxt to replace paths for your LMDB databases to actual databases you've created in step 2. Now all is done for launch training process. Execute next lines in Terminal: diff --git a/samples/dnn/openpose.py b/samples/dnn/openpose.py index e6bb1ba05a..b79ccd54b8 100644 --- a/samples/dnn/openpose.py +++ b/samples/dnn/openpose.py @@ -88,7 +88,7 @@ while cv.waitKey(1) < 0: points = [] for i in range(len(BODY_PARTS)): - # Slice heatmap of corresponging body's part. + # Slice heatmap of corresponding body's part. heatMap = out[0, i, :, :] # Originally, we try to find all the local maximums. To simplify a sample diff --git a/samples/opencl/opencl-opencv-interop.cpp b/samples/opencl/opencl-opencv-interop.cpp index d3b15668a9..f648f78bf8 100644 --- a/samples/opencl/opencl-opencv-interop.cpp +++ b/samples/opencl/opencl-opencv-interop.cpp @@ -703,7 +703,7 @@ int App::process_frame_with_open_cl(cv::Mat& frame, bool use_buffer, cl_mem* mem if (0 == mem || 0 == m_img_src) { // allocate/delete cl memory objects every frame for the simplicity. - // in real applicaton more efficient pipeline can be built. + // in real application more efficient pipeline can be built. if (use_buffer) { diff --git a/samples/python/tutorial_code/imgProc/threshold_inRange/threshold_inRange.py b/samples/python/tutorial_code/imgProc/threshold_inRange/threshold_inRange.py index d54d93c7fc..4905a2e13a 100644 --- a/samples/python/tutorial_code/imgProc/threshold_inRange/threshold_inRange.py +++ b/samples/python/tutorial_code/imgProc/threshold_inRange/threshold_inRange.py @@ -66,7 +66,7 @@ def on_high_V_thresh_trackbar(val): cv.setTrackbarPos(high_V_name, window_detection_name, high_V) parser = argparse.ArgumentParser(description='Code for Thresholding Operations using inRange tutorial.') -parser.add_argument('--camera', help='Camera devide number.', default=0, type=int) +parser.add_argument('--camera', help='Camera divide number.', default=0, type=int) args = parser.parse_args() ## [cap] diff --git a/samples/python/tutorial_code/objectDetection/cascade_classifier/objectDetection.py b/samples/python/tutorial_code/objectDetection/cascade_classifier/objectDetection.py index 5ac5575a9e..d9fb460c0e 100644 --- a/samples/python/tutorial_code/objectDetection/cascade_classifier/objectDetection.py +++ b/samples/python/tutorial_code/objectDetection/cascade_classifier/objectDetection.py @@ -25,7 +25,7 @@ def detectAndDisplay(frame): parser = argparse.ArgumentParser(description='Code for Cascade Classifier tutorial.') parser.add_argument('--face_cascade', help='Path to face cascade.', default='data/haarcascades/haarcascade_frontalface_alt.xml') parser.add_argument('--eyes_cascade', help='Path to eyes cascade.', default='data/haarcascades/haarcascade_eye_tree_eyeglasses.xml') -parser.add_argument('--camera', help='Camera devide number.', type=int, default=0) +parser.add_argument('--camera', help='Camera divide number.', type=int, default=0) args = parser.parse_args() face_cascade_name = args.face_cascade From fcc7d8dd4edf40ac864861668da7ffcbe11e2f98 Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Thu, 15 Aug 2019 18:02:09 -0400 Subject: [PATCH 7/7] Fix modules/ typos Found using `codespell -q 3 -S ./3rdparty -L activ,amin,ang,atleast,childs,dof,endwhile,halfs,hist,iff,nd,od,uint` backporting of commit: ec43292e1ea9da963e67427505b4113750829c3e --- modules/calib3d/src/calibration.cpp | 2 +- modules/calib3d/src/five-point.cpp | 2 +- modules/calib3d/src/ippe.cpp | 2 +- modules/calib3d/test/test_homography.cpp | 6 +++--- modules/core/include/opencv2/core/core_c.h | 2 +- modules/core/include/opencv2/core/cuda.hpp | 2 +- modules/core/include/opencv2/core/hal/intrin_cpp.hpp | 2 +- modules/core/include/opencv2/core/hal/intrin_vsx.hpp | 2 +- modules/core/include/opencv2/core/mat.hpp | 6 +++--- modules/core/include/opencv2/core/simd_intrinsics.hpp | 2 +- .../core/include/opencv2/core/utils/filesystem.private.hpp | 4 ++-- modules/core/misc/python/shadow_umat.hpp | 2 +- modules/core/src/datastructs.cpp | 2 +- modules/core/src/hal_internal.cpp | 2 +- modules/core/src/ocl.cpp | 2 +- modules/core/test/test_eigen.cpp | 2 +- modules/dnn/include/opencv2/dnn/all_layers.hpp | 2 +- modules/dnn/include/opencv2/dnn/dnn.hpp | 2 +- modules/dnn/src/ocl4dnn/src/ocl4dnn_conv_spatial.cpp | 2 +- modules/dnn/src/onnx/opencv-onnx.proto | 2 +- modules/dnn/src/op_inf_engine.cpp | 4 ++-- modules/dnn/src/op_inf_engine.hpp | 2 +- modules/dnn/src/tensorflow/tf_importer.cpp | 2 +- modules/dnn/src/torch/torch_importer.cpp | 2 +- modules/dnn/test/test_ie_models.cpp | 2 +- modules/features2d/perf/perf_feature2d.hpp | 2 +- .../include/opencv2/flann/hierarchical_clustering_index.h | 2 +- modules/flann/include/opencv2/flann/kmeans_index.h | 2 +- modules/flann/include/opencv2/flann/result_set.h | 2 +- modules/highgui/src/window_gtk.cpp | 2 +- modules/highgui/src/window_w32.cpp | 2 +- modules/imgcodecs/src/grfmt_jpeg.cpp | 2 +- modules/imgcodecs/src/grfmt_pam.cpp | 2 +- modules/imgcodecs/src/grfmt_png.cpp | 2 +- modules/imgproc/perf/perf_houghlines.cpp | 4 ++-- modules/imgproc/src/hough.cpp | 6 +++--- modules/imgproc/src/morph.dispatch.cpp | 2 +- modules/imgproc/src/rotcalipers.cpp | 2 +- modules/imgproc/test/ocl/test_canny.cpp | 2 +- modules/imgproc/test/test_canny.cpp | 2 +- .../android/java/org/opencv/android/AsyncServiceHelper.java | 2 +- .../android_test/src/org/opencv/test/OpenCVTestCase.java | 4 ++-- .../test/pure_test/src/org/opencv/test/OpenCVTestCase.java | 4 ++-- modules/js/test/test_calib3d.js | 2 +- modules/js/test/test_features2d.js | 2 +- modules/js/test/test_imgproc.js | 4 ++-- modules/js/test/test_mat.js | 2 +- modules/js/test/test_objdetect.js | 2 +- modules/js/test/test_utils.js | 2 +- modules/js/test/test_video.js | 2 +- modules/ml/doc/ml_intro.markdown | 2 +- modules/ml/include/opencv2/ml.hpp | 2 +- modules/ml/test/test_emknearestkmeans.cpp | 2 +- modules/python/src2/gen2.py | 2 +- modules/ts/misc/table_formatter.py | 2 +- modules/video/src/ecc.cpp | 2 +- modules/video/src/opencl/pyrlk.cl | 2 +- .../include/opencv2/videoio/container_avi.private.hpp | 4 ++-- modules/videoio/src/cap_aravis.cpp | 4 ++-- modules/videoio/src/cap_avfoundation.mm | 4 ++-- modules/videoio/src/cap_avfoundation_mac.mm | 2 +- modules/videoio/src/cap_dshow.cpp | 2 +- modules/videoio/src/cap_msmf.cpp | 2 +- modules/videoio/src/container_avi.cpp | 2 +- modules/videoio/src/wrl.h | 4 ++-- .../engine/src/org/opencv/engine/OpenCVEngineInterface.aidl | 2 +- platforms/ios/build_framework.py | 2 +- 67 files changed, 83 insertions(+), 83 deletions(-) diff --git a/modules/calib3d/src/calibration.cpp b/modules/calib3d/src/calibration.cpp index 6640b261f5..8624e2d434 100644 --- a/modules/calib3d/src/calibration.cpp +++ b/modules/calib3d/src/calibration.cpp @@ -623,7 +623,7 @@ CV_IMPL void cvProjectPoints2( const CvMat* objectPoints, if( (CV_MAT_TYPE(A->type) != CV_64FC1 && CV_MAT_TYPE(A->type) != CV_32FC1) || A->rows != 3 || A->cols != 3 ) - CV_Error( CV_StsBadArg, "Instrinsic parameters must be 3x3 floating-point matrix" ); + CV_Error( CV_StsBadArg, "Intrinsic parameters must be 3x3 floating-point matrix" ); cvConvert( A, &_a ); fx = a[0]; fy = a[4]; diff --git a/modules/calib3d/src/five-point.cpp b/modules/calib3d/src/five-point.cpp index 0cefe8df4c..dd5e47b795 100644 --- a/modules/calib3d/src/five-point.cpp +++ b/modules/calib3d/src/five-point.cpp @@ -506,7 +506,7 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, // Do the cheirality check. // Notice here a threshold dist is used to filter // out far away points (i.e. infinite points) since - // their depth may vary between positive and negtive. + // their depth may vary between positive and negative. std::vector allTriangulations(4); Mat Q; diff --git a/modules/calib3d/src/ippe.cpp b/modules/calib3d/src/ippe.cpp index 74a2864525..3f1e6a7add 100644 --- a/modules/calib3d/src/ippe.cpp +++ b/modules/calib3d/src/ippe.cpp @@ -650,7 +650,7 @@ void PoseSolver::makeCanonicalObjectPoints(InputArray _objectPoints, OutputArray if (!computeObjextSpaceR3Pts(objectPoints,R)) { - //we could not compute R, problably because there is a duplicate point in {objectPoints(0),objectPoints(1),objectPoints(2)}. + //we could not compute R, probably because there is a duplicate point in {objectPoints(0),objectPoints(1),objectPoints(2)}. //So we compute it with the SVD (which is slower): computeObjextSpaceRSvD(UZero,R); } diff --git a/modules/calib3d/test/test_homography.cpp b/modules/calib3d/test/test_homography.cpp index 3001f0fec0..67b4f6f733 100644 --- a/modules/calib3d/test/test_homography.cpp +++ b/modules/calib3d/test/test_homography.cpp @@ -191,7 +191,7 @@ void CV_HomographyTest::print_information_4(int _method, int j, int N, int k, in cout << "Number of point: " << k << endl; cout << "Norm type using in criteria: "; if (NORM_TYPE[l] == 1) cout << "INF"; else if (NORM_TYPE[l] == 2) cout << "L1"; else cout << "L2"; cout << endl; cout << "Difference with noise of point: " << diff << endl; - cout << "Maxumum allowed difference: " << max_2diff << endl; cout << endl; + cout << "Maximum allowed difference: " << max_2diff << endl; cout << endl; } void CV_HomographyTest::print_information_5(int _method, int j, int N, int l, double diff) @@ -204,7 +204,7 @@ void CV_HomographyTest::print_information_5(int _method, int j, int N, int l, do cout << "Count of points: " << N << endl; cout << "Norm type using in criteria: "; if (NORM_TYPE[l] == 1) cout << "INF"; else if (NORM_TYPE[l] == 2) cout << "L1"; else cout << "L2"; cout << endl; cout << "Difference with noise of points: " << diff << endl; - cout << "Maxumum allowed difference: " << max_diff << endl; cout << endl; + cout << "Maximum allowed difference: " << max_diff << endl; cout << endl; } void CV_HomographyTest::print_information_6(int _method, int j, int N, int k, double diff, bool value) @@ -244,7 +244,7 @@ void CV_HomographyTest::print_information_8(int _method, int j, int N, int k, in cout << "Number of point: " << k << " " << endl; cout << "Norm type using in criteria: "; if (NORM_TYPE[l] == 1) cout << "INF"; else if (NORM_TYPE[l] == 2) cout << "L1"; else cout << "L2"; cout << endl; cout << "Difference with noise of point: " << diff << endl; - cout << "Maxumum allowed difference: " << max_2diff << endl; cout << endl; + cout << "Maximum allowed difference: " << max_2diff << endl; cout << endl; } void CV_HomographyTest::run(int) diff --git a/modules/core/include/opencv2/core/core_c.h b/modules/core/include/opencv2/core/core_c.h index 5302db02cb..fa8f1509a0 100644 --- a/modules/core/include/opencv2/core/core_c.h +++ b/modules/core/include/opencv2/core/core_c.h @@ -53,7 +53,7 @@ which is incompatible with C It is OK to disable it because we only extend few plain structures with - C++ construrtors for simpler interoperability with C++ API of the library + C++ constructors for simpler interoperability with C++ API of the library */ # pragma warning(disable:4190) # elif defined __clang__ && __clang_major__ >= 3 diff --git a/modules/core/include/opencv2/core/cuda.hpp b/modules/core/include/opencv2/core/cuda.hpp index 820aba71ec..7d7bb62e16 100644 --- a/modules/core/include/opencv2/core/cuda.hpp +++ b/modules/core/include/opencv2/core/cuda.hpp @@ -126,7 +126,7 @@ public: GpuMat(int rows, int cols, int type, Allocator* allocator = defaultAllocator()); GpuMat(Size size, int type, Allocator* allocator = defaultAllocator()); - //! constucts GpuMat and fills it with the specified value _s + //! constructs GpuMat and fills it with the specified value _s GpuMat(int rows, int cols, int type, Scalar s, Allocator* allocator = defaultAllocator()); GpuMat(Size size, int type, Scalar s, Allocator* allocator = defaultAllocator()); diff --git a/modules/core/include/opencv2/core/hal/intrin_cpp.hpp b/modules/core/include/opencv2/core/hal/intrin_cpp.hpp index fc8fe165d2..d494761a73 100644 --- a/modules/core/include/opencv2/core/hal/intrin_cpp.hpp +++ b/modules/core/include/opencv2/core/hal/intrin_cpp.hpp @@ -76,7 +76,7 @@ implemented as a structure based on a one SIMD register. - cv::v_uint32x4 and cv::v_int32x4: four 32-bit integer values (unsgined/signed) - int - cv::v_uint64x2 and cv::v_int64x2: two 64-bit integer values (unsigned/signed) - int64 - cv::v_float32x4: four 32-bit floating point values (signed) - float -- cv::v_float64x2: two 64-bit floating point valies (signed) - double +- cv::v_float64x2: two 64-bit floating point values (signed) - double @note cv::v_float64x2 is not implemented in NEON variant, if you want to use this type, don't forget to diff --git a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp index d3f78beb8e..171890cdee 100644 --- a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp +++ b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp @@ -1272,7 +1272,7 @@ inline v_float32x4 v_load_expand(const float16_t* ptr) inline void v_pack_store(float16_t* ptr, const v_float32x4& v) { -// fixme: Is there any buitin op or intrinsic that cover "xvcvsphp"? +// fixme: Is there any builtin op or intrinsic that cover "xvcvsphp"? #if CV_VSX3 && !defined(CV_COMPILER_VSX_BROKEN_ASM) vec_ushort8 vf16; __asm__ __volatile__ ("xvcvsphp %x0,%x1" : "=wa" (vf16) : "wf" (v.val)); diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp index a3ee195976..fe16ee78ee 100644 --- a/modules/core/include/opencv2/core/mat.hpp +++ b/modules/core/include/opencv2/core/mat.hpp @@ -151,7 +151,7 @@ number of components (vectors/matrices) of the outer vector. In general, type support is limited to cv::Mat types. Other types are forbidden. But in some cases we need to support passing of custom non-general Mat types, like arrays of cv::KeyPoint, cv::DMatch, etc. -This data is not intented to be interpreted as an image data, or processed somehow like regular cv::Mat. +This data is not intended to be interpreted as an image data, or processed somehow like regular cv::Mat. To pass such custom type use rawIn() / rawOut() / rawInOut() wrappers. Custom type is wrapped as Mat-compatible `CV_8UC` values (N = sizeof(T), N <= CV_CN_MAX). */ @@ -2416,7 +2416,7 @@ public: // (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.) UMat(int rows, int cols, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT); UMat(Size size, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT); - //! constucts 2D matrix and fills it with the specified value _s. + //! constructs 2D matrix and fills it with the specified value _s. UMat(int rows, int cols, int type, const Scalar& s, UMatUsageFlags usageFlags = USAGE_DEFAULT); UMat(Size size, int type, const Scalar& s, UMatUsageFlags usageFlags = USAGE_DEFAULT); @@ -2863,7 +2863,7 @@ public: `ref<_Tp>(i0,...[,hashval])` is equivalent to `*(_Tp*)ptr(i0,...,true[,hashval])`. The methods always return a valid reference. - If the element did not exist, it is created and initialiazed with 0. + If the element did not exist, it is created and initialized with 0. */ //! returns reference to the specified element (1D case) template _Tp& ref(int i0, size_t* hashval=0); diff --git a/modules/core/include/opencv2/core/simd_intrinsics.hpp b/modules/core/include/opencv2/core/simd_intrinsics.hpp index c3d65cded5..7151d36073 100644 --- a/modules/core/include/opencv2/core/simd_intrinsics.hpp +++ b/modules/core/include/opencv2/core/simd_intrinsics.hpp @@ -27,7 +27,7 @@ These files can be pre-generated for target configurations of your application or generated by CMake on the fly (use CMAKE_BINARY_DIR for that). Notes: -- H/W capability checks are still responsibility of your applcation +- H/W capability checks are still responsibility of your application - runtime dispatching is not covered by this helper header */ diff --git a/modules/core/include/opencv2/core/utils/filesystem.private.hpp b/modules/core/include/opencv2/core/utils/filesystem.private.hpp index b477cafc8e..ea2591c9de 100644 --- a/modules/core/include/opencv2/core/utils/filesystem.private.hpp +++ b/modules/core/include/opencv2/core/utils/filesystem.private.hpp @@ -49,8 +49,8 @@ public: void lock(); //< acquire exclusive (writer) lock void unlock(); //< release exclusive (writer) lock - void lock_shared(); //< acquire sharable (reader) lock - void unlock_shared(); //< release sharable (reader) lock + void lock_shared(); //< acquire shareable (reader) lock + void unlock_shared(); //< release shareable (reader) lock struct Impl; protected: diff --git a/modules/core/misc/python/shadow_umat.hpp b/modules/core/misc/python/shadow_umat.hpp index dd83b9cc1d..ff75b4b2f4 100644 --- a/modules/core/misc/python/shadow_umat.hpp +++ b/modules/core/misc/python/shadow_umat.hpp @@ -13,7 +13,7 @@ public: // (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.) CV_WRAP UMat(int rows, int cols, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT); CV_WRAP UMat(Size size, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT); - //! constucts 2D matrix and fills it with the specified value _s. + //! constructs 2D matrix and fills it with the specified value _s. CV_WRAP UMat(int rows, int cols, int type, const Scalar& s, UMatUsageFlags usageFlags = USAGE_DEFAULT); CV_WRAP UMat(Size size, int type, const Scalar& s, UMatUsageFlags usageFlags = USAGE_DEFAULT); diff --git a/modules/core/src/datastructs.cpp b/modules/core/src/datastructs.cpp index e314ad0a4a..61adf3493e 100644 --- a/modules/core/src/datastructs.cpp +++ b/modules/core/src/datastructs.cpp @@ -1766,7 +1766,7 @@ cvSeqInsertSlice( CvSeq* seq, int index, const CvArr* from_arr ) CV_Error( CV_StsBadArg, "Source is not a sequence nor matrix" ); if( !CV_IS_MAT_CONT(mat->type) || (mat->rows != 1 && mat->cols != 1) ) - CV_Error( CV_StsBadArg, "The source array must be 1d coninuous vector" ); + CV_Error( CV_StsBadArg, "The source array must be 1d continuous vector" ); from = cvMakeSeqHeaderForArray( CV_SEQ_KIND_GENERIC, sizeof(from_header), CV_ELEM_SIZE(mat->type), diff --git a/modules/core/src/hal_internal.cpp b/modules/core/src/hal_internal.cpp index ecf5ffa489..60f96c0164 100644 --- a/modules/core/src/hal_internal.cpp +++ b/modules/core/src/hal_internal.cpp @@ -63,7 +63,7 @@ #define HAL_LU_SMALL_MATRIX_THRESH 100 #define HAL_CHOLESKY_SMALL_MATRIX_THRESH 100 -//lapack stores matrices in column-major order so transposing is neded everywhere +//lapack stores matrices in column-major order so transposing is needed everywhere template static inline void transpose_square_inplace(fptype *src, size_t src_ld, size_t m) { diff --git a/modules/core/src/ocl.cpp b/modules/core/src/ocl.cpp index 79797bc801..7b6bcd7118 100644 --- a/modules/core/src/ocl.cpp +++ b/modules/core/src/ocl.cpp @@ -5759,7 +5759,7 @@ public: static OpenCLAllocator* getOpenCLAllocator_() // call once guarantee { - static OpenCLAllocator* g_allocator = new OpenCLAllocator(); // avoid destrutor call (using of this object is too wide) + static OpenCLAllocator* g_allocator = new OpenCLAllocator(); // avoid destructor call (using of this object is too wide) g_isOpenCVActivated = true; return g_allocator; } diff --git a/modules/core/test/test_eigen.cpp b/modules/core/test/test_eigen.cpp index 6f5d82bf4a..ca402d5ec0 100644 --- a/modules/core/test/test_eigen.cpp +++ b/modules/core/test/test_eigen.cpp @@ -73,7 +73,7 @@ public: protected: bool test_values(const cv::Mat& src); // complex test for eigen without vectors - bool check_full(int type); // compex test for symmetric matrix + bool check_full(int type); // complex test for symmetric matrix virtual void run (int) = 0; // main testing method protected: diff --git a/modules/dnn/include/opencv2/dnn/all_layers.hpp b/modules/dnn/include/opencv2/dnn/all_layers.hpp index 75cba09981..da2f382bb1 100644 --- a/modules/dnn/include/opencv2/dnn/all_layers.hpp +++ b/modules/dnn/include/opencv2/dnn/all_layers.hpp @@ -104,7 +104,7 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN h_t &= o_t \odot tanh(c_t), \\ c_t &= f_t \odot c_{t-1} + i_t \odot g_t, \\ @f} - where @f$\odot@f$ is per-element multiply operation and @f$i_t, f_t, o_t, g_t@f$ is internal gates that are computed using learned wights. + where @f$\odot@f$ is per-element multiply operation and @f$i_t, f_t, o_t, g_t@f$ is internal gates that are computed using learned weights. Gates are computed as follows: @f{eqnarray*}{ diff --git a/modules/dnn/include/opencv2/dnn/dnn.hpp b/modules/dnn/include/opencv2/dnn/dnn.hpp index fd986acc7e..92e9eaea84 100644 --- a/modules/dnn/include/opencv2/dnn/dnn.hpp +++ b/modules/dnn/include/opencv2/dnn/dnn.hpp @@ -428,7 +428,7 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN * @param inpPin descriptor of the second layer input. * * Descriptors have the following template <layer_name>[.input_number]: - * - the first part of the template layer_name is sting name of the added layer. + * - the first part of the template layer_name is string name of the added layer. * If this part is empty then the network input pseudo layer will be used; * - the second optional part of the template input_number * is either number of the layer input, either label one. diff --git a/modules/dnn/src/ocl4dnn/src/ocl4dnn_conv_spatial.cpp b/modules/dnn/src/ocl4dnn/src/ocl4dnn_conv_spatial.cpp index a41bf92aea..3cca52d5bd 100644 --- a/modules/dnn/src/ocl4dnn/src/ocl4dnn_conv_spatial.cpp +++ b/modules/dnn/src/ocl4dnn/src/ocl4dnn_conv_spatial.cpp @@ -618,7 +618,7 @@ void OCL4DNNConvSpatial::calculateBenchmark(const UMat &bottom, UMat &ver // For large enough input size, we do not need to tune kernels for different // size. The reason is with large input size, there will be enough work items // to feed al the EUs. -// FIXME for the gemm like convolution, switch back to eaxct image size. +// FIXME for the gemm like convolution, switch back to exact image size. #define TUNING_SIZE(x) ((x) > 256 ? 256 : (alignSize(x, 16))) diff --git a/modules/dnn/src/onnx/opencv-onnx.proto b/modules/dnn/src/onnx/opencv-onnx.proto index dd846e65d1..b8b616a0d8 100644 --- a/modules/dnn/src/onnx/opencv-onnx.proto +++ b/modules/dnn/src/onnx/opencv-onnx.proto @@ -161,7 +161,7 @@ message NodeProto { repeated string output = 2; // namespace Value // An optional identifier for this node in a graph. - // This field MAY be absent in ths version of the IR. + // This field MAY be absent in this version of the IR. optional string name = 3; // namespace Node // The symbolic identifier of the Operator to execute. diff --git a/modules/dnn/src/op_inf_engine.cpp b/modules/dnn/src/op_inf_engine.cpp index 74fbb85a73..1eb3bbc9ce 100644 --- a/modules/dnn/src/op_inf_engine.cpp +++ b/modules/dnn/src/op_inf_engine.cpp @@ -609,7 +609,7 @@ void InfEngineBackendNet::forward(const std::vector >& outBl try { wrapper->outProms[processedOutputs].setException(std::current_exception()); } catch(...) { - CV_LOG_ERROR(NULL, "DNN: Exception occured during async inference exception propagation"); + CV_LOG_ERROR(NULL, "DNN: Exception occurred during async inference exception propagation"); } } } @@ -622,7 +622,7 @@ void InfEngineBackendNet::forward(const std::vector >& outBl try { wrapper->outProms[processedOutputs].setException(e); } catch(...) { - CV_LOG_ERROR(NULL, "DNN: Exception occured during async inference exception propagation"); + CV_LOG_ERROR(NULL, "DNN: Exception occurred during async inference exception propagation"); } } } diff --git a/modules/dnn/src/op_inf_engine.hpp b/modules/dnn/src/op_inf_engine.hpp index 12a0b7e80b..1888eb4a37 100644 --- a/modules/dnn/src/op_inf_engine.hpp +++ b/modules/dnn/src/op_inf_engine.hpp @@ -40,7 +40,7 @@ #endif //#define INFERENCE_ENGINE_DEPRECATED // turn off deprecation warnings from IE -//there is no way to suppress warnigns from IE only at this moment, so we are forced to suppress warnings globally +//there is no way to suppress warnings from IE only at this moment, so we are forced to suppress warnings globally #if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif diff --git a/modules/dnn/src/tensorflow/tf_importer.cpp b/modules/dnn/src/tensorflow/tf_importer.cpp index e546d9e1da..e0916036a3 100644 --- a/modules/dnn/src/tensorflow/tf_importer.cpp +++ b/modules/dnn/src/tensorflow/tf_importer.cpp @@ -837,7 +837,7 @@ void TFImporter::populateNet(Net dstNet) CV_Assert(paddings.type() == CV_32SC1); if (paddings.total() == 8) { - // Perhabs, we have NHWC padding dimensions order. + // Perhaps, we have NHWC padding dimensions order. // N H W C // 0 1 2 3 4 5 6 7 std::swap(paddings.at(2), paddings.at(6)); diff --git a/modules/dnn/src/torch/torch_importer.cpp b/modules/dnn/src/torch/torch_importer.cpp index 0ecb74dba5..c498a034a3 100644 --- a/modules/dnn/src/torch/torch_importer.cpp +++ b/modules/dnn/src/torch/torch_importer.cpp @@ -312,7 +312,7 @@ struct TorchImporter fpos = THFile_position(file); int ktype = readInt(); - if (ktype != TYPE_STRING) //skip non-string fileds + if (ktype != TYPE_STRING) //skip non-string fields { THFile_seek(file, fpos); readObject(); //key diff --git a/modules/dnn/test/test_ie_models.cpp b/modules/dnn/test/test_ie_models.cpp index 08c32476c5..d630158665 100644 --- a/modules/dnn/test/test_ie_models.cpp +++ b/modules/dnn/test/test_ie_models.cpp @@ -14,7 +14,7 @@ // Synchronize headers include statements with src/op_inf_engine.hpp // //#define INFERENCE_ENGINE_DEPRECATED // turn off deprecation warnings from IE -//there is no way to suppress warnigns from IE only at this moment, so we are forced to suppress warnings globally +//there is no way to suppress warnings from IE only at this moment, so we are forced to suppress warnings globally #if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif diff --git a/modules/features2d/perf/perf_feature2d.hpp b/modules/features2d/perf/perf_feature2d.hpp index 90e0c4a423..ad98689bf5 100644 --- a/modules/features2d/perf/perf_feature2d.hpp +++ b/modules/features2d/perf/perf_feature2d.hpp @@ -6,7 +6,7 @@ namespace opencv_test { -/* cofiguration for tests of detectors/descriptors. shared between ocl and cpu tests. */ +/* configuration for tests of detectors/descriptors. shared between ocl and cpu tests. */ // detectors/descriptors configurations to test #define DETECTORS_ONLY \ diff --git a/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h b/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h index 2a947dab6b..e2fce857a9 100644 --- a/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h +++ b/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h @@ -578,7 +578,7 @@ public: private: /** - * Struture representing a node in the hierarchical k-means tree. + * Structure representing a node in the hierarchical k-means tree. */ struct Node { diff --git a/modules/flann/include/opencv2/flann/kmeans_index.h b/modules/flann/include/opencv2/flann/kmeans_index.h index fe91dddd16..500745121f 100644 --- a/modules/flann/include/opencv2/flann/kmeans_index.h +++ b/modules/flann/include/opencv2/flann/kmeans_index.h @@ -547,7 +547,7 @@ public: private: /** - * Struture representing a node in the hierarchical k-means tree. + * Structure representing a node in the hierarchical k-means tree. */ struct KMeansNode { diff --git a/modules/flann/include/opencv2/flann/result_set.h b/modules/flann/include/opencv2/flann/result_set.h index 5c69ac29e7..e5b6fb24e2 100644 --- a/modules/flann/include/opencv2/flann/result_set.h +++ b/modules/flann/include/opencv2/flann/result_set.h @@ -301,7 +301,7 @@ public: unsigned int index_; }; - /** Default cosntructor */ + /** Default constructor */ UniqueResultSet() : is_full_(false), worst_distance_(std::numeric_limits::max()) { diff --git a/modules/highgui/src/window_gtk.cpp b/modules/highgui/src/window_gtk.cpp index bb6397faee..23853056b4 100644 --- a/modules/highgui/src/window_gtk.cpp +++ b/modules/highgui/src/window_gtk.cpp @@ -1806,7 +1806,7 @@ static gboolean icvOnMouse( GtkWidget *widget, GdkEvent *event, gpointer user_da else if( event->type == GDK_SCROLL ) { #if defined(GTK_VERSION3_4) - // NOTE: in current implementation doesn't possible to put into callback function delta_x and delta_y separetely + // NOTE: in current implementation doesn't possible to put into callback function delta_x and delta_y separately double delta = (event->scroll.delta_x + event->scroll.delta_y); cv_event = (event->scroll.delta_y!=0) ? CV_EVENT_MOUSEHWHEEL : CV_EVENT_MOUSEWHEEL; #else diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index c3b856c854..dfb81df4e2 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -1219,7 +1219,7 @@ cvShowImage( const char* name, const CvArr* arr ) dst_ptr, (size.cx * channels + 3) & -4 ); cvConvertImage( image, &dst, origin == 0 ? CV_CVTIMG_FLIP : 0 ); - // ony resize window if needed + // only resize window if needed if (changed_size) icvUpdateWindowPos(window); InvalidateRect(window->hwnd, 0, 0); diff --git a/modules/imgcodecs/src/grfmt_jpeg.cpp b/modules/imgcodecs/src/grfmt_jpeg.cpp index 917c72eae3..040a8edbb4 100644 --- a/modules/imgcodecs/src/grfmt_jpeg.cpp +++ b/modules/imgcodecs/src/grfmt_jpeg.cpp @@ -52,7 +52,7 @@ #include #include -// the following defines are a hack to avoid multiple problems with frame ponter handling and setjmp +// the following defines are a hack to avoid multiple problems with frame pointer handling and setjmp // see http://gcc.gnu.org/ml/gcc/2011-10/msg00324.html for some details #define mingw_getsp(...) 0 #define __builtin_frame_address(...) 0 diff --git a/modules/imgcodecs/src/grfmt_pam.cpp b/modules/imgcodecs/src/grfmt_pam.cpp index 58b00c81ba..2a0a5665d3 100644 --- a/modules/imgcodecs/src/grfmt_pam.cpp +++ b/modules/imgcodecs/src/grfmt_pam.cpp @@ -62,7 +62,7 @@ namespace cv { #define MAX_PAM_HEADER_IDENITFIER_LENGTH 8 #define MAX_PAM_HEADER_VALUE_LENGTH 255 -/* PAM header fileds */ +/* PAM header fields */ typedef enum { PAM_HEADER_NONE, PAM_HEADER_COMMENT, diff --git a/modules/imgcodecs/src/grfmt_png.cpp b/modules/imgcodecs/src/grfmt_png.cpp index f26262282a..b533cd849f 100644 --- a/modules/imgcodecs/src/grfmt_png.cpp +++ b/modules/imgcodecs/src/grfmt_png.cpp @@ -72,7 +72,7 @@ #pragma warning( disable: 4611 ) #endif -// the following defines are a hack to avoid multiple problems with frame ponter handling and setjmp +// the following defines are a hack to avoid multiple problems with frame pointer handling and setjmp // see http://gcc.gnu.org/ml/gcc/2011-10/msg00324.html for some details #define mingw_getsp(...) 0 #define __builtin_frame_address(...) 0 diff --git a/modules/imgproc/perf/perf_houghlines.cpp b/modules/imgproc/perf/perf_houghlines.cpp index eaadaf1d97..0fafb41c8b 100644 --- a/modules/imgproc/perf/perf_houghlines.cpp +++ b/modules/imgproc/perf/perf_houghlines.cpp @@ -28,7 +28,7 @@ PERF_TEST_P(Image_RhoStep_ThetaStep_Threshold, HoughLines, Canny(image, image, 32, 128); - // add some syntetic lines: + // add some synthetic lines: line(image, Point(0, 0), Point(image.cols, image.rows), Scalar::all(255), 3); line(image, Point(image.cols, 0), Point(image.cols/2, image.rows), Scalar::all(255), 3); @@ -89,7 +89,7 @@ PERF_TEST_P(Image_RhoStep_ThetaStep_Threshold, HoughLines3f, Canny(image, image, 32, 128); - // add some syntetic lines: + // add some synthetic lines: line(image, Point(0, 0), Point(image.cols, image.rows), Scalar::all(255), 3); line(image, Point(image.cols, 0), Point(image.cols/2, image.rows), Scalar::all(255), 3); diff --git a/modules/imgproc/src/hough.cpp b/modules/imgproc/src/hough.cpp index 6b18b17b56..bbb6dfcbdb 100644 --- a/modules/imgproc/src/hough.cpp +++ b/modules/imgproc/src/hough.cpp @@ -603,7 +603,7 @@ HoughLinesProbabilistic( Mat& image, if( k > 0 ) dx = -dx, dy = -dy; - // walk along the line using fixed-point arithmetics, + // walk along the line using fixed-point arithmetic, // stop at the image border or in case of too big gap for( ;; x += dx, y += dy ) { @@ -651,7 +651,7 @@ HoughLinesProbabilistic( Mat& image, if( k > 0 ) dx = -dx, dy = -dy; - // walk along the line using fixed-point arithmetics, + // walk along the line using fixed-point arithmetic, // stop at the image border or in case of too big gap for( ;; x += dx, y += dy ) { @@ -968,7 +968,7 @@ void HoughLinesPointSet( InputArray _point, OutputArray _lines, int lines_max, i createTrigTable( numangle, min_theta, theta_step, irho, tabSin, tabCos ); - // stage 1. fill accumlator + // stage 1. fill accumulator for( i = 0; i < (int)point.size(); i++ ) for(int n = 0; n < numangle; n++ ) { diff --git a/modules/imgproc/src/morph.dispatch.cpp b/modules/imgproc/src/morph.dispatch.cpp index 441797ce88..cbb5315f31 100644 --- a/modules/imgproc/src/morph.dispatch.cpp +++ b/modules/imgproc/src/morph.dispatch.cpp @@ -269,7 +269,7 @@ static bool ippMorph(int op, int src_type, int dst_type, return false; // Multiple iterations on small mask is not effective in current integration - // Implace imitation for 3x3 kernel is not efficient + // Inplace imitation for 3x3 kernel is not efficient // Advanced morphology for small mask introduces degradations if((iterations > 1 || src_data == dst_data || (op != MORPH_ERODE && op != MORPH_DILATE)) && kernel_width*kernel_height < 25) return false; diff --git a/modules/imgproc/src/rotcalipers.cpp b/modules/imgproc/src/rotcalipers.cpp index 79a419b661..6a327b5b39 100644 --- a/modules/imgproc/src/rotcalipers.cpp +++ b/modules/imgproc/src/rotcalipers.cpp @@ -104,7 +104,7 @@ static void rotatingCalipers( const Point2f* points, int n, int mode, float* out /* rotating calipers sides will always have coordinates (a,b) (-b,a) (-a,-b) (b, -a) */ - /* this is a first base bector (a,b) initialized by (1,0) */ + /* this is a first base vector (a,b) initialized by (1,0) */ float orientation = 0; float base_a; float base_b = 0; diff --git a/modules/imgproc/test/ocl/test_canny.cpp b/modules/imgproc/test/ocl/test_canny.cpp index eee98240f9..92214cfdc9 100644 --- a/modules/imgproc/test/ocl/test_canny.cpp +++ b/modules/imgproc/test/ocl/test_canny.cpp @@ -77,7 +77,7 @@ PARAM_TEST_CASE(Canny, Channels, ApertureSize, L2gradient, UseRoi) void generateTestData() { Mat img = readImageType("shared/fruits.png", CV_8UC(cn)); - ASSERT_FALSE(img.empty()) << "cann't load shared/fruits.png"; + ASSERT_FALSE(img.empty()) << "can't load shared/fruits.png"; Size roiSize = img.size(); int type = img.type(); diff --git a/modules/imgproc/test/test_canny.cpp b/modules/imgproc/test/test_canny.cpp index f4d277a386..9d9b7c397e 100644 --- a/modules/imgproc/test/test_canny.cpp +++ b/modules/imgproc/test/test_canny.cpp @@ -357,7 +357,7 @@ PARAM_TEST_CASE(CannyVX, ImagePath, ApertureSize, L2gradient) void loadImage() { src = cv::imread(cvtest::TS::ptr()->get_data_path() + imgPath, IMREAD_GRAYSCALE); - ASSERT_FALSE(src.empty()) << "cann't load image: " << imgPath; + ASSERT_FALSE(src.empty()) << "can't load image: " << imgPath; } }; diff --git a/modules/java/generator/android/java/org/opencv/android/AsyncServiceHelper.java b/modules/java/generator/android/java/org/opencv/android/AsyncServiceHelper.java index 04a4ac6257..60b1c8e91c 100644 --- a/modules/java/generator/android/java/org/opencv/android/AsyncServiceHelper.java +++ b/modules/java/generator/android/java/org/opencv/android/AsyncServiceHelper.java @@ -268,7 +268,7 @@ class AsyncServiceHelper } else { - Log.d(TAG, "Wating for package installation"); + Log.d(TAG, "Waiting for package installation"); } Log.d(TAG, "Unbind from service"); diff --git a/modules/java/test/android_test/src/org/opencv/test/OpenCVTestCase.java b/modules/java/test/android_test/src/org/opencv/test/OpenCVTestCase.java index e9f6d43f31..5c6432c9f2 100644 --- a/modules/java/test/android_test/src/org/opencv/test/OpenCVTestCase.java +++ b/modules/java/test/android_test/src/org/opencv/test/OpenCVTestCase.java @@ -501,10 +501,10 @@ public class OpenCVTestCase extends TestCase { double maxDiff = Core.norm(diff, Core.NORM_INF); if (isEqualityMeasured) - assertTrue("Max difference between expected and actiual Mats is "+ maxDiff + ", that bigger than " + eps, + assertTrue("Max difference between expected and actual Mats is "+ maxDiff + ", that bigger than " + eps, maxDiff <= eps); else - assertFalse("Max difference between expected and actiual Mats is "+ maxDiff + ", that less than " + eps, + assertFalse("Max difference between expected and actual Mats is "+ maxDiff + ", that less than " + eps, maxDiff <= eps); } diff --git a/modules/java/test/pure_test/src/org/opencv/test/OpenCVTestCase.java b/modules/java/test/pure_test/src/org/opencv/test/OpenCVTestCase.java index ccc96ffd2b..5b303f3836 100644 --- a/modules/java/test/pure_test/src/org/opencv/test/OpenCVTestCase.java +++ b/modules/java/test/pure_test/src/org/opencv/test/OpenCVTestCase.java @@ -527,10 +527,10 @@ public class OpenCVTestCase extends TestCase { double maxDiff = Core.norm(diff, Core.NORM_INF); if (isEqualityMeasured) - assertTrue("Max difference between expected and actiual Mats is "+ maxDiff + ", that bigger than " + eps, + assertTrue("Max difference between expected and actual Mats is "+ maxDiff + ", that bigger than " + eps, maxDiff <= eps); else - assertFalse("Max difference between expected and actiual Mats is "+ maxDiff + ", that less than " + eps, + assertFalse("Max difference between expected and actual Mats is "+ maxDiff + ", that less than " + eps, maxDiff <= eps); } diff --git a/modules/js/test/test_calib3d.js b/modules/js/test/test_calib3d.js index 1c8e61086e..f3fe87e0a3 100644 --- a/modules/js/test/test_calib3d.js +++ b/modules/js/test/test_calib3d.js @@ -3,7 +3,7 @@ // of this distribution and at http://opencv.org/license.html. if (typeof module !== 'undefined' && module.exports) { - // The envrionment is Node.js + // The environment is Node.js var cv = require('./opencv.js'); // eslint-disable-line no-var } diff --git a/modules/js/test/test_features2d.js b/modules/js/test/test_features2d.js index 173ada0ded..c8ca17ec3a 100644 --- a/modules/js/test/test_features2d.js +++ b/modules/js/test/test_features2d.js @@ -3,7 +3,7 @@ // of this distribution and at http://opencv.org/license.html. if (typeof module !== 'undefined' && module.exports) { - // The envrionment is Node.js + // The environment is Node.js var cv = require('./opencv.js'); // eslint-disable-line no-var } diff --git a/modules/js/test/test_imgproc.js b/modules/js/test/test_imgproc.js index 673dfac549..14977f5516 100644 --- a/modules/js/test/test_imgproc.js +++ b/modules/js/test/test_imgproc.js @@ -69,7 +69,7 @@ // if (typeof module !== 'undefined' && module.exports) { - // The envrionment is Node.js + // The environment is Node.js var cv = require('./opencv.js'); // eslint-disable-line no-var } @@ -92,7 +92,7 @@ QUnit.test('test_imgProc', function(assert) { binView[0] = 10; cv.calcHist(source, channels, mask, hist, histSize, ranges, false); - // hist should contains a N X 1 arrary. + // hist should contains a N X 1 array. let size = hist.size(); assert.equal(size.height, 256); assert.equal(size.width, 1); diff --git a/modules/js/test/test_mat.js b/modules/js/test/test_mat.js index 2572fbdb04..409ed1b123 100644 --- a/modules/js/test/test_mat.js +++ b/modules/js/test/test_mat.js @@ -69,7 +69,7 @@ // if (typeof module !== 'undefined' && module.exports) { - // The envrionment is Node.js + // The environment is Node.js var cv = require('./opencv.js'); // eslint-disable-line no-var } diff --git a/modules/js/test/test_objdetect.js b/modules/js/test/test_objdetect.js index 76f0a771a5..79c357ae2f 100644 --- a/modules/js/test/test_objdetect.js +++ b/modules/js/test/test_objdetect.js @@ -69,7 +69,7 @@ // if (typeof module !== 'undefined' && module.exports) { - // The envrionment is Node.js + // The environment is Node.js var cv = require('./opencv.js'); // eslint-disable-line no-var cv.FS_createLazyFile('/', 'haarcascade_frontalface_default.xml', // eslint-disable-line new-cap 'haarcascade_frontalface_default.xml', true, false); diff --git a/modules/js/test/test_utils.js b/modules/js/test/test_utils.js index 0f345b4223..905ac3191a 100644 --- a/modules/js/test/test_utils.js +++ b/modules/js/test/test_utils.js @@ -68,7 +68,7 @@ // if (typeof module !== 'undefined' && module.exports) { - // The envrionment is Node.js + // The environment is Node.js var cv = require('./opencv.js'); // eslint-disable-line no-var } QUnit.module('Utils', {}); diff --git a/modules/js/test/test_video.js b/modules/js/test/test_video.js index f26a8b7b40..3c686a96cd 100644 --- a/modules/js/test/test_video.js +++ b/modules/js/test/test_video.js @@ -68,7 +68,7 @@ // if (typeof module !== 'undefined' && module.exports) { - // The envrionment is Node.js + // The environment is Node.js var cv = require('./opencv.js'); // eslint-disable-line no-var } diff --git a/modules/ml/doc/ml_intro.markdown b/modules/ml/doc/ml_intro.markdown index fb4f1a7bd7..f49e378e79 100644 --- a/modules/ml/doc/ml_intro.markdown +++ b/modules/ml/doc/ml_intro.markdown @@ -433,7 +433,7 @@ Logistic Regression {#ml_intro_lr} ML implements logistic regression, which is a probabilistic classification technique. Logistic Regression is a binary classification algorithm which is closely related to Support Vector Machines (SVM). Like SVM, Logistic Regression can be extended to work on multi-class classification problems -like digit recognition (i.e. recognizing digitis like 0,1 2, 3,... from the given images). This +like digit recognition (i.e. recognizing digits like 0,1 2, 3,... from the given images). This version of Logistic Regression supports both binary and multi-class classifications (for multi-class it creates a multiple 2-class classifiers). In order to train the logistic regression classifier, Batch Gradient Descent and Mini-Batch Gradient Descent algorithms are used (see diff --git a/modules/ml/include/opencv2/ml.hpp b/modules/ml/include/opencv2/ml.hpp index 2dd35eb837..506fd3ebcb 100644 --- a/modules/ml/include/opencv2/ml.hpp +++ b/modules/ml/include/opencv2/ml.hpp @@ -1760,7 +1760,7 @@ Note that the parameters margin regularization, initial step size, and step decr To use SVMSGD algorithm do as follows: -- first, create the SVMSGD object. The algoorithm will set optimal parameters by default, but you can set your own parameters via functions setSvmsgdType(), +- first, create the SVMSGD object. The algorithm will set optimal parameters by default, but you can set your own parameters via functions setSvmsgdType(), setMarginType(), setMarginRegularization(), setInitialStepSize(), and setStepDecreasingPower(). - then the SVM model can be trained using the train features and the correspondent labels by the method train(). diff --git a/modules/ml/test/test_emknearestkmeans.cpp b/modules/ml/test/test_emknearestkmeans.cpp index 691815c52a..744eef8a9b 100644 --- a/modules/ml/test/test_emknearestkmeans.cpp +++ b/modules/ml/test/test_emknearestkmeans.cpp @@ -614,7 +614,7 @@ protected: if( data.empty() ) { - ts->printf(cvtest::TS::LOG, "File with spambase dataset cann't be read.\n"); + ts->printf(cvtest::TS::LOG, "File with spambase dataset can't be read.\n"); ts->set_failed_test_info(cvtest::TS::FAIL_INVALID_TEST_DATA); return; } diff --git a/modules/python/src2/gen2.py b/modules/python/src2/gen2.py index 188f793ea2..1b3c329fbf 100755 --- a/modules/python/src2/gen2.py +++ b/modules/python/src2/gen2.py @@ -721,7 +721,7 @@ class FuncInfo(object): aname, argno = v.py_outlist[0] code_ret = "return pyopencv_from(%s)" % (aname,) else: - # ther is more than 1 return parameter; form the tuple out of them + # there is more than 1 return parameter; form the tuple out of them fmtspec = "N"*len(v.py_outlist) backcvt_arg_list = [] for aname, argno in v.py_outlist: diff --git a/modules/ts/misc/table_formatter.py b/modules/ts/misc/table_formatter.py index 1c1fd7852e..d683394364 100755 --- a/modules/ts/misc/table_formatter.py +++ b/modules/ts/misc/table_formatter.py @@ -585,7 +585,7 @@ $(function(){ $(tbl_row).remove() }) if($("tbody tr", tbl).length == 0) { - $("No results mathing your search criteria") + $("No results matching your search criteria") .appendTo($("tbody", tbl)) } } diff --git a/modules/video/src/ecc.cpp b/modules/video/src/ecc.cpp index 01a702155d..b7148c22ef 100644 --- a/modules/video/src/ecc.cpp +++ b/modules/video/src/ecc.cpp @@ -90,7 +90,7 @@ static void image_jacobian_homo_ECC(const Mat& src1, const Mat& src2, //instead of dividing each block with den, - //just pre-devide the block of gradients (it's more efficient) + //just pre-divide the block of gradients (it's more efficient) Mat src1Divided_; Mat src2Divided_; diff --git a/modules/video/src/opencl/pyrlk.cl b/modules/video/src/opencl/pyrlk.cl index c960171ead..539e582790 100644 --- a/modules/video/src/opencl/pyrlk.cl +++ b/modules/video/src/opencl/pyrlk.cl @@ -48,7 +48,7 @@ #define GRIDSIZE 3 #define LSx 8 #define LSy 8 -// defeine local memory sizes +// define local memory sizes #define LM_W (LSx*GRIDSIZE+2) #define LM_H (LSy*GRIDSIZE+2) #define BUFFER (LSx*LSy) diff --git a/modules/videoio/include/opencv2/videoio/container_avi.private.hpp b/modules/videoio/include/opencv2/videoio/container_avi.private.hpp index 7a13ac45d7..8c66c89678 100644 --- a/modules/videoio/include/opencv2/videoio/container_avi.private.hpp +++ b/modules/videoio/include/opencv2/videoio/container_avi.private.hpp @@ -58,7 +58,7 @@ RIFF ('AVI ' {xxdb|xxdc|xxpc|xxwb} xx - stream number: 00, 01, 02, ... db - uncompressed video frame - dc - commpressed video frame + dc - compressed video frame pc - palette change wb - audio frame @@ -139,7 +139,7 @@ class BitStream; // {xxdb|xxdc|xxpc|xxwb} // xx - stream number: 00, 01, 02, ... // db - uncompressed video frame -// dc - commpressed video frame +// dc - compressed video frame // pc - palette change // wb - audio frame diff --git a/modules/videoio/src/cap_aravis.cpp b/modules/videoio/src/cap_aravis.cpp index 1d09826a09..ef291b5905 100644 --- a/modules/videoio/src/cap_aravis.cpp +++ b/modules/videoio/src/cap_aravis.cpp @@ -299,10 +299,10 @@ bool CvCaptureCAM_Aravis::grabFrame() size_t buffer_size; framebuffer = (void*)arv_buffer_get_data (arv_buffer, &buffer_size); - // retieve image size properites + // retrieve image size properites arv_buffer_get_image_region (arv_buffer, &xoffset, &yoffset, &width, &height); - // retieve image ID set by camera + // retrieve image ID set by camera frameID = arv_buffer_get_frame_id(arv_buffer); arv_stream_push_buffer(stream, arv_buffer); diff --git a/modules/videoio/src/cap_avfoundation.mm b/modules/videoio/src/cap_avfoundation.mm index cb0fbb07e4..4a27f6673a 100644 --- a/modules/videoio/src/cap_avfoundation.mm +++ b/modules/videoio/src/cap_avfoundation.mm @@ -1191,7 +1191,7 @@ CvVideoWriter_AVFoundation::CvVideoWriter_AVFoundation(const char* filename, int NSError *error = nil; - // Make sure the file does not already exist. Necessary to overwirte?? + // Make sure the file does not already exist. Necessary to overwrite?? /* NSFileManager *fileManager = [NSFileManager defaultManager]; if ([fileManager fileExistsAtPath:path]){ @@ -1233,7 +1233,7 @@ CvVideoWriter_AVFoundation::CvVideoWriter_AVFoundation(const char* filename, int if(mMovieWriter.status == AVAssetWriterStatusFailed){ NSLog(@"%@", [mMovieWriter.error localizedDescription]); - // TODO: error handling, cleanup. Throw execption? + // TODO: error handling, cleanup. Throw exception? // return; } diff --git a/modules/videoio/src/cap_avfoundation_mac.mm b/modules/videoio/src/cap_avfoundation_mac.mm index 7a04b94948..124462c6c2 100644 --- a/modules/videoio/src/cap_avfoundation_mac.mm +++ b/modules/videoio/src/cap_avfoundation_mac.mm @@ -1184,7 +1184,7 @@ CvVideoWriter_AVFoundation::CvVideoWriter_AVFoundation(const std::string &filena NSError *error = nil; - // Make sure the file does not already exist. Necessary to overwirte?? + // Make sure the file does not already exist. Necessary to overwrite?? /* NSFileManager *fileManager = [NSFileManager defaultManager]; if ([fileManager fileExistsAtPath:path]){ diff --git a/modules/videoio/src/cap_dshow.cpp b/modules/videoio/src/cap_dshow.cpp index f167e2ff65..2f360d68d9 100644 --- a/modules/videoio/src/cap_dshow.cpp +++ b/modules/videoio/src/cap_dshow.cpp @@ -480,7 +480,7 @@ class videoInput{ bool setupDeviceFourcc(int deviceID, int w, int h,int fourcc); //These two are only for capture cards - //USB and Firewire cameras souldn't specify connection + //USB and Firewire cameras shouldn't specify connection bool setupDevice(int deviceID, int connection); bool setupDevice(int deviceID, int w, int h, int connection); diff --git a/modules/videoio/src/cap_msmf.cpp b/modules/videoio/src/cap_msmf.cpp index 0aea9d5a58..caa8af788a 100644 --- a/modules/videoio/src/cap_msmf.cpp +++ b/modules/videoio/src/cap_msmf.cpp @@ -1193,7 +1193,7 @@ bool CvCapture_MSMF::grabFrame() { if (streamIndex != dwStreamIndex) { - CV_LOG_DEBUG(NULL, "videoio(MSMF): Wrong stream readed. Abort capturing"); + CV_LOG_DEBUG(NULL, "videoio(MSMF): Wrong stream read. Abort capturing"); close(); } else if (flags & MF_SOURCE_READERF_ERROR) diff --git a/modules/videoio/src/container_avi.cpp b/modules/videoio/src/container_avi.cpp index d6a7a059e4..8664d198df 100644 --- a/modules/videoio/src/container_avi.cpp +++ b/modules/videoio/src/container_avi.cpp @@ -668,7 +668,7 @@ void BitStream::writeBlock() } size_t BitStream::getPos() const { - return safe_int_cast(m_current - m_start, "Failed to determine AVI bufer position: value is out of range") + m_pos; + return safe_int_cast(m_current - m_start, "Failed to determine AVI buffer position: value is out of range") + m_pos; } void BitStream::putByte(int val) diff --git a/modules/videoio/src/wrl.h b/modules/videoio/src/wrl.h index 3cb813fa3b..028d8f4baa 100644 --- a/modules/videoio/src/wrl.h +++ b/modules/videoio/src/wrl.h @@ -49,8 +49,8 @@ private: unsigned char __k; }; -static_assert(sizeof(Guid) == sizeof(::_GUID), "Incorect size for Guid"); -static_assert(sizeof(__rcGUID_t) == sizeof(::_GUID), "Incorect size for __rcGUID_t"); +static_assert(sizeof(Guid) == sizeof(::_GUID), "Incorrect size for Guid"); +static_assert(sizeof(__rcGUID_t) == sizeof(::_GUID), "Incorrect size for __rcGUID_t"); //////////////////////////////////////////////////////////////////////////////// inline Guid::Guid() : __a(0), __b(0), __c(0), __d(0), __e(0), __f(0), __g(0), __h(0), __i(0), __j(0), __k(0) diff --git a/platforms/android/service/engine/src/org/opencv/engine/OpenCVEngineInterface.aidl b/platforms/android/service/engine/src/org/opencv/engine/OpenCVEngineInterface.aidl index 13e0f7f84f..1f16aac2ac 100644 --- a/platforms/android/service/engine/src/org/opencv/engine/OpenCVEngineInterface.aidl +++ b/platforms/android/service/engine/src/org/opencv/engine/OpenCVEngineInterface.aidl @@ -1,7 +1,7 @@ package org.opencv.engine; /** -* Class provides Java interface to OpenCV Engine Service. Is synchronious with native OpenCVEngine class. +* Class provides Java interface to OpenCV Engine Service. Is synchronous with native OpenCVEngine class. */ interface OpenCVEngineInterface { diff --git a/platforms/ios/build_framework.py b/platforms/ios/build_framework.py index f797d9b964..37c8fc046c 100755 --- a/platforms/ios/build_framework.py +++ b/platforms/ios/build_framework.py @@ -31,7 +31,7 @@ from __future__ import print_function import glob, re, os, os.path, shutil, string, sys, argparse, traceback, multiprocessing from subprocess import check_call, check_output, CalledProcessError -IPHONEOS_DEPLOYMENT_TARGET='8.0' # default, can be changed via command line options or environemnt variable +IPHONEOS_DEPLOYMENT_TARGET='8.0' # default, can be changed via command line options or environment variable def execute(cmd, cwd = None): print("Executing: %s in %s" % (cmd, cwd), file=sys.stderr)