Commit Graph

4006 Commits

Author SHA1 Message Date
Rostislav Vasilikhin
be989b3b60 Merge pull request #12637 from savuor:fix/instr_ipp_ocl
Fixes for instrumentation of IPP and OCL (#12637)

* fixed warning about re-declaring variable when both IPP and instrumentation are enabled

* fixed segfault when no funName provided

* compilation fixed when both OCL and instrumentation are enabled
2018-09-27 22:39:06 +03:00
Alexander Alekhin
48e8e76a34 fix build warnings 2018-09-27 16:31:31 +03:00
Alexander Alekhin
e4f71994c2 calib3d: findChessboardCornersSB() minor updates
- avoid updating of input image during equalizeHist() call
- avoid for() with double variable (use 'int' instead)
- more CV_Check*() macros
- use Mat_<T>, Matx
- static for local variables
2018-09-27 15:38:01 +03:00
Dmitry Kurtaev
24ab751547 Merge pull request #12565 from dkurt:dnn_non_intel_gpu
* Remove isIntel check from deep learning layers

* Remove fp16->fp32 fallbacks where it's not necessary

* Fix Kernel::run to prevent localsize > globalsize
2018-09-26 16:27:00 +03:00
Alexander Alekhin
962dc21f2b docs: fix CUDA docs section 2018-09-26 15:36:55 +03:00
Dmitry Kurtaev
ad5898224d Add a file with preprocessing parameters for deep learning networks 2018-09-25 18:28:37 +03:00
Hamdi Sahloul
47bb09bc4b OpenGL: avoid losing precision in double-to-float conversion 2018-09-24 19:06:48 +09:00
Maksim Shabunin
e0f524d3b7 Fixed several incorrect printf format specifiers 2018-09-24 11:31:40 +03:00
Pavel Rojtberg
d1c842cf29 core: fix printf warnings by using c++11 format 2018-09-24 11:31:40 +03:00
Pavel Rojtberg
4d23a5d92d core: enable printf format warnings for cv::format 2018-09-24 11:31:40 +03:00
Hamdi Sahloul
b7e8ce4523 fix a bug in OpenGL 2018-09-23 23:07:28 +09:00
Hamdi Sahloul
ef5579dc86 Merge pull request #12310 from cv3d:chunks/enum_interface
* Cleanup macros and enable expansion of `__VA_ARGS__` for Visual Studio

* Macros for enum-arguments backwards compatibility

* Convert struct Param to enum struct

* Enabled ParamType.type for enum types

* Enabled `cv.read` and `cv.write` for enum types

* Rename unnamed enum to AAKAZE.DescriptorType

* Rename unnamed enum to AccessFlag

* Rename unnamed enum to AgastFeatureDetector.DetectorType

* Convert struct DrawMatchesFlags to enum struct

* Rename unnamed enum to FastFeatureDetector.DetectorType

* Rename unnamed enum to Formatter.FormatType

* Rename unnamed enum to HOGDescriptor.HistogramNormType

* Rename unnamed enum to DescriptorMatcher.MatcherType

* Rename unnamed enum to KAZE.DiffusivityType

* Rename unnamed enum to ORB.ScoreType

* Rename unnamed enum to UMatData.MemoryFlag

* Rename unnamed enum to _InputArray.KindFlag

* Rename unnamed enum to _OutputArray.DepthMask

* Convert normType enums to static const NormTypes

* Avoid conflicts with ElemType

* Rename unnamed enum to DescriptorStorageFormat
2018-09-21 18:12:35 +03:00
Alexander Alekhin
5fb0f34e8a
Merge pull request #12570 from alalek:drop_usrtype1
* core: drop usage of CV_USRTYPE1 in OpenCV

avoid OpenCV crashes due size change CV_ELEM_SIZE(CV_USRTYPE1): 8 -> 2

* ! fix persistence internal types
2018-09-19 13:55:26 +03:00
Alexander Alekhin
e6171d17f8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-18 12:49:52 +03:00
Hamdi Sahloul
ecc9bd0925 Support GpuMat in copyTo() functions 2018-09-17 23:43:14 +09:00
Alexander Alekhin
808ba552c5 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-14 23:44:35 +00:00
Alexander Alekhin
cecb878915 Merge pull request #12527 from terfendail:mean_wintr 2018-09-14 16:34:30 +00:00
Vitaly Tuzov
95502242c9 meanStdDev() implementation updated to use wide universal intrinsics 2018-09-14 17:52:08 +03:00
Hamdi Sahloul
5d54def264 Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
Takuho NAKANO
451340fd3d Merge pull request #12523 from takotakot:12455_rotatedrect_constructor
* Fix perpendicular decision of RotatedRect::RotatedRect

Error estimation is based on #12455.

* Fix abs to std::fabs and atan to std::atan
2018-09-13 22:26:05 +03:00
Alexander Alekhin
f512bf7004 Merge pull request #12522 from mshabunin:remove-va-msdk-34 2018-09-13 14:15:59 +00:00
Alexander Alekhin
87b1100027
Merge pull request #12410 from terfendail:sum_wintr 2018-09-13 15:49:56 +03:00
Maksim Shabunin
78c500e97a Removed unnecessary build-time MediaSDK detection 2018-09-13 13:43:11 +03:00
Alexander Alekhin
b80c978f5d core: change cv::Ptr DefaultDeleter 2018-09-12 12:20:15 +00:00
Hamdi Sahloul
03b3be0f51 MSVC: Slience external/meaningless warnings 2018-09-12 20:02:13 +09:00
Alexander Alekhin
492ef14550 Merge pull request #12494 from DEEPIR:3.4 2018-09-11 19:38:00 +00:00
Hamdi Sahloul
10ae0c4364 Merge pull request #12486 from cv3d:fix_cpp11
Support MSVC 2013 (#12486)

* Added CV_CONSTEXPR macro

* Utilize CV_NOEXCEPT and CV_CONSTEXPR

* Provides some Ptr<> logical operators
2018-09-11 22:35:03 +03:00
Alexander Alekhin
e73e393c82 Merge pull request #12477 from alalek:drop_legacy_headers 2018-09-11 19:31:16 +00:00
cyy
8f78a1123b fix uninitialized read errors reported by CUDA-INITCHECK 2018-09-11 14:47:39 +08:00
Vitaly Tuzov
0a5bd0ac8b sum() implementation updated to use wide universal intrinsics 2018-09-10 20:16:38 +03:00
Vitaly Tuzov
2f929376ec Fixed meanStdDev() implementation for the case input matrix has more than 4 channels 2018-09-10 20:05:45 +03:00
Vadim Pisarevsky
b01f63835e Merge pull request #12467 from alalek:core_use_shared_ptr 2018-09-10 13:59:14 +00:00
Vadim Pisarevsky
6d7f5871db
added basic support for CV_16F (the new datatype etc.) (#12463)
* added basic support for CV_16F (the new datatype etc.). CV_USRTYPE1 is now equal to CV_16F, which may break some [rarely used] functionality. We'll see

* fixed just introduced bug in norm; reverted errorneous changes in Torch importer (need to find a better solution)

* addressed some issues found during the PR review

* restored the patch to fix some perf test failures
2018-09-10 16:56:29 +03:00
Alexander Alekhin
9097ccf515 drop legacy headers 2018-09-10 08:33:16 +00:00
Alexander Alekhin
dca657a2fd Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-10 00:10:21 +03:00
Alexander Alekhin
df8b057b44 avoid Ptr<> == NULL checks 2018-09-09 19:30:46 +00:00
Alexander Alekhin
64b3c1e691 core(test): update cv::Ptr tests 2018-09-09 19:30:46 +00:00
Alexander Alekhin
15aee09c7f core: replace cv::Ptr implementation => std::shared_ptr 2018-09-09 19:30:46 +00:00
Sergey Nuzhny
80610ca054 Merge pull request #12449 from Nuzhny007:master
* Fixed compilation error WITH_OPENMP under Windows

* Move up OpenMP condition
2018-09-08 23:20:14 +03:00
Alexander Alekhin
95dd4b3f27 bindings: add debug helpers for args conversions 2018-09-08 12:23:08 +00:00
cyy
286c2c236b Merge pull request #12458 from DEEPIR:3.4
* may be an typo fix

* remove identical branch,may be paste error

* add parentheses around macro parameter

* simplify if condition

* check malloc fail

* change the condition of branch removed by commit 3041502861
2018-09-07 18:43:47 +03:00
Hamdi Sahloul
a39e0daacf Utilize CV_UNUSED macro 2018-09-07 20:33:52 +09:00
Alexander Alekhin
73bfe68821 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-07 12:40:27 +03:00
cyy
8b48c2a10c Merge pull request #12443 from DEEPIR:master
* simplify condition

* dims must > 0 or latter sz[dims-1] will underflow
2018-09-06 23:09:39 +03:00
Alexander Alekhin
f1f15841d7 Merge pull request #11630 from alalek:c_api_eliminate_constructors 2018-09-06 20:07:16 +00:00
Vadim Pisarevsky
80b62a41c6 Merge pull request #12411 from vpisarev:wide_convert
* rewrote Mat::convertTo() and convertScaleAbs() to wide universal intrinsics; added always-available and SIMD-optimized FP16<=>FP32 conversion

* fixed compile warnings

* fix some more compile errors

* slightly relaxed accuracy threshold for int->float conversion (since we now do it using single-precision arithmetics, not double-precision)

* fixed compile errors on iOS, Android and in the baseline C++ version (intrin_cpp.hpp)

* trying to fix ARM-neon builds

* trying to fix ARM-neon builds

* trying to fix ARM-neon builds

* trying to fix ARM-neon builds
2018-09-06 19:36:59 +03:00
Vadim Pisarevsky
54279523a3 Merge pull request #12437 from vpisarev:avx2_fixes
* trying to fix the custom AVX2 builder test failures (false alarms)

* fixed compile error with CPU_BASELINE=AVX2 on x86; raised tolerance thresholds in a couple of tests

* fixed compile error with CPU_BASELINE=AVX2 on x86; raised tolerance thresholds in a couple of tests

* fixed compile error with CPU_BASELINE=AVX2 on x86; raised tolerance thresholds in a couple of tests

* seemingly disabled false alarm warning in surf.cpp; increased tolerance thresholds in the tests for SolvePnP and in DNN/ENet
2018-09-06 18:56:55 +03:00
Alexander Alekhin
8a3c394d6a don't use constructors for C API structures 2018-09-06 14:34:16 +03:00
Alexander Alekhin
ad146e5a6b core: remove constructors from C API structures
POD structures can't have constructors.
2018-09-06 14:34:09 +03:00
woody.chow
07c6b0a8df Replace naive normL2Sqr with hal::normL2Sqr_ for better performance 2018-09-06 17:43:07 +09:00
Alexander Alekhin
43b64140ae Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-05 19:54:09 +03:00
Zhenqing Hu
d621a99e73 To fix bug #12389, which is a validation for the potential null pointer.
Signed-off-by: Zhenqing Hu <huzq85@gmail.com>
2018-09-05 19:14:34 +03:00
Alexander Alekhin
d74b98c3d9 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-04 18:39:03 +00:00
Alexander Alekhin
acce95f446 backport fixes for static analyzer warnings
Commits:
- 09837928d9
- 10fb88d027

Excluded changes with std::atomic (C++98 requirement)
2018-09-04 16:49:42 +03:00
cyy
10fb88d027 Merge pull request #12391 from DEEPIR:master
fix some errors found by static analyzer. (#12391)

* fix possible divided by zero and by negative values

* only 4 elements are used in these arrays

* fix uninitialized member

* use boolean type for semantic boolean variables

* avoid invalid array index

* to avoid exception and because base64_beg is only used in this block

* use std::atomic<bool> to avoid thread control race condition
2018-09-04 16:39:19 +03:00
Alexander Alekhin
4f9db2c03a Merge pull request #12377 from alalek:inputarray_raw_wrapper_customtype 2018-09-04 11:29:23 +00:00
Alexander Alekhin
00cbb894ec CUDA: drop OPENCV_TRAITS_ENABLE_DEPRECATED requirement 2018-09-03 18:41:48 +00:00
Alexander Alekhin
a0f86479e0 core: wrap custom types via _RawArray (raw() call)
- support passing of `std::vector<KeyPoint>` via InputArray
2018-09-03 18:41:48 +00:00
LaurentBerger
d71812425a Solves issue 12392 2018-09-03 19:30:49 +02:00
cyy
09837928d9 Merge pull request #12357 from DEEPIR:master
* fix some static analyzer warnings

* fix some static analyzer warnings

* fix race condition of workthread control
2018-09-02 16:34:43 +03:00
Alexander Alekhin
70a27c7dd6 core: add solveLP type checks for output
to forbid Mat1f

Checks are not reliable: empty uninitialized `cv::Mat` has `CV_8UC1` type
2018-09-01 14:51:44 +00:00
Alexander Alekhin
dfa8467a08 Merge pull request #12180 from cv3d:cleanup/python_umat 2018-08-31 20:25:30 +00:00
Hamdi Sahloul
669ee0415a Rewrite the UMat Python wrapper 2018-09-01 01:36:10 +09:00
Vitaly Tuzov
0f2b535fcc Bit-exact GaussianBlur reworked to use wide intrinsics (#12073)
* Bit-exact GaussianBlur reworked to use wide intrinsics

* Added v_mul_hi universal intrinsic

* Removed custom SSE2 branch from bit-exact GaussianBlur

* Removed loop unrolling for gaussianBlur horizontal smoothing
2018-08-31 17:04:59 +03:00
Jakub Golinowski
9f1218b00b Merge pull request #11897 from Jakub-Golinowski:hpx_backend
* Add HPX backend for OpenCV implementation
Adds hpx backend for cv::parallel_for_() calls respecting the nstripes chunking parameter. C++ code for the backend is added to modules/core/parallel.cpp. Also, the necessary changes to cmake files are introduced.
Backend can operate in 2 versions (selectable by cmake build option WITH_HPX_STARTSTOP): hpx (runtime always on) and hpx_startstop (start and stop the backend for each cv::parallel_for_() call)

* WIP: Conditionally include hpx_main.hpp to tests in core module
Header hpx_main.hpp is included to both core/perf/perf_main.cpp and core/test/test_main.cpp.
The changes to cmake files for linking hpx library to above mentioned test executalbles are proposed but have issues.

* Add coditional iclusion of hpx_main.hpp to cpp cpu modules

* Remove start/stop version of hpx backend
2018-08-31 16:23:26 +03:00
Vadim Pisarevsky
a08c6e49b3 Merge pull request #12341 from terfendail:countnonzero_wintr 2018-08-31 12:58:25 +00:00
Alexander Alekhin
90f47eb952 Merge pull request #12234 from cv3d:python/cuda/wrapping_functionalities 2018-08-30 20:23:38 +00:00
Vitaly Tuzov
c894fc5bae countNonZero function reworked to use wide universal intrinsics instead of SSE2 intrinsics 2018-08-30 20:43:39 +03:00
Alexander Alekhin
e86287d8ae cleanup: IPP Async (IPP_A)
except header file with conversion routines (will be removed in OpenCV 4.0)
2018-08-30 18:53:07 +03:00
Alexander Alekhin
15e57d28f5 Merge pull request #12293 from alalek:cleanup_stl_string_replacement 2018-08-30 15:43:57 +00:00
Hamdi Sahloul
532eace7d6 Extensive wrapping of CUDA functionalities for Python 2018-08-30 22:50:33 +09:00
Alexander Alekhin
c1db75e0c7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-29 16:24:56 +03:00
Alexander Alekhin
d13db35f31 Merge tag '3.4.3' 2018-08-28 16:03:08 +03:00
Alexander Alekhin
b38c50b3d0 OpenCV 3.4.3 2018-08-28 15:58:21 +03:00
Alexander Alekhin
4e0d2a3e6c Merge pull request #12193 from alalek:fix_vaapi_sample 2018-08-27 20:56:20 +00:00
Alexander Alekhin
acfdd0e1fc core: fix MSVS "unreachable code" warnings 2018-08-27 16:23:25 +03:00
Alexander Alekhin
9fb8f6347f core: don't call std::string(NULL) 2018-08-27 16:23:25 +03:00
Alexander Alekhin
7f73b105ca core: std::string more changes 2018-08-27 15:41:01 +03:00
Vladislav Sovrasov
ae8dcdf40d core: get rid of built-in String type 2018-08-27 14:42:18 +03:00
Alexander Alekhin
335e61dc47 Merge pull request #12269 from cv3d:improvements/binding_python 2018-08-24 19:38:12 +00:00
Hamdi Sahloul
b5eb65e53e Improve Python binding generator with mappable types and phantom headers 2018-08-25 01:58:42 +09:00
Alexander Alekhin
d10a219833 Merge pull request #12298 from berak:java_matofrotatedrect 2018-08-24 15:54:27 +00:00
berak
bd7bf39b4b java: change MatOfRotatedRect to CV_32FC5 2018-08-24 14:20:36 +02:00
Suleyman TURKMEN
d8cd1d8fcc Merge pull request #12246 from sturkmen72:move_enums
* Update core.hpp

* Update imgproc.hpp

* Update ImgprocTest.java

* Update CameraCalibrator.java

* Update OnCameraFrameRender.java

* Update FindContoursDemo.java

* Update IntroductionToSVMDemo.java

* Update NonLinearSVMsDemo.java

* Update IntroductionToPCADemo.java

* Update Smoothing.java

* Update MainActivity.java

* Update CalcBackProjectDemo1.java

* Update CornerSubPixDemo.java

* Update CornerDetectorDemo.java

* Update GoodFeaturesToTrackDemo.java
2018-08-24 11:11:34 +03:00
Alexander Alekhin
ff2eface19 Merge pull request #12126 from alalek:reproducer_12121 2018-08-24 08:08:17 +00:00
Alexander Alekhin
29ce348c4d Merge pull request #12287 from berak:java_matofrotatedrect 2018-08-24 07:03:13 +00:00
berak
1c20a7f008 java: add a MatOfRotatedRect class 2018-08-23 12:01:36 +02:00
Alexander Alekhin
6356403964 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-22 17:38:51 +03:00
Alexander Alekhin
2c42361ecd build: fix build with defined CV_STATIC_ANALYSIS 2018-08-22 14:19:21 +03:00
Alexander Alekhin
6acabd1fd8 Merge pull request #12256 from alalek:core_intrin_fp16_fix 2018-08-21 12:47:08 +00:00
Alexander Alekhin
5ac9a2a7d0 Merge pull request #12219 from alalek:fix_assert_messages 2018-08-21 12:46:35 +00:00
Alexander Alekhin
7d4bb9428b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-20 19:30:18 +03:00
Alexander Alekhin
67d46dfc6c core(intrin): restrict FP16 operations
Intrinsics must be effective, so don't declare FP16 type/operations if there is no native support.

- CV_FP16: supports load/store into/from float32
- CV_SIMD_FP16: declares FP16 types and native FP16 operations
2018-08-20 19:24:33 +03:00
Rostislav Vasilikhin
378cf2ab63 fixed filename slash processing 2018-08-20 18:02:49 +03:00
Alexander Alekhin
322c6b1ba4 Merge pull request #12235 from alalek:core_perf_scalar_tests 2018-08-18 20:45:47 +00:00
Alexander Alekhin
73d44c7881 Merge pull request #12172 from alalek:core_move_const_table 2018-08-17 14:03:01 +00:00
Alexander Alekhin
31fef14d76 Merge pull request #12136 from sturkmen72:update_documentation 2018-08-17 14:02:20 +00:00
Suleyman TURKMEN
c61bc3a0cb Update documentation and samples 2018-08-17 14:21:29 +03:00
Alexander Alekhin
b24fc6954d core(perf): fix addScalar test
keep the same type for passed Scalar values
2018-08-16 19:36:28 +03:00
Maksim Shabunin
f84eb3dde6 Fixed core headers installation in world builds 2018-08-16 17:16:02 +03:00