Commit Graph

3805 Commits

Author SHA1 Message Date
Alexander Alekhin
c0b6061a5e core(test): Core_Eigen.vector_32 use relative norm 2017-12-12 15:07:31 +03:00
Alexander Alekhin
2324674dfb core(test): update eps in testEigen<float>: 1e-6 => 1e-4 2017-12-12 15:07:31 +03:00
Alexander Alekhin
53b5afbba9 core(test): refactor Java Eigenvalues/PCA tests 2017-12-12 15:07:31 +03:00
Alexander Alekhin
d48d2d7fe2 core(test): refactor PCA test
- CV_L2 -> relative NORM_L2
- eigenEps: 1e-6 ==> 1e-4
- evalEps: 1e-6 ==> 1e-5
- evecEps: 1e-3 ==> 5e-3
- RNG seed: 12345
- drop non-informative legacy test code (ts->printf, etc)
2017-12-12 15:07:27 +03:00
Alexander Alekhin
e49febb70f Merge pull request #10269 from terfendail:softdouble_round 2017-12-11 12:48:03 +00:00
Vadim Pisarevsky
9fa505027a Merge pull request #10263 from mshabunin:embedded-build 2017-12-11 12:42:45 +00:00
Vadim Pisarevsky
558b17dede Merge pull request #10231 from alalek:ocl_refactor_program_api 2017-12-11 12:34:22 +00:00
Vitaly Tuzov
86b128dbb3 Added implementation of softdouble rounding to int64_t 2017-12-11 14:29:32 +03:00
Maksim Shabunin
7349b8f5ce Build for embedded systems 2017-12-11 13:27:37 +03:00
Pavel Rojtberg
6fb9d42c3f Hid symbols in static builds, added LTO flags, removed exports from ts 2017-12-07 10:26:48 +03:00
Alexander Alekhin
15b909e80b ocl: add SPIR Program loading test
SPIR kernels are located in opencv_extra
2017-12-05 22:25:14 +03:00
Alexander Alekhin
a82d2363f4 ocl: refactor Program API
- don't store ProgramSource in compiled Programs (resolved problem with "source" buffers lifetime)
- completelly remove Program::read/write methods implementation:
  - replaced with method to query RAW OpenCL binary without any "custom" data
- deprecate Program::getPrefix() methods
2017-12-05 22:25:14 +03:00
Alexander Alekhin
13c4a02157 ocl: low-level API to support OpenCL binary programs 2017-12-05 22:25:14 +03:00
Vadim Pisarevsky
5ce38e516e Merge pull request #10223 from vpisarev:ocl_mac_fixes
* fixed OpenCL functions on Mac, so that the tests pass

* fixed compile warnings; temporarily disabled OCL branch of TV L1 optical flow on mac

* fixed other few warnings on macos
2017-12-05 13:32:28 +03:00
woody.chow
611cf8d86f Use Eigen::SelfAdjointEigenSolver in cv::eigen 2017-12-05 02:40:55 +03:00
Alexander Alekhin
0595ab3eef ocl: fix usage of invalid OpenCL cache on mixed 64/32-bit platforms
Observed during launch of 32/64-bit applications on Windows.
Added '32-bit' prefix for 32-bit OpenCL devices. No prefix on 64-bit configurations.
2017-12-01 14:20:18 +03:00
Alexander Alekhin
0105518422 Merge pull request #10190 from seiko2plus:issue10189 2017-11-30 07:16:12 +00:00
Vadim Pisarevsky
f5dba12762 Merge pull request #10180 from alalek:ocl_avoid_unnecessary_initialization 2017-11-29 11:42:22 +00:00
Vadim Pisarevsky
86ff4a1ccf Merge pull request #10182 from romanc:fix/divByZeroSimdDouble 2017-11-29 10:01:58 +00:00
Vadim Pisarevsky
614e254331 Merge pull request #10170 from LaurentBerger:Issue10166 2017-11-29 09:51:20 +00:00
Sayed Adel
6fe6436162 core:ppc Fixed compilation with xlc, clang.
- Use EXPECT_TRUE instead of EXPECT_EQ for comparing NULL in xlc
- Added support for int64 to vec_promote in xlc, clang
- Fixed v_rotate_right in xlc
2017-11-29 07:48:26 +00:00
Vadim Pisarevsky
2a8344f75b Merge pull request #10149 from mshabunin:fix-saturate-intrin 2017-11-28 13:17:10 +00:00
Roman Cattaneo
d381e499ea Fixes Issue #10181
This PR fixes incorrect division by zero handling in template
specialization of `Div_SIMD` for type `double`.
2017-11-28 13:48:40 +01:00
Alexander Alekhin
0ed3209b00 ocl: avoid unnecessary loading/initializing OpenCL subsystem
If there are no OpenCL/UMat methods calls from application.

OpenCL subsystem is initialized:
- haveOpenCL() is called from application
- useOpenCL() is called from application
- access to OpenCL allocator: UMat is created (empty UMat is ignored) or UMat <-> Mat conversions are called

Don't call OpenCL functions if OPENCV_OPENCL_RUNTIME=disabled
(independent from OpenCL linkage type)
2017-11-28 14:02:42 +03:00
Alexander Alekhin
abad8977b6 Merge pull request #9247 from paroj:wrap_alog_rw 2017-11-28 10:35:33 +00:00
Maksim Shabunin
6c135261b2 Universal Intrinsics: aligned v_pack behavior on different platforms, fixed 64-bit register on ARM, added more saturate_cast variants 2017-11-28 13:31:56 +03:00
Pavel Rojtberg
6fbf0758bc Python: wrap Algorithm::read and Algorithm::write 2017-11-27 17:04:56 +01:00
LaurentBerger
606a5fd537 Try to solve issue 10166 2017-11-27 13:13:05 +01:00
Alexander Alekhin
c4b158ff91 Merge pull request #10167 from alalek:ocl_fix_issue_contrib1467 2017-11-27 11:05:07 +00:00
Vadim Pisarevsky
a83c12c3d5 Merge pull request #10154 from alalek:ocl_cleanup_obsolete_cache 2017-11-27 10:04:04 +00:00
Alexander Alekhin
92b35e6758 ocl: fix null pointer access crash 2017-11-27 12:43:29 +03:00
Alexander Alekhin
c38620e966 ocl: update OpenCL runtime loader
- fix compilation on Apple (undefined 'oclpath')
- don't warn on OPENCV_OPENCL_RUNTIME=disabled
2017-11-24 19:18:22 +03:00
Alexander Alekhin
b6abf0d3f9 ocl: drop obsolete cache directories after upgrade of OpenCL driver
Entries with the same platform name, the same device name and with different driver versions
are assumed obsolete.
2017-11-24 17:02:28 +03:00
Alexander Alekhin
e5d1790b7b Merge pull request #10018 from alalek:ocl_binary_cache 2017-11-23 13:37:32 +00:00
Alexander Alekhin
e4aa2ccd66 Merge pull request #10136 from alalek:issue_10134 2017-11-22 18:39:47 +00:00
Alexander Alekhin
e7d62d6ef3 Merge pull request #10126 from alalek:dnn_issue_10125 2017-11-22 18:03:51 +00:00
Alexander Alekhin
3f37be5a30 core: fix compilation of intrinsic code 2017-11-22 17:28:50 +03:00
Alexander Alekhin
9db5cbf9a4 dnn: sync output/internals blobs back 2017-11-22 14:00:58 +03:00
Alexander Alekhin
8e6280fc8e ocl: binary program cache 2017-11-22 12:56:38 +03:00
Maksim Shabunin
e57f22a386 Fixed allocSingleton 2017-11-21 18:07:30 +03:00
Maksim Shabunin
12662e064b align singleton malloc 2017-11-21 17:55:23 +03:00
Maksim Shabunin
e75056a084 static init 2017-11-21 17:55:23 +03:00
Alexander Alekhin
b389c1cfe7 core(ocl): syntax fix 2017-11-20 19:19:35 +03:00
Tomoaki Teshima
3cbe60cca2 Merge pull request #9753 from tomoaki0705:universalMatmul
* add accuracy test and performance check for matmul
  * add performance tests for transform and dotProduct
  * add test Core_TransformLargeTest for 8u version of transform

* remove raw SSE2/NEON implementation from matmul.cpp
  * use universal intrinsic instead of raw intrinsic
  * remove unused templated function
  * add v_matmuladd which multiply 3x3 matrix and add 3x1 vector
  * add v_rotate_left/right in universal intrinsic
  * suppress intrinsic on some function and platform
  * add pure SW implementation of new universal intrinsics
  * add test for new universal intrinsics

* core: prevent memory access after the end of buffer

* fix perf tests
2017-11-20 15:56:53 +03:00
Alexander Alekhin
017a38a54e Merge pull request #10108 from mshabunin:fix-eigen-stride 2017-11-17 20:09:08 +00:00
Alexander Alekhin
b45403ed75 Merge pull request #10102 from seiko2plus:coreVsxPacksFix 2017-11-17 19:01:38 +00:00
Maksim Shabunin
f50ec229de Eigen: fix Mat construction stride 2017-11-17 18:27:09 +03:00
Maksim Shabunin
eb136ebba6 Do not reset step for single-row Mat created on user data 2017-11-17 13:15:15 +03:00
Sayed Adel
56bda8917d core:vsx Fix vec_packs in gcc-5 2017-11-16 21:54:56 +00:00
Maksim Shabunin
e730048f69 Merge pull request #10078 from justdoitqd:master 2017-11-16 15:20:44 +00:00
Maksim Shabunin
751cee8e67 Merge pull request #9907 from seiko2plus:vsxFixesImproves 2017-11-16 15:20:16 +00:00
Alexander Alekhin
3a0039d204 core(intrinsics): v_load_low 2017-11-15 16:04:18 +03:00
Alexander Alekhin
42f449880c Merge pull request #10068 from paroj:fs_doc 2017-11-13 09:18:42 +00:00
Simon Guo
2610a47c89 core:ppc Fix 2 interleave logic errors in vsx_utils.hpp
When elements are 64 bits, the vec_st_interleave()/vec_ld_deinterleave()
doesn't interleave 4 elements correctly.

For vec_st_interleave(), following is saved into mem:
	a0 b0 a1 b1 c0 d0 c1 d1
     -> we expected:
	a0 b0 c0 d0 a1 b1 c1 d1

for vec_ld_deinterleave(), following is loaded into a b c d for memory
string { 1 2 3 4 5 6 7 8 }:
	a: 1 3
	b: 2 4
	c: 5 7
	d: 6 8
   -> we expected:
   	a: 1 5
	b: 2 6
	c: 3 7
	d: 4 8

This patch corrects this behavior.

Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
2017-11-13 12:47:10 +08:00
Florian Echtler
2e772510ea Merge pull request #10050 from floe/android-studio-3.3.1
Add Android Mat constructor with support for native buffer (#10050)
2017-11-10 19:35:32 +00:00
Pavel Rojtberg
7190028b23 FileStorage: use copydoc to add base64 info to constructor 2017-11-10 13:06:36 +01:00
Alexander Alekhin
bffe254a81 Merge pull request #10003 from sturkmen72:documentation_updates 2017-11-07 16:52:15 +00:00
Suleyman TURKMEN
63fb79b519 updates documentation and samples 2017-11-07 19:21:21 +03:00
Alexander Alekhin
981009ac1f Merge pull request #9999 from mshabunin:fix-gcc72-warnings 2017-11-07 13:37:25 +00:00
Maksim Shabunin
184daa155f Fixed minor issues reported by GCC 7.2 2017-11-03 18:06:39 +03:00
Alexander Alekhin
9c4f0a984f ocl: drop CV_OclDbgAssert 2017-11-03 13:31:37 +03:00
Alexander Alekhin
8fb48c09f7 ocl: improve debug information 2017-11-03 13:31:37 +03:00
Alexander Alekhin
7db612a545 core(ocl): fix parameters for 'intelblas_gemm_buffer_NT' kernel 2017-11-02 12:50:32 +03:00
Alexander Alekhin
bc9c9abab0 Merge pull request #9877 from mapreri:non-linux 2017-10-30 15:41:36 +00:00
Alexander Alekhin
7809c4156f core(ocl): workaround CL_OUT_OF_RESOURCES error
Flush deallocation queue before calling map/unmap
2017-10-30 17:54:56 +03:00
Sayed Adel
def444d99f core: Several improvements to Power/VSX
- changed behavior of vec_ctf, vec_ctu, vec_cts
  in gcc and clang to make them compatible with XLC
- implemented most of missing conversion intrinsics in gcc and clang
- implemented conversions intrinsics of odd-numbered elements
- ignored gcc bug warning that caused by -Wunused-but-set-variable in rare cases
- replaced right shift with algebraic right shift for signed vectors
  to shift in the sign bit.
- added new universal intrinsics v_matmuladd, v_rotate_left/right
- avoid using floating multiply-add in RNG
2017-10-28 17:46:12 +00:00
Alexander Alekhin
21c8e6d02d Merge tag '3.3.1' 2017-10-23 18:42:41 +03:00
Alexander Alekhin
a871f9e4f7 Merge branch 'update_version' into release 2017-10-23 18:41:12 +03:00
Maksim Shabunin
bf418ba342 Merge pull request #9917 from alalek:ocl_cache_program_failures 2017-10-23 12:25:25 +00:00
Alexander Alekhin
734ea77c9a ocl(macosx): fix CL_INVALID_BUILD_OPTIONS for gemm programs
MacOSX OpenCL compiler is very strict to whitespace issues
2017-10-23 13:56:11 +03:00
Alexander Alekhin
d96cac1341 ocl: cache program build failures
To prevent unnecessary compiler invocations
2017-10-23 13:46:56 +03:00
Alexander Alekhin
185faf99bd ocl: simplify ocl::Timer interface 2017-10-18 16:01:21 +03:00
Mattia Rizzolo
d026d7dcfb
Fix build for non-linux architectures but still glibc-based
Exampls of these are gnu/kfreebsd and gnu/hurd, both available as
unofficial Debian ports.

They don't define __linux__ (as they are non-linux…) but still define
__GLIBC__, so check on that.

Signed-off-by: Mattia Rizzolo <mattia@mapreri.org>
2017-10-17 00:45:27 +02:00
Vadim Pisarevsky
1563300197 Merge pull request #9833 from tomoaki0705:universalMathFuncs 2017-10-16 10:46:56 +00:00
Vadim Pisarevsky
2808bea7fa Merge pull request #9857 from americast:mat_fix 2017-10-16 10:43:37 +00:00
Gregory Morse
d30a0c6f03 Merge pull request #9856 from GregoryMorse:patch-1
* Update OpenCVCompilerOptimizations.cmake

Neon not supported on MSVC ARM breaking build fix

* Update OpenCVCompilerOptimizations.cmake

Whitespace

* Update intrin.hpp

Many problems in MSVC ARM builds (at least on VS2017) being fixed in this PR now.

C:\Users\Gregory\DOCUME~1\MYLIBR~1\OPENCV~3\opencv\sources\modules\core\include\opencv2/core/hal/intrin.hpp(444): error C3861: '_tzcnt_u32': identifier not found

* Update hal_replacement.hpp

Passing variadic expansion in a macro to another macro does not work properly in MSVC and a famous known workaround is hereby applied.  Discussion of it: https://stackoverflow.com/questions/5134523/msvc-doesnt-expand-va-args-correctly
Only needed the fix for ARM builds: TEGRA_ macros are used for cv_hal_ functions in the carotene library.

C:\Users\Gregory\Documents\My Libraries\opencv330\opencv\sources\modules\core\src\arithm.cpp(2378): warning C4003: not enough actual parameters for macro 'TEGRA_ADD'
C:\Users\Gregory\Documents\My Libraries\opencv330\opencv\sources\modules\core\src\arithm.cpp(2378): error C2143: syntax error: missing ')' before ','
C:\Users\Gregory\Documents\My Libraries\opencv330\opencv\sources\modules\core\src\arithm.cpp(2378): error C2059: syntax error: ')'

* Update hal_replacement.hpp

All hal_replacement's using carotene\hal\tegra_hal.hpp TEGRA_ functions as macros preprocessed by variadic macros should be changed, identical as was done in core.
C:\Users\Gregory\Documents\My Libraries\opencv330\opencv\sources\modules\imgproc\src\color.cpp(9604): warning C4003: not enough actual parameters for macro 'TEGRA_CVTBGRTOBGR'
C:\Users\Gregory\Documents\My Libraries\opencv330\opencv\sources\modules\imgproc\src\color.cpp(9604): error C2059: syntax error: '=='

* Update OpenCVCompilerOptimizations.cmake

* Update hal_replacement.hpp

* Update hal_replacement.hpp
2017-10-16 12:12:35 +03:00
Sayan Sinha
60bcb16ca8 Fix typo in mat.hpp 2017-10-14 21:46:11 +05:30
Tomoaki Teshima
2a781bb616 remove raw SSE2/NEON implementation from mathfuncs.cpp
* replace the implementation by universal intrinsic
  * make sure no degradation happens on ARM platform
2017-10-15 00:24:31 +09:00
Alexander Alekhin
b0c6bd0a5b build: resolve naming issue 2017-10-12 13:28:30 +03:00
Alexander Alekhin
88225eb65e ocl: fix world compilation on Windows 2017-10-11 19:04:42 +03:00
Alexander Alekhin
024be9b8c9 Merge pull request #9818 from tz70s:issue#9570 2017-10-11 15:19:17 +00:00
Vadim Pisarevsky
5e82c98a9f Merge pull request #9828 from berak:fix_c++17_9572 2017-10-11 13:31:18 +00:00
berak
ada753a54c fix c++17 namsespace issues 2017-10-11 09:50:22 +02:00
tz70s
6c1247b38c fix#9570: implement mat ptr for generic types
The original template based mat ptr for indexing is not implemented,
add the similar implementation as uchar type, but cast to
user-defined type from the uchar pointer.
2017-10-10 21:46:49 +08:00
Vadim Pisarevsky
0739f28e56 Merge pull request #9786 from LaurentBerger:Histo3d 2017-10-10 10:58:34 +00:00
Vadim Pisarevsky
7d55c09a9f Merge pull request #9763 from seiko2plus:addVsxCore 2017-10-10 10:00:31 +00:00
Alexander Alekhin
bd6fb497bc OpenCV version++
OpenCV 3.3.1
2017-10-10 12:29:57 +03:00
LaurentBerger
752f232335 It's done 2017-10-09 22:25:57 +02:00
Vadim Pisarevsky
bfb12acde6 Merge pull request #9792 from alalek:port_9776 2017-10-09 12:46:06 +00:00
Vadim Pisarevsky
44699c59b3 Merge pull request #9799 from alalek:ocl_program 2017-10-09 12:43:46 +00:00
Wu Zhiwen
dbe9ee0924 ocl: simplify ocl::Timer
Use clFinish to gurantee commands completed, instead of waiting for events.

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
2017-10-09 13:48:38 +08:00
Sayed Adel
4b968d1fe2 Added universal intrinsic for VSX 2017-10-09 00:32:41 +00:00
Sayed Adel
d077778074 Added support for VSX 2017-10-09 00:32:29 +00:00
Alexander Alekhin
6be25727ec ocl: refactor program compilation 2017-10-08 19:55:01 +03:00
Alexander Alekhin
04b4495493 ocl: define ProgramSource before program
no changes in code
2017-10-08 19:55:01 +03:00
Igor Wodiany
ffb9554787
Extract code from scalarToRawData
The same code was repeated several time for different data types, so
it was extracted as a templated function to improve maintability and
make a code more clear.
2017-10-07 19:46:45 +01:00
Igor Wodiany
b638aa74d7 Fix a memory leak in the Mat copying constructor
Exception may be rasied inside the body of a copying constructor after
refcount has been increased, and beacause in the case of the exception
destrcutor is never called what causes memory leak. This commit adds a
workaround that calls the release() function before the exception is
thrown outside the contructor.
2017-10-07 10:50:17 +03:00
Jasper Shemilt
0136711cf4 Adds fitEllipseAMS to imgproc: The Approximate Mean Square (AMS) proposed by Taubin 1991.
Adds fitEllipseDirect to imgproc: The Direct least square (Direct) method by Fitzgibbon1999.

New Tests are included for the methods.
fitEllipseAMS Tests
fitEllipseDirect Tests

Comparative examples are added to fitEllipse.cpp in Samples.
2017-10-02 16:38:41 +01:00
pengli
e340ff9c3a Merge pull request #9114 from pengli:dnn_rebase
add libdnn acceleration to dnn module  (#9114)

* import libdnn code

Signed-off-by: Li Peng <peng.li@intel.com>

* add convolution layer ocl acceleration

Signed-off-by: Li Peng <peng.li@intel.com>

* add pooling layer ocl acceleration

Signed-off-by: Li Peng <peng.li@intel.com>

* add softmax layer ocl acceleration

Signed-off-by: Li Peng <peng.li@intel.com>

* add lrn layer ocl acceleration

Signed-off-by: Li Peng <peng.li@intel.com>

* add innerproduct layer ocl acceleration

Signed-off-by: Li Peng <peng.li@intel.com>

* add HAVE_OPENCL macro

Signed-off-by: Li Peng <peng.li@intel.com>

* fix for convolution ocl

Signed-off-by: Li Peng <peng.li@intel.com>

* enable getUMat() for multi-dimension Mat

Signed-off-by: Li Peng <peng.li@intel.com>

* use getUMat for ocl acceleration

Signed-off-by: Li Peng <peng.li@intel.com>

* use CV_OCL_RUN macro

Signed-off-by: Li Peng <peng.li@intel.com>

* set OPENCL target when it is available

and disable fuseLayer for OCL target for the time being

Signed-off-by: Li Peng <peng.li@intel.com>

* fix innerproduct accuracy test

Signed-off-by: Li Peng <peng.li@intel.com>

* remove trailing space

Signed-off-by: Li Peng <peng.li@intel.com>

* Fixed tensorflow demo bug.

Root cause is that tensorflow has different algorithm with libdnn
to calculate convolution output dimension.

libdnn don't calculate output dimension anymore and just use one
passed in by config.

* split gemm ocl file

split it into gemm_buffer.cl and gemm_image.cl

Signed-off-by: Li Peng <peng.li@intel.com>

* Fix compile failure

Signed-off-by: Li Peng <peng.li@intel.com>

* check env flag for auto tuning

Signed-off-by: Li Peng <peng.li@intel.com>

* switch to new ocl kernels for softmax layer

Signed-off-by: Li Peng <peng.li@intel.com>

* update softmax layer

on some platform subgroup extension may not work well,
fallback to non subgroup ocl acceleration.

Signed-off-by: Li Peng <peng.li@intel.com>

* fallback to cpu path for fc layer with multi output

Signed-off-by: Li Peng <peng.li@intel.com>

* update output message

Signed-off-by: Li Peng <peng.li@intel.com>

* update fully connected layer

fallback to gemm API if libdnn return false

Signed-off-by: Li Peng <peng.li@intel.com>

* Add ReLU OCL implementation

* disable layer fusion for now

Signed-off-by: Li Peng <peng.li@intel.com>

* Add OCL implementation for concat layer

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>

* libdnn: update license and copyrights

Also refine libdnn coding style

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Li Peng <peng.li@intel.com>

* DNN: Don't link OpenCL library explicitly

* DNN: Make default preferableTarget to DNN_TARGET_CPU

User should set it to DNN_TARGET_OPENCL explicitly if want to
use OpenCL acceleration.

Also don't fusion when using DNN_TARGET_OPENCL

* DNN: refine coding style

* Add getOpenCLErrorString

* DNN: Use int32_t/uint32_t instread of alias

* Use namespace ocl4dnn to include libdnn things

* remove extra copyTo in softmax ocl path

Signed-off-by: Li Peng <peng.li@intel.com>

* update ReLU layer ocl path

Signed-off-by: Li Peng <peng.li@intel.com>

* Add prefer target property for layer class

It is used to indicate the target for layer forwarding,
either the default CPU target or OCL target.

Signed-off-by: Li Peng <peng.li@intel.com>

* Add cl_event based timer for cv::ocl

* Rename libdnn to ocl4dnn

Signed-off-by: Li Peng <peng.li@intel.com>
Signed-off-by: wzw <zhiwen.wu@intel.com>

* use UMat for ocl4dnn internal buffer

Remove allocateMemory which use clCreateBuffer directly

Signed-off-by: Li Peng <peng.li@intel.com>
Signed-off-by: wzw <zhiwen.wu@intel.com>

* enable buffer gemm in ocl4dnn innerproduct

Signed-off-by: Li Peng <peng.li@intel.com>

* replace int_tp globally for ocl4dnn kernels.

Signed-off-by: wzw <zhiwen.wu@intel.com>
Signed-off-by: Li Peng <peng.li@intel.com>

* create UMat for layer params

Signed-off-by: Li Peng <peng.li@intel.com>

* update sign ocl kernel

Signed-off-by: Li Peng <peng.li@intel.com>

* update image based gemm of inner product layer

Signed-off-by: Li Peng <peng.li@intel.com>

* remove buffer gemm of inner product layer

call cv::gemm API instead

Signed-off-by: Li Peng <peng.li@intel.com>

* change ocl4dnn forward parameter to UMat

Signed-off-by: Li Peng <peng.li@intel.com>

* Refine auto-tuning mechanism.

- Use OPENCV_OCL4DNN_KERNEL_CONFIG_PATH to set cache directory
  for fine-tuned kernel configuration.
  e.g. export OPENCV_OCL4DNN_KERNEL_CONFIG_PATH=/home/tmp,
  the cache directory will be /home/tmp/spatialkernels/ on Linux.

- Define environment OPENCV_OCL4DNN_ENABLE_AUTO_TUNING to enable
  auto-tuning.

- OPENCV_OPENCL_ENABLE_PROFILING is only used to enable profiling
  for OpenCL command queue. This fix basic kernel get wrong running
  time, i.e. 0ms.

- If creating cache directory failed, disable auto-tuning.

* Detect and create cache dir on windows

Signed-off-by: Li Peng <peng.li@intel.com>

* Refine gemm like convolution kernel.

Signed-off-by: Li Peng <peng.li@intel.com>

* Fix redundant swizzleWeights calling when use cached kernel config.

* Fix "out of resource" bug when auto-tuning too many kernels.

* replace cl_mem with UMat in ocl4dnnConvSpatial class

* OCL4DNN: reduce the tuning kernel candidate.

This patch could reduce 75% of the tuning candidates with less
than 2% performance impact for the final result.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>

* replace cl_mem with umat in ocl4dnn convolution

Signed-off-by: Li Peng <peng.li@intel.com>

* remove weight_image_ of ocl4dnn inner product

Actually it is unused in the computation

Signed-off-by: Li Peng <peng.li@intel.com>

* Various fixes for ocl4dnn

1. OCL_PERFORMANCE_CHECK(ocl::Device::getDefault().isIntel())
2. Ptr<OCL4DNNInnerProduct<float> > innerProductOp
3. Code comments cleanup
4. ignore check on OCL cpu device

Signed-off-by: Li Peng <peng.li@intel.com>

* add build option for log softmax

Signed-off-by: Li Peng <peng.li@intel.com>

* remove unused ocl kernels in ocl4dnn

Signed-off-by: Li Peng <peng.li@intel.com>

* replace ocl4dnnSet with opencv setTo

Signed-off-by: Li Peng <peng.li@intel.com>

* replace ALIGN with cv::alignSize

Signed-off-by: Li Peng <peng.li@intel.com>

* check kernel build options

Signed-off-by: Li Peng <peng.li@intel.com>

* Handle program compilation fail properly.

* Use std::numeric_limits<float>::infinity() for large float number

* check ocl4dnn kernel compilation result

Signed-off-by: Li Peng <peng.li@intel.com>

* remove unused ctx_id

Signed-off-by: Li Peng <peng.li@intel.com>

* change clEnqueueNDRangeKernel to kernel.run()

Signed-off-by: Li Peng <peng.li@intel.com>

* change cl_mem to UMat in image based gemm

Signed-off-by: Li Peng <peng.li@intel.com>

* check intel subgroup support for lrn and pooling layer

Signed-off-by: Li Peng <peng.li@intel.com>

* Fix convolution bug if group is greater than 1

Signed-off-by: Li Peng <peng.li@intel.com>

* Set default layer preferableTarget to be DNN_TARGET_CPU

Signed-off-by: Li Peng <peng.li@intel.com>

* Add ocl perf test for convolution

Signed-off-by: Li Peng <peng.li@intel.com>

* Add more ocl accuracy test

Signed-off-by: Li Peng <peng.li@intel.com>

* replace cl_image with ocl::Image2D

Signed-off-by: Li Peng <peng.li@intel.com>

* Fix build failure in elementwise layer

Signed-off-by: Li Peng <peng.li@intel.com>

* use getUMat() to get blob data

Signed-off-by: Li Peng <peng.li@intel.com>

* replace cl_mem handle with ocl::KernelArg

Signed-off-by: Li Peng <peng.li@intel.com>

* dnn(build): don't use C++11, OPENCL_LIBRARIES fix

* dnn(ocl4dnn): remove unused OpenCL kernels

* dnn(ocl4dnn): extract OpenCL code into .cl files

* dnn(ocl4dnn): refine auto-tuning

Defaultly disable auto-tuning, set OPENCV_OCL4DNN_ENABLE_AUTO_TUNING
environment variable to enable it.

Use a set of pre-tuned configs as default config if auto-tuning is disabled.
These configs are tuned for Intel GPU with 48/72 EUs, and for googlenet,
AlexNet, ResNet-50

If default config is not suitable, use the first available kernel config
from the candidates. Candidate priority from high to low is gemm like kernel,
IDLF kernel, basick kernel.

* dnn(ocl4dnn): pooling doesn't use OpenCL subgroups

* dnn(ocl4dnn): fix perf test

OpenCV has default 3sec time limit for each performance test.
Warmup OpenCL backend outside of perf measurement loop.

* use ocl::KernelArg as much as possible

Signed-off-by: Li Peng <peng.li@intel.com>

* dnn(ocl4dnn): fix bias bug for gemm like kernel

* dnn(ocl4dnn): wrap cl_mem into UMat

Signed-off-by: Li Peng <peng.li@intel.com>

* dnn(ocl4dnn): Refine signature of kernel config

- Use more readable string as signture of kernel config
- Don't count device name and vendor in signature string
- Default kernel configurations are tuned for Intel GPU with
  24/48/72 EUs, and for googlenet, AlexNet, ResNet-50 net model.

* dnn(ocl4dnn): swap width/height in configuration

* dnn(ocl4dnn): enable configs for Intel OpenCL runtime only

* core: make configuration helper functions accessible from non-core modules

* dnn(ocl4dnn): update kernel auto-tuning behavior

Avoid unwanted creation of directories

* dnn(ocl4dnn): simplify kernel to workaround OpenCL compiler crash

* dnn(ocl4dnn): remove redundant code

* dnn(ocl4dnn): Add more clear message for simd size dismatch.

* dnn(ocl4dnn): add const to const argument

Signed-off-by: Li Peng <peng.li@intel.com>

* dnn(ocl4dnn): force compiler use a specific SIMD size for IDLF kernel

* dnn(ocl4dnn): drop unused tuneLocalSize()

* dnn(ocl4dnn): specify OpenCL queue for Timer and convolve() method

* dnn(ocl4dnn): sanitize file names used for cache

* dnn(perf): enable Network tests with OpenCL

* dnn(ocl4dnn/conv): drop computeGlobalSize()

* dnn(ocl4dnn/conv): drop unused fields

* dnn(ocl4dnn/conv): simplify ctor

* dnn(ocl4dnn/conv): refactor kernelConfig localSize=NULL

* dnn(ocl4dnn/conv): drop unsupported double / untested half types

* dnn(ocl4dnn/conv): drop unused variable

* dnn(ocl4dnn/conv): alignSize/divUp

* dnn(ocl4dnn/conv): use enum values

* dnn(ocl4dnn): drop unused innerproduct variable

Signed-off-by: Li Peng <peng.li@intel.com>

* dnn(ocl4dnn): add an generic function to check cl option support

* dnn(ocl4dnn): run softmax subgroup version kernel first

Signed-off-by: Li Peng <peng.li@intel.com>
2017-10-02 15:38:00 +03:00
Vadim Pisarevsky
f646f61dad Merge pull request #9752 from alalek:eigenNonSymmetric 2017-10-02 11:51:13 +00:00
Alexander Alekhin
1f18282f04 build: fix MSVS2017 warning 2017-10-01 10:48:35 +00:00
Alexander Alekhin
529632f8d0 core: cv::eigenNonSymmetric() via EigenvalueDecomposition 2017-10-01 07:45:32 +00:00
Alexander Alekhin
69103a9fab Merge pull request #9740 from tomoaki0705:universalArithm 2017-09-29 14:17:01 +00:00
Tomoaki Teshima
e187219699 use universal intrinsic in arithm.cpp
* remove raw NEON/SSE2 implementation as much as possible
  * replace them to universal intrinsic in InRange/Compare/AddWeighted
2017-09-29 08:33:15 +09:00
Vadim Pisarevsky
af8fc3e209 Merge pull request #9604 from alalek:ocl_kernel_profiling 2017-09-28 13:48:34 +00:00
Alexander Alekhin
0f0f5652fb Merge pull request #9717 from alalek:fix_fma 2017-09-27 13:48:09 +00:00
Deric Crago
a0d7cf89f2 Fixed 'boundary' spelling 2017-09-26 23:42:48 -04:00
Alexander Alekhin
3dee92ec50 fix usage of CV_FMA3 macro 2017-09-26 17:23:54 +03:00
Alexander Alekhin
513c2b92a4 Merge pull request #9709 from savuor:softfloat_r3d 2017-09-26 11:16:42 +00:00
Congxiang Pan
89b6e68e1e Merge pull request #9466 from huningxin:js
GSoC 2017: Improve and Extend the JavaScript Bindings for OpenCV (#9466)

* Initial support for build with emscripten

mkdir build_js
cd build_js
cmake -D CMAKE_TOOLCHAIN_FILE=/path/to/emsdk/emsdk-portable/emscripten/master/cmake/Modules/Platform/Emscripten.cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..

* Add js module

The output is build/bin/opencv_js.js

* Fix opencv2/calib3d.hpp not found issue

* Add module name

Usage:
var cv = cv();

* Add total memory as 128MB and allow growth

* Add compilation flags for emscripten

* Use EMSCRIPTEN build target

* Disable js module for non emscripten build

* Bind the preload file path to root

Usage:
face_cascade.load('haarcascade_frontalface_default.xml');

* add test folder

* fix test files

* Copy js module test to bin

* Support to run tests on Node.js

Fix tests to import cv Module when runtime is node.
Add tests.js to use qunit to auto run tests.
Modify umd wrapper to support Module is not defined.

Usage:
node tests.js

* Support UMD and file system

Wrap the opencv_js.js to opencv.js by UMD wrapper

Use emscripten file system API to load files instead of generating data file or
embedding them. It supports both browser and node.js usages.

* Fix incorrect module name in tests

* Add package.json to add dependence of qunit

* Add js_tutorials folder and a intro page of opencv.js

Enable BUILD_DOCS in CMakeLists.txt.
Add new folder of js_tutorials in folder opencv/doc.
Imitate the tutorials of OpenCV-Python to create a intro page of opencv.js and a setup guide

* Import and use binding gen from opencvjs project

* Modify the embindgen.py to pass the build and test

* Add classes and functions white list

* Consolidate hdr_parser.py (#31)

Use hdr_parser.py of python module

Add js flag to support js binding generator.

* Use emscripten::vecFromJSArray for input vector param

Fix part of #23

* Fix test cases after #34

Fix #39

* Expose groupRectangles and CascadeClassifier.empty

* Add js highgui tutorials

add tutorials of imread&imshow and createTrackbar in doc/js_tutorials/js_gui folder
add interactive tutorial webpage for imread&imshow and createTrackbar in doc/js_tutorials/js_interactive_tutorials folder, and some images needed.
change doc/CMakeLists.txt to copy the interactive tutorial webpage and opencv.js to the tutorials' destination folder

* rm useless annotation in doc/CMakeLists.txt

* fix some nonstandard indentation and space

* add check if canvas is valid

* Expose BackgroundSubtractorMOG2

Fix #43

* Fix build of js doc

Limit copy_js_interactive_tutorials for doxygen build
Add dep to opencv.js

Fix #53

* Implement cv.imread & cv.imshow and insert interactive pages in tutorials (#55)

* add helper.js

* delete ALL in add target copy_js_interactive_tutorials to avoid dependence error

* Insert interactive pages in tutorials

insert the old interactive pages in markdown by using \htmlonly and \endhtmlonly command.
delete the useless interactive page
rename js_interactive_tutorials to js_assets to put some images needed in

* fix the depends of the target doxygen

add opencv.js to depends and delete the useless target of copy_js_assets

* change filename helper.js to helpers.js

* disable button or trankbar before opencv.js is ready

* Expose CV_64F

Fix #65

* improve cv.imshow to display different types as native imshow

* add utils.js to reuse functions and update tutorials

* Make doxygen depend on bin/opencv.js

* Fix memory issue of matFromArray

Fix #37

* Merge pull request from ganwenyao/tutorial_18

* Add notes for ganwenyao/tutorial_18

* Modifying for ganwenyao/tutorial_18

* Change Mat constructor with data to 5 parameters

* Mat supports constructor with Scalar

Fix #60

* update cv.imread cause the memory issue of matFromArray has been fixed

* fix canvas name and default input image

* Expose cv::Moments

Fix #85

* Add -Wno-missing-prototypes for emscripten build

* fix canvas name

* add tutorial of video input and output

* Expose enums as emscripten consts

Fix #72

* update the tutorial to use Mat constructor with Scalar and change lena.jpg

* Exclude cv::Mat for vecFromJSArray

Fix #82

* Add unit tests for cv.moments

* Fix the unit tests.

* add checkbox and stop button

* add adapter.js to make sure compatibility fo video tutorials

* Support default parameters with function overloading

* modify enums to constants

* Use https URL for MathJax.js

Fix #109

* Comment out the debug print in embindgen.py

* Expose RotatedRect

Fix #96

* replace enum with constants and improve onload function

* delete some useless paras cause #105 fixed this

* Modify const name

* Modify Contour Properties

* tutorials for imgprc2 and objdec

* Expose more functions for img proc tutorials

Fix #76

* Expose polylines for video analysis tutorial

Fix #121

* Expose constants for default parameters of img proc tutorials

Fix #122

* Fix wrong parameter types of Mat.copyTo

Fix #87

* Support default parameters of mat.convertTo

Fix #123

* Support default parameters for external constructors

Fix #131

* Revert "Expose polylines for video analysis tutorial"

This reverts commit 3ce7615652e510d30e3c0014706ac38c98883189.

Fix #121

* Support cv.minMaxLoc

Fix #127

* Expose cv.minEnclosingCircle

Fix #126

* Add video analysis tutorials

add three video tutorials, Meanshift and Camshift, Optical Flow Background Subtraction
add cup.mp4 and box.mp4 for demo in tutorials

* improve image processing tutorials

* repalce console.warn with throw to throw exception

* add try-catch to throw exception in code demo

* Change mat.size() return value to JS Array object

Fix #140

* add a note about different channels order between canvas and native opencv

* add a note about how to capture video from video files

* Binding cv.Scalar to JS array

Fix #147

* Add JS cv.Scalar object into helpers.js

* Update Install OpenCV-JavaScript tutorial page

Fix #44

* Update the OpenCV-JavaScript introduction page

Fix #44

* add cv.VideoCapture and read() function

* set the size of the hidden canvas same as the video

* Add Using OpenCV-JavaScript tutorial page

Fix #44

* fix some bad code style

* Update tutorials after 8/2 sync meeting

Changes include:
- Use OpenCV.js name instead of OpenCV-JavaScript
- Put using OpenCV.js ahead of build OpenCV.js
- Refine usage and introduction page
- Muted the video in tutorials

* Fix a typo in introduction page

* use cv.VideoCapture and its read() function to read video

* replace OpenCV-JavaScript with OpenCV.js

* Use onload of async script in js_usage tutorial

* add more info about mat.data

* Change Size to value_object

* Integrate Moh and Sajjad's editing into introduction page

* Change Point to value_object

* Change Rect to value_object with helper object

* Add helper objects for Point and Size

* Change RotatedRect to value_object with helpers

* Change MinMaxLoc and Circle to value_object

* Change TermCriteria to value_object

* Fix core_bindings.cpp for MinMaxLoc and Circle

* Remove unused types

* Change meanShift and CamShift to return Rect

* Change methods of RotatedRect to static

* Change mat.data from methods to property

Fix #75 and #77

* support img id and element in cv.imread

* Change mat.size to property and add mat.step

Fix #163

* Add matFromArray and matFromImageData as JS helpers

Fix #79, #78

* Lower camel case for Mat element getters

Fix #81

* Mat.getRoiRect and tests

Fix #86

* Support type for Mat.ptr

Fix #83

* Name changing of Mat element getters

'getUcharAt` -> 'ucharAt'

* fix code style and args names

* Fix helpers.js due to cv.Mat API update

* Fix opencv.js usage tutorial

* Fix a typo of js_setup

* Change Moments to value_object

* Add Range as value_object

Fix #171

* Support Mat.diag and Mat.isContinous

Fix #84 and #89

* Support Mat.setTo

Fix #88

* Apply edits to js_intro

* Apply edits to js_usage

* Apply edits to js_setup

* update tutorials to apply data type change

* Modify tutorials

* add core tutorials

* delete MatVector elements and delete useless set operation

* add tutorials_objdec_camera

* Add instructions for WebAssembly

* apply tech writer's feedbacks into tutorials

* Organize white list by modules

* Change size to method and bind to MatExpr.size()

Fix #177

* improve tutorials

* Modify core tutorials

* add params list and explanations for OpenCV.js functions

* remove face_profile from Face Detection in Video Capture

* Add demos link

* Change Gui to GUI

* Update js_intro based on Moh and Sajjad's edits

* Fixup for 3.3.0 rebase

* Update js_intro per Moh's suggestion

* Update contributors list per Moh's idea

* add adapter.js in video_display tutorial

* Change Mat.getRoiRect to Mat.roi

Fix #194

* Remove unnecessary files for test

Fix #192

* Licenses updated to UC BSD 3-Clause

* Apply OpenCV coding style for C++ files

* Add OpenCV license for python and js files

* Fix coding style issue in helpers.js

* Remove unused test_commons.js

* Fix coding style of test_imgproc.js

* Fix coding style of test_mat.js

* Fix space before semicolon

* Fix coding style of test_objdetect.js

* Fix coding style of tests.js

* Fix coding style of test_utils.js

* Fix coding style of test_video.js

* Fix failures of node.js tests

* Add eslint rule config and fix eslint errors

* Add eslint config for js/src and fix eslint errors

* Clean up the opencv.js dependencies

Fix #186

* Fix build issue for python generator

* Fix doxygen buildbot failure

* delete trailing whitespace, blank line at EOF and replace tab with space

* Fix tutorial_js_root reference issue for non opencv.js build

* replace the file with small size

* Initial commit of build_js.py

* Move the js build configurations to build script

* Add wasm build support

* Update OpenCV.js build tutorial by using script

* Fix global var issue in tests

* Add a README.md for build_js.py

* Copy the haar cascade files from data dir for tutorials

* Not use memory init file

* Disable debug print for modules/js/CMakeLists.txt

* Check files when build done

* Fix image name in js_gradients tutorial

* Fix image load issue in js_trackbar tutorial

* Find the opencv source directory via relative path by default

* Make the cmake args based on build_doc option

* Fix a typo in js_setup.markdown

* Fix make failure issue on config generated by build_js.py

* Eliminate js branch of hdr_parser.py

* Extract examples from js_basic_ops tutorial

* Fix coding style of utils.js

* Improve examples error handling

Handle:
1. opencv.js loading errors
2. script errors (Error)
3. cv::Exception

Fix #217

* Add enable_exception option into build_js.py

* Support print exception for exception catching disabled build

* Extract example from js_usage tutorial

* Avoid copying .eslintrc.json when building doc

Fix #223

* Revert to use onload as opencv.js ready event

* Use 4 spaces indention for js examples

* embed html in tutorials with iframe tag

* Revert to use onload as opencv.js ready event

* Extract examples from js_video_display tutorial

* Implement Utils object

* modify core imgprc and face_detection tutorials

* Fix examples of js_gui tutorials

* Fix coding style of utils.js

* Modify tutorials

* Extract example from js_face_detection_camera tutorial

* Disable new-cap check in eslint

* Extract examples from js_meanshift tutorial

* Extract examples from video tutorials

* Remove new-cap declaration and update grammer in comments

* Change textarea width to 100 to align with eslint config

* Fix printError issue when opencv.js loading fails

* Remove BUILD_opencv_js dependency for doc build

Fix #213

* Expose cv::getBuildInformation

* Dump opencv build info when opencv.js loaded for live examples

* Make the button to stand out in js live examples

Fix #235

* Style for disabled button

* Add js_imgproc_camera.html example

* Fix coding style of imgproc_camera example

* Add js_imgproc_camera tutorial

* Remove link to opencv.js demos

* doc: copy opencv.js on build, use absolute paths for assets

* doc: reuse existed file box.mp4
2017-09-25 16:52:07 +03:00
Rostislav Vasilikhin
945706a8e8 softfloat f64_sqrt bug fix 2017-09-25 15:52:56 +03:00
Alexander Alekhin
e5890fc92a ocl: fix build 2017-09-19 15:34:36 +03:00
Alexander Alekhin
1283d62e49 ocl: Kernel::runProfiling() 2017-09-19 15:34:35 +03:00
Alexander Alekhin
d9ab31490c ocl: profiling queue 2017-09-19 15:32:15 +03:00
Alexander Alekhin
2e68f89225 ocl: update kernel global size adjustment
Prevents 10000x1 => 10000x8 transformation after getContinuousSize() call
2017-09-18 19:04:46 +03:00
Vadim Pisarevsky
f4136679ea Merge pull request #9551 from ChristofKaufmann:MultiChannelMask 2017-09-18 09:28:34 +00:00
Vadim Pisarevsky
73298ea875 Merge pull request #9642 from saskatchewancatch:psnr-checks 2017-09-18 09:24:03 +00:00
Christof Kaufmann
7ec59fc097 Revert changes of mean and meanStdDev 2017-09-17 21:00:28 +02:00
RAJ NATARAJAN
0e44ad5543 Removed unnecessary assertion 2017-09-16 19:55:45 -07:00
RAJ NATARAJAN
6da62f56fa Add some useful input assertions to PSNR function
Input arrays must be depth CV_8U and of identical size.
2017-09-15 23:36:58 -06:00
Alexander Alekhin
9dea296241 Merge pull request #9458 from csukuangfj:fix-doc 2017-09-15 19:35:01 +00:00
Vadim Pisarevsky
5707304777 Merge pull request #9633 from saskatchewancatch:psnr-doc 2017-09-15 12:26:34 +00:00
saskatchewancatch
a90a93b454 i9629 - Added actual documentation for cv::PSNR function 2017-09-14 18:20:00 -06:00
Vadim Pisarevsky
32bb71d686 Merge pull request #9603 from alalek:ocl_device_extensions 2017-09-13 14:43:36 +00:00
Vadim Pisarevsky
f1aa180a40 Merge pull request #9574 from saskatchewancatch:i9482 2017-09-13 13:59:43 +00:00
Vadim Pisarevsky
622318aeae Merge pull request #9561 from dkurt:fix_8693 2017-09-13 13:34:49 +00:00
Vladislav Sovrasov
32bf712102 cmake: disable implicit-fallthrough by default 2017-09-11 16:04:00 +03:00
saskatchewancatch
c9d3c0f206 More whitespace fixes 2017-09-10 19:03:56 -06:00
Alexander Alekhin
169add5aa6 ocl: added cv::ocl::Device::isExtensionSupported() method 2017-09-10 20:32:30 +00:00
Alexander Alekhin
597b3f4456 Merge pull request #9580 from mshabunin:fix-static-6 2017-09-09 19:31:21 +00:00
Alexander Alekhin
26ad229bd6 Merge pull request #9590 from alalek:ocl_runtime_fix 2017-09-09 19:30:07 +00:00
saskatchewancatch
30ff197f78 Fix whitespace issues 2017-09-08 20:27:03 -06:00
saskatchewancatch
8877e3aedb Adjustmenbts 2017-09-08 19:55:19 -06:00
Alexander Alekhin
576a85368d Merge pull request #9582 from sovrasov:fix_gcc7_macro_warning 2017-09-08 13:31:27 +00:00
Alexander Alekhin
44b75eb116 core: fix OpenCL runtime compilation with HAVE_OPENCL_STATIC 2017-09-08 12:43:33 +03:00
Maksim Shabunin
248e2c7d47 Fixed some issues found by static analysis 2017-09-08 12:22:12 +03:00
Pavel Vlasov
37ab318657 Compatibility improvement with old IPP versions (tested on 9.0.1);
Manual IPP dispatcher simplification;
2017-09-08 11:08:24 +03:00
saskatchewancatch
fda1e76776 Feedback.
Still need to remove the descriptions of these flags from cv::norm
2017-09-07 22:43:55 -06:00
Vladislav Sovrasov
eeba5c3603 core: fix gcc7 warning about empty VA_ARGS in Assert macro 2017-09-07 16:20:38 +03:00
Vadim Pisarevsky
d25cbaaba8 Merge pull request #9293 from sovrasov:assert_improvement 2017-09-07 11:17:42 +00:00
Maksim Shabunin
c92c99ed0b Enabled forEach for const Mats 2017-09-07 11:35:14 +03:00
saskatchewancatch
570083fb9f i9482:
Removing description for cv::NormTypes that's already in cv::norm

Masking out NORM_TYPE_MASK from docs since it's not intended to be exposed to user
2017-09-06 22:42:01 -06:00
saskatchewancatch
b32685c714 i9482: Improve documentation concerning norm functionality.
Added forkfour Latex command to math js support.

Split cv::norm documentation between the cv::norm and its overload, to make things clearer

Corrected some typos and cleaned up grammar.

Result is clearer documentation for the norms.

Work pending...
2017-09-06 22:35:39 -06:00
Maksim Shabunin
2ac57a2b1f Merge pull request #9457 from alalek:type_traits_issue_7599 2017-09-06 13:34:29 +00:00
Dmitry Kurtaev
8b094755fa Fix https://github.com/opencv/opencv/issues/8693 2017-09-05 23:33:18 +03:00
Christof Kaufmann
46a668c565 Add multi-channel mask support to mean, meanStdDev and setTo
This adds the possibility to use multi-channel masks for the functions
cv::mean, cv::meanStdDev and the method Mat::setTo. The tests have now a
probability to use multi-channel masks for operations that support them.
This also includes Mat::copyTo, which supported multi-channel masks
before, but there was no test confirming this.
2017-09-04 19:40:27 +02:00
Alexander Alekhin
164a41b399 fix CUDA build
CUDA implementation wants to convert std::vector<KeyPoint> <-> GpuMat.
There is no direct mapping from KeyPoint (mix of int/float fields)
into cv::Mat element type, so this conversion must be avoided.

Legacy mode is turned back for CUDA builds.
2017-09-04 14:41:29 +03:00
Alexander Alekhin
3df41b3263 Merge pull request #9426 from borisfom:dispatch 2017-09-03 09:24:59 +00:00
Alexander Alekhin
f7a273cfb3 core(test): regression test for 9507 2017-09-01 21:08:58 +03:00
Alexander Alekhin
0451629e22 core(persistence): resolve DMatch/KeyPoint problem 2017-08-31 19:35:48 +03:00
Alexander Alekhin
86b55b3923 core: eliminate CV_ELEM_SIZE() 2017-08-31 19:35:48 +03:00
Alexander Alekhin
7e12c879c2 core: extend traits::Type / traits::Depth for compatible types
DMatch and Keypoint are not compatible types (mixed float/int fields)
2017-08-31 19:35:48 +03:00
Alexander Alekhin
72f789bf34 core: fix type traits 2017-08-31 15:05:46 +03:00
Boris Fomitchev
dde04d5d3e Addressing CUDA9 shfl deprecation 2017-08-29 13:27:21 -07:00
Maarten de Vries
3571e8f263 Restrict std::initializer_list constructors to arithmetic types. 2017-08-29 16:37:20 +02:00
Alexander Alekhin
034aaa7a70 Merge pull request #9465 from tomoaki0705:fixJetsonTK1Build 2017-08-29 11:46:10 +00:00
Tomoaki Teshima
6531fd142c fix build error on Jetson TK1
* guard correctly in header file
  * guard correctly in cmake file
2017-08-29 19:05:13 +09:00
Vadim Pisarevsky
518c6ae8c6 Merge pull request #9327 from sovrasov:fs_free_on_error_fix 2017-08-28 20:25:34 +00:00
KUANG Fangjun
11fa0094ff Improve the documentation.
Add demo code for cv::reduce, cv::merge and cv::split.
2017-08-28 12:36:23 +02:00
Zoltán Mizsei
6258ff36bc Haiku build fix 2017-08-26 11:37:59 +02:00
Alexander Alekhin
603fa03ac6 Merge pull request #9441 from wzw-intel:delete_program 2017-08-25 12:03:27 +00:00
Wu Zhiwen
da3da84a20 ocl: Add a function to unload a run-time cached program
This function is the counterpart of "Context::getProg".
With this function, users have chance to unload a program
from global run-time cached programs, and save resource.
2017-08-25 08:42:11 +08:00
Alexander Alekhin
b18983a005 test(hal): properly dispatch FP16 test 2017-08-24 20:54:17 +00:00
Alexander Alekhin
9c14a2f0aa Merge pull request #9395 from lupustr3:pvlasov/icv2017u3_update 2017-08-24 11:48:53 +00:00
Boris Fomitchev
c48807c383 Merge pull request #9418 from borisfom:cuda9
CUDA9 build fixed, added detection (#9418)

* CUDA9 build fixed, added detection

* Replacing deprecated __shfl_xxx with __shfl_sync, fixing bogus CUDA9 warnings
2017-08-24 07:11:44 +00:00
Alexander Alekhin
d0509f6702 Merge pull request #9449 from ribalda:ocv 2017-08-23 19:40:36 +00:00
Ricardo Ribalda Delgado
6fc5697950 ocl: Fix OpenCL library detection in Linux
OpenCL runtime does not require OpenCL development file (libOpenCL.so),
just the "run" library (so.1).

This patch searches for the run library (so.1) if the dev library (.so)
is not found.

Web search shows that this error has been present since at least 2015
http://answers.opencv.org/question/80532/haveopencl-return-false/

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
2017-08-23 16:38:06 +02:00
Alexander Alekhin
a893b147dc Merge pull request #9428 from csukuangfj:fix-commandline-parser 2017-08-23 12:48:28 +00:00
Pavel Vlasov
a57718e1ac ICV2017u3 package update;
- Optimizations set change. Now IPP integrations will provide code for SSE42, AVX2 and AVX512 (SKX) CPUs only. For HW below SSE42 IPP code is disabled.
- Performance regressions fixes for IPP code paths;
- cv::boxFilter integration improvement;
- cv::filter2D integration improvement;
2017-08-23 14:24:43 +03:00
KUANG Fangjun
97ec91ad67 fix cv::CommandLineParser.
It should handle bool value not only of "true" but also of "TRUE" and "True".
2017-08-23 11:38:58 +02:00
Boris Fomitchev
76f7fb5231 Extending CPU dispatch to the tests; fixing a typo 2017-08-21 20:58:12 -07:00
KUANG Fangjun
336996152a Improve the documentation. 2017-08-20 17:21:39 +02:00
Alexander Alekhin
b6949c5088 cmake: CMP0022 NEW 2017-08-19 15:15:05 +00:00
Alexander Alekhin
71e1889825 core: fix memcpy with zero size 2017-08-17 18:30:31 +03:00
Rostislav Vasilikhin
66b0651607 Merge pull request #9329 from savuor:softfloat_sincos
SoftFloat: added sin, cos and docs (#9329)

* softfloat: comparison operators made inline, min() max() eps() isSubnormal() added

* softfloat: get/set sign/exp

* softfloat: get/set frac

* softfloat: tests rewritten with new tools

* softfloat: added pi(), sin(), cos()

* softfloat: more comments

* softfloat: updated sincos arg reduction

* softfloat: initial tests for sincos added

* softfloat: test works, code cleanup is pending

* softfloat: sincos argreduce rewritten

* softfloat: sincos refactored and simplified

* softfloat sincos: epsilons calibrated

* softfloat: junk code removed from tests

* softfloat: docs added

* inline comparisons undone; warning fixed
2017-08-15 09:23:26 +00:00
Alexander Alekhin
803274e207 Merge pull request #9358 from azatsman:master 2017-08-15 09:16:45 +00:00
Alexander Alekhin
a048cb9f0d Merge pull request #9338 from dkurt:fix_ocl 2017-08-14 12:56:07 +00:00
Alexander Alekhin
ca9a88785e core(build): fix compilation of parallel.cpp (OpenMP configuration) 2017-08-14 11:42:49 +03:00
Alex Zatsman
e2bfd1a036 Changed NORM_RELATIVE_INF, NORM_RELATIVE_L1 and NORM_RELATIVE_L2 to
NORM_RELATIVE | NORM_INF, NORM_RELATIVE | NORM_L1 and NORM_RELATIVE | NORM_L2
respectively in the documentation for cv::norm and cv::NormTypes
2017-08-13 11:55:35 -04:00
Alexander Alekhin
ef2b73043d Merge pull request #9342 from alalek:fix_parallel_for 2017-08-10 20:22:44 +00:00
Alexander Alekhin
fa288af58b Merge pull request #9343 from PhilLab:patch-4 2017-08-10 10:25:36 +00:00
Philipp Hasper
2c7a15b195 Clarified documentation cv::RotatedRect::points 2017-08-10 11:06:40 +02:00
Alexander Alekhin
0ebabe17df core: fix flag processing for nested regions in cv::parallel_for_() 2017-08-10 08:37:47 +00:00
Dmitry Kurtaev
41519d3ac0 Fixed some OpenCL interface bugs 2017-08-09 11:54:55 +03:00
Vladislav Sovrasov
9a10bdbae5 core: use new assert in matmul.cpp 2017-08-08 23:00:11 +03:00
KUANG, Fangjun
4bbe67451d fix some typos in the documentation. 2017-08-08 17:32:04 +02:00
Vladislav Sovrasov
5e68b28ad3 core: fix file not closed when exception in FS 2017-08-07 21:03:59 +03:00
Vladislav Sovrasov
aa54acd54d core: add a test to reproduce #9312 2017-08-07 16:16:14 +03:00
Alexander Alekhin
87c27a074d Merge tag '3.3.0'
OpenCV 3.3.0
2017-08-04 00:00:18 +00:00
Alexander Alekhin
4af3ca4e4d OpenCV version++
OpenCV 3.3.0
2017-08-03 23:58:23 +00:00
Alexander Alekhin
922ac1a1ec Merge pull request #9303 from alalek:akaze_update 2017-08-03 17:17:03 +00:00
Alexander Alekhin
c95a97389d Merge pull request #9235 from sturkmen72:patch-3 2017-08-03 17:04:28 +00:00
Alexander Alekhin
9ca39821c8 core: divUp function 2017-08-03 19:51:45 +03:00
Alexander Alekhin
dcc63d7408 Merge pull request #9248 from alalek:alloc_refactoring 2017-08-03 16:25:29 +00:00
Vladislav Sovrasov
5375a77f84 core: add multi-argument CV_Assert 2017-08-03 15:31:05 +03:00
Alexander Alekhin
321c0ec533 core: empty() for Rect/Size templates
Check for empty objects via .area() is not a good practice due overflows
2017-08-01 17:19:18 +03:00
Alexander Alekhin
37a7e08b38 Merge pull request #9097 from piotr-semenov:fix/cv_rect_monoid_identity 2017-08-01 13:06:37 +00:00
Alexander Alekhin
16fb74425e ocl: fix program cache key 2017-07-31 17:24:08 +03:00
Alexander Alekhin
d22506092e Merge pull request #9274 from alalek:ipp_meanstddev 2017-07-31 12:02:59 +00:00
Alexander Alekhin
728bd68977 Merge pull request #9272 from tomoaki0705:fixCudaBuild 2017-07-31 12:02:40 +00:00
Alexander Alekhin
e58a778bd5 core(stat): disable IPP optimization in meanStdDev (cn > 1) 2017-07-31 14:09:18 +03:00
Tomoaki Teshima
1c49796e8e guad for CUDA correctly 2017-07-31 18:42:36 +09:00
Alexander Alekhin
fffd0f5b68 Merge pull request #9241 from alalek:tlsSlotsSize 2017-07-30 09:53:39 +00:00
Suleyman TURKMEN
89480801b8 some improvements on tutorials 2017-07-29 20:08:19 +03:00
Alexander Alekhin
b46e741c95 core(alloc): drop unused code, use memalign() functions instead of hacks
valgrind provides better detection without memory buffer hacks
2017-07-27 18:10:41 +03:00
Alexander Alekhin
34f9c039c5 Merge pull request #9238 from alalek:valgrind_fixes 2017-07-27 14:33:01 +00:00
Alexander Alekhin
d35422b523 core(tls): hide assertions from Thread Sanitizer 2017-07-27 17:31:51 +03:00
Alexander Alekhin
68ef903a7c core(tls): don't use tlsSlots without synchronization 2017-07-26 22:45:55 +03:00
Alexander Alekhin
bf0173bf38 ts: update valgrind suppressions 2017-07-26 17:21:45 +03:00
Alexander Alekhin
b4e300b78b Merge pull request #9236 from dkurt:fix_json_bool 2017-07-26 13:08:13 +00:00
Alexander Alekhin
402a77e7f7 Merge pull request #9237 from alalek:fix_winrt_build 2017-07-26 10:42:49 +00:00
dkurt
583b327523 Fix JSON booleans without quotes 2017-07-26 12:51:06 +03:00
Alexander Alekhin
c512bf6c66 Merge pull request #9232 from dkurt:json_named_nodes 2017-07-25 15:56:03 +00:00
dkurt
3515f6ec33 Missed NAMED bit of JSON nodes tag 2017-07-25 13:39:32 +03:00
Alexander Alekhin
602f047fe8 build: replace WIN32 => _WIN32 2017-07-25 13:30:48 +03:00
Alexander Alekhin
7f3eea6325 core: fix Mat/UMat cleanup on exceptions in deallocate() 2017-07-25 12:27:30 +03:00
Alexander Alekhin
bc3c7e80a6 Merge pull request #9209 from alalek:fix_persistence_format 2017-07-21 10:55:40 +00:00
Alexander Alekhin
544eb4be1f IPP: update minMaxIdx, disable some AVX optimizations with mask 2017-07-21 12:56:36 +03:00
Alexander Alekhin
d9e092325b test: regression test for IPP minMaxIdx problem 2017-07-21 12:55:07 +03:00
Alexander Alekhin
ec7ce81401 core: fix FileStorage format detection in case of .gz archives 2017-07-20 19:58:36 +03:00
Alexander Alekhin
5bc291937f test: FileStorage format regression test 2017-07-20 19:58:10 +03:00
Alexander Alekhin
ce6b06efb9 Merge pull request #9203 from tomoaki0705:eliminateRandFromTest 2017-07-20 15:31:41 +00:00
Tomoaki Teshima
71496e3be4 fix build error on Visual Studio 2012 2017-07-20 22:56:05 +09:00
Tomoaki Teshima
e63d628677 remove some rand functions
* make test more reproducible
2017-07-20 22:43:11 +09:00
Alexander Alekhin
ca479c3f5b Merge pull request #9161 from alalek:separate_debug_symbols 2017-07-19 15:34:43 +00:00
Alexander Alekhin
e5ed9cc612 Merge pull request #8498 from savuor:bit_exact_lab 2017-07-17 14:01:05 +00:00
Alexander Alekhin
1fbf914348 Merge pull request #9176 from alalek:fix_nightly_builds 2017-07-17 13:37:46 +00:00
Alexander Alekhin
b4716b1d92 core: fix convertTo() AVX2 optimization 2017-07-17 15:02:14 +03:00
Alexander Alekhin
acc8589083 core: clarify documentation of cv::Mat::deallocate() method 2017-07-17 13:31:47 +03:00
Rostislav Vasilikhin
4b75be801e initial version of Lab2RGB_f tetrahedral interpolation written
RGB2Lab_f added, bugs fixed, moved to float

several bugs fixed

LUT fixed, no switch in tetraInterpolate()

temporary code; to be removed and rewritten

before refactoring

extra interpolations removed, some things to do left

added Lab2RGB_b +XYZ version, etc.

basic version is done, to be sped up

tetra refactored

interpolations: LUT for weights, refactor., etc.

address arithm optimized

initial version of vectorized code added (not compiling now)

compilation fixed, now segfaults

a lot of fixes, vectorization temp. disabled

fixed trilinear shift size, max error dropped from 19 to 10

fixed several bugs (255 vs 256, signed vs unsigned, bIdx)

minor changes

packed: address arithmetics fixed

shorter code

experiments with pure integer calculations

Lab2RGB max error decreased to 2; need to clean the code

ready for vectorization; need cleaning

vectorized, to be debugged

precision fixed, max error is 2

Lab->XYZ shortened

minor fixes

Lab2RGB_f version fixed, to be completely rewritten using _b code

RGB2Lab_f vectorized

minors

moved to separate file

refactored Lab2RGB to float and int versions

minor fix

Lab2RGB_f vectorized

minor refactoring

Lab2RGBint refactored: process methods, vectorize by 4 pix

Lab2RGB_f int version is done

cleanup extra code

code copied to color.cpp

fixed blue idx bug

optimizations enabled when testing; mulFracConst introduced

divConst -> mulFracConst

calc min time in perf instead of avg

minors

process() slightly sped up

Lab2RGB_f: disabled int version

reinterpret added, minor fixes in names

some warnings fixed

changes transferred to color.cpp

RGB2Lab_f code (and trilinear interpolation code) moved to rgb2lab_faster

whitespace

shift negative fixed

more warnings fixed

"constant condition" warnings fixed, little speed up

minor changes

test_photo decolor fixed

changes copied to test_lab.cpp

idx bounds checking in LUT init

several fixes

WIP: softfloat almost integrated

test_lab partially rewritten to SoftFloat

color.cpp rewritten to SoftFloat

test_lab.cpp: accuracy code added

several fixes

RGB2Lab_b testing fixed

splineBuild() rewritten to SoftFloat

accuracy control improved

rounding fixed

Luv <=> RGB: rewritten to SoftFloat

OCL cvtColor Lab and Lut rewritten to SoftFloat

minor fixes

refactored to new SoftFloat interface

round() -> cvRound, etc.

fixed OCL tests

softfloat.cpp: internal functions made static, unused ones removed

meaningful constants

extra lines removed

unused function removed

unfinished work

it works, need to fix TODOs

refactoring; more calls rewritten

mulFracConst removed

constants made bit exact; minors

changes moved to color.cpp

fixed 1 bug and 4 warnings

OCL: fixed constants

pow(x, _1_3f) replaced by cubeRoot(x)

fixed compilation on MSVC32

magic constants explained

file with internal accuracy&speed tests moved to lab_tetra branch
2017-07-17 00:32:30 +03:00
Alexander Alekhin
5a54acef4e Merge pull request #9130 from alalek:android_define 2017-07-14 17:17:24 +00:00
Vladislav Sovrasov
e5fbb4f5d2 Merge pull request #9034 from sovrasov:mats_from_initializer_list
Add constructors taking initializer_list for some of OpenCV data types (#9034)

* Add a constructor taking initializer_list for Matx

* Add a constructor taking initializer list for Mat and Mat_

* Add one more method to initialize Mat to the corresponding tutorial

* Add a note how to initialize Matx

* CV_CXX_11->CV_CXX11
2017-07-14 17:17:09 +00:00
Alexander Alekhin
11626fe32c Merge pull request #8975 from sovrasov:fs_additional_errors 2017-07-14 17:13:50 +00:00
Alexander Alekhin
4e39d0371d Merge pull request #9074 from alalek:cpu_dispatch_core_hamming
cpu dispatch(core): hamming
2017-07-14 16:48:07 +00:00
Alexander Alekhin
eef78f5664 Merge pull request #9061 from terfendail:convert_avx
AVX and SSE4.1 optimized conversion migrated
2017-07-14 16:43:54 +00:00
Alexander Alekhin
928bfe0b93 Merge pull request #9088 from sovrasov:no_nostl
core: get rid of OPENCV_NOSTL definition
2017-07-14 16:26:03 +00:00
Alexander Alekhin
454bc7a674 Merge pull request #9063 from alalek:hamming_perf_test 2017-07-14 14:46:17 +00:00
Alexander Alekhin
e251ed7773 Merge pull request #9122 from ivsgroup:fix_msvc_virtual_destructor 2017-07-14 14:37:22 +00:00
Alexander Alekhin
10e6491c22 Merge pull request #9024 from tomoaki0705:featureDispatchAccumulate 2017-07-14 14:30:06 +00:00
Alexander Alekhin
f448d75aa8 build: added DEBUG build guard
To prevent linkage of binary incompatible DEBUG/RELEASE binaries/runtimes
2017-07-14 01:25:31 +03:00
Alexander Alekhin
9b9e685dbc Merge pull request #9142 from alalek:vzeroupper_guard_unused_warning 2017-07-12 16:44:00 +00:00
Alexander Alekhin
49bb0bf9c8 Merge pull request #9149 from alalek:ocl_fp16_test 2017-07-12 16:23:33 +00:00
Alexander Alekhin
d6c5e18e24 core(test): fix input data for OCL FP16 test 2017-07-12 18:51:11 +03:00
Alexander Alekhin
5ebfb52a4a ipp(minmaxIdx): disable SSE4.2 optimizations for 32f datatype
NaN values handling issue
2017-07-12 16:06:18 +03:00
PkLab.net
6dd9e18b2e add std::string overload for cv::read() 2017-07-12 15:51:11 +03:00
Vladislav Sovrasov
5b833db558 core: forbid conversion real->int in some cases in FileStorage 2017-07-12 15:50:57 +03:00
Alexander Alekhin
e7cc2eea1d build: fix unused variable warning for vzeroupper guard 2017-07-11 16:46:35 +03:00
Maksim Shabunin
02db592014 Fixed several issues found by static analysis (Windows specific) 2017-07-10 23:14:02 +03:00
Alexander Alekhin
a4a47b538c build: detect Android via '__ANDROID__' macro
https://sourceforge.net/p/predef/wiki/OperatingSystems
2017-07-10 12:43:59 +03:00
Pascal Thomet
309c962169 core/bufferpool.hpp: let msvc accept a non virtual protected destructor
BufferPoolController has a non virtual protected destructor (which is legitimate)

However, Visual Studio sees this as a bug, if you enable more warnings, like below
```
add_compile_options(/W3)     # level 3 warnings
add_compile_options(/we4265) # warning about missing virtual destructors
```

This is a proposition in order to silence this warning.

See https://github.com/ivsgroup/boost_warnings_minimal_demo for a demo of the same problem
with boost/exception.hpp
2017-07-08 16:15:26 +02:00
Alexander Alekhin
da8dbf6cf5 ocl: async cl_buffer cleanup queue (for event callback) 2017-07-07 13:41:20 +03:00
Tomoaki Teshima
e7d5dbfec0 dispatch accumulate series
- use universal intrinsic for base
 - dispatch for float/double version using AVX
 - AVX2 optimization not done yet
2017-07-07 18:45:30 +09:00
Alexander Alekhin
daee982106 ocl: rework events handling with clSetEventCallback 2017-07-06 13:25:32 +03:00
Piotr Semenov
c5b5d5c8d3 Fix. Now cv::Rect() is the identity under cv::Rect::operator| operation 2017-07-05 19:01:13 +03:00
Vitaly Tuzov
5448d9186a AVX and SSE4.1 optimized conversion implementations migrated to separate files 2017-07-04 14:48:01 +03:00
Vladislav Sovrasov
2a2a1dc5b4 Get rid of OPENCV_NOSTL definition 2017-07-04 14:17:02 +03:00
Alexander Alekhin
7b8e6307f8 Merge pull request #9080 from alalek:version_3.3.0-rc
version 3.3.0-rc
2017-07-03 16:21:45 +00:00
Tony Lian
c8783f3e23 Merge pull request #9075 from TonyLianLong:master
Remove unnecessary Non-ASCII characters from source code (#9075)

* Remove unnecessary Non-ASCII characters from source code

Remove unnecessary Non-ASCII characters and replace them with ASCII
characters

* Remove dashes in the @param statement

Remove dashes and place single space in the @param statement to keep
coding style

* misc: more fixes for non-ASCII symbols

* misc: fix non-ASCII symbol in CMake file
2017-07-03 16:14:17 +00:00
Alexander Alekhin
8aa3011f2d Merge pull request #9064 from sadika9:patch-1 2017-07-03 16:07:53 +00:00
Alexander Alekhin
1b8d363231 version 3.3.0-rc 2017-07-03 16:47:05 +03:00
Alexander Alekhin
108188e42f Merge pull request #9032 from sovrasov:mat_doc_update 2017-07-03 12:46:42 +00:00
Vladislav Sovrasov
f42b7d03b4 core: add a test of iteration through the Mat_ with range-based for 2017-07-03 12:49:17 +03:00
Vladislav Sovrasov
267fdc4c91 Add a note about cxx11 range-based loop in Mat_ documentation 2017-07-03 12:49:11 +03:00
Alexander Alekhin
b3f5e3bf94 core(stat): optimize size of binaries, drop AVX dispatch (no imrovements) 2017-07-02 22:45:10 +00:00
Alexander Alekhin
b66c349bba core(stat): add required CV_AVX_GUARD
Added guard with 'vzeroupper' instruction
2017-07-02 22:45:10 +00:00
Alexander Alekhin
c45d3568ae core(stat): register dispatched code, fix build 2017-07-02 22:45:10 +00:00
Alexander Alekhin
6a6222d21c core(stat): remove useless checks 2017-07-02 22:45:10 +00:00
Alexander Alekhin
880052d3f3 core(stat): create dispatch.cpp file 2017-07-02 22:45:10 +00:00
Alexander Alekhin
85afbd409b core(stat): move implementations into .hpp file w/o changes 2017-07-02 22:45:09 +00:00
Alexander Alekhin
03c3e0edcf core(stat): stat.cpp minor refactoring
- remove unused code
- added: #if CV_ENABLE_UNROLLED in Hamming's functions
2017-07-02 22:45:09 +00:00
Maksim Shabunin
1f23202ad8 Issues found by static analysis (5th round) 2017-07-01 18:56:24 +03:00
Sadika Sumanapala
40e1f2fc03 Fix style 2017-07-01 06:59:27 +05:30
Alexander Alekhin
582bb3c311 core(perf): added Hamming tests 2017-07-01 00:49:18 +00:00
Maksim Shabunin
e0393f8557 Fixed some issues found by static analysis (4th round) 2017-06-30 12:26:53 +03:00
Vadim Pisarevsky
2ac819018d Merge pull request #9014 from sovrasov:compare_scalars_fix 2017-06-29 11:14:44 +00:00
Vadim Pisarevsky
5f1b6ee889 Merge pull request #9017 from sovrasov:parallel_for_cxx11 2017-06-29 11:12:57 +00:00
Maksim Shabunin
ca9622145e Merge pull request #9026 from alalek:remove_danger_define 2017-06-29 07:28:38 +00:00
Alexander Alekhin
324851882a Merge pull request #9025 from mshabunin:fix-static-3 2017-06-28 20:50:21 +00:00
Alexander Alekhin
b9a2d7b600 build: remove #define to prevent unexpected impact on user applications 2017-06-28 18:50:55 +03:00
Maksim Shabunin
a769d69a9d Fixed several issues found by static analysis 2017-06-28 18:06:18 +03:00
Vladislav Sovrasov
08db55fb62 core: add CV_CXX_11 flag to cvdef.h 2017-06-28 16:17:53 +03:00
Vladislav Sovrasov
3c748ccf10 core: add an ability to use cxx11 lambda as a parallel_for_ body 2017-06-28 16:16:05 +03:00
Vladislav Sovrasov
35a1ecef2a core: fix infinite recursion in compare 2017-06-28 15:00:52 +03:00
Alexander Alekhin
dcf3d988d5 Merge pull request #8543 from csukuangfj:fix-String 2017-06-28 11:20:29 +00:00
Vadim Pisarevsky
8b3d6603d5 another round of dnn optimization (#9011)
* another round of dnn optimization:
* increased malloc alignment across OpenCV from 16 to 64 bytes to make it AVX2 and even AVX-512 friendly
* improved SIMD optimization of pooling layer, optimized average pooling
* cleaned up convolution layer implementation
* made activation layer "attacheable" to all other layers, including fully connected and addition layer.
* fixed bug in the fusion algorithm: "LayerData::consumers" should not be cleared, because it desctibes the topology.
* greatly optimized permutation layer, which improved SSD performance
* parallelized element-wise binary/ternary/... ops (sum, prod, max)

* also, added missing copyrights to many of the layer implementation files

* temporarily disabled (again) the check for intermediate blobs consistency; fixed warnings from various builders
2017-06-28 11:15:22 +03:00
Alexander Alekhin
82ec76c123 Merge pull request #8990 from mshabunin:fix-static-2 2017-06-27 14:53:26 +00:00
Alexander Alekhin
f8a75c4361 dispatch: added CV_TRY_${OPT} macro, fix dnn build
- 1: OPT is available directly or via dispatcher
- 0: optimization is not compiled at all
2017-06-27 17:05:15 +03:00
Maksim Shabunin
32d4af36e2 Fixing some static analysis issues 2017-06-27 14:30:26 +03:00
Alexander Alekhin
650830b9d6 build: eliminate warning 2017-06-27 08:16:40 +03:00
Vadim Pisarevsky
ef2e5a9f82 Merge pull request #8988 from sovrasov:repeat_src_eq_dst_fix 2017-06-26 21:58:26 +00:00
Rostislav Vasilikhin
e63feba8e2 fixed typo 2017-06-26 20:19:18 +03:00
Alexander Alekhin
006966e629 trace: initial support for code trace 2017-06-26 17:07:13 +03:00
Vladislav Sovrasov
4f9871817a core: forbid handling of the case when src=dst in cv::repeat 2017-06-26 14:02:52 +03:00
James Clarke
25020f2672 fast_math.hpp: Use __asm__ rather than asm; fixes including with -std=c99 2017-06-23 15:28:09 +01:00
Vadim Pisarevsky
fa7e7e0ff9 Merge pull request #8900 from alalek:update_android_build 2017-06-23 10:58:53 +00:00
Dmitry Kurtaev
16368a275b cmake: add Halide support (#8794) 2017-06-21 14:33:47 +03:00
Alexander Alekhin
3e3e2dd512 android: make optional "cpufeatures", build fixes for NDK r15 2017-06-21 13:34:19 +03:00
Alexander Alekhin
d3ebe665e0 core: fix IPP optimization for sortIdx 2017-06-21 03:04:16 +00:00
Alexander Alekhin
9067310166 core(test): added cv::sortIdx accuracy tests 2017-06-21 03:04:16 +00:00
Maksim Shabunin
68d01972fe Merge pull request #8883 from abratchik:DNN.java.wrappers.fix 2017-06-20 09:05:53 +00:00
abratchik
037d8fbdcd Refactor OpenCV Java Wrapping 2017-06-15 20:35:12 +04:00
Rostislav Vasilikhin
939c8e8a99 float constant replaced by int hex representations 2017-06-15 15:10:41 +03:00
Rostislav Vasilikhin
29593635ed licence updated 2017-06-14 21:20:10 +03:00
Alexander Alekhin
cf86f88c71 Merge pull request #8911 from alalek:fix_vsum4 2017-06-14 12:00:58 +00:00
Alexander Alekhin
e23b59da5c build: fix v_reduce_sum4 (requires SSE3) 2017-06-14 09:37:06 +00:00
Alexander Alekhin
9fa90c8851 Merge pull request #8899 from tomoaki0705:fixSuppressWarningsUnreachable 2017-06-14 01:07:47 +00:00
Vadim Pisarevsky
fbafc700ea added v_reduce_sum4() universal intrinsic; corrected number of threads in cv::getNumThreads() in the case of GCD 2017-06-13 18:04:00 +03:00
Tomoaki Teshima
94848a3e1f suppress unreachable code warning
- fix the define condition based on the comment
2017-06-13 08:11:04 +09:00
Alexander Alekhin
a3189e36c0 Merge pull request #8753 from RyuheiMori:fix-cpu-feature-detection-on-android 2017-06-12 16:08:08 +00:00
Alexander Alekhin
3dee87b697 update CPU detection on ANDROID patch 2017-06-11 05:06:49 +00:00
Alexander Alekhin
0213b508dc Merge pull request #8868 from alalek:fix_build_softfloat 2017-06-08 20:22:53 +00:00
Alexander Alekhin
e3c0d11b55 Merge pull request #8876 from alalek:fix_build_msvs 2017-06-08 19:53:29 +00:00
Maksim Shabunin
f71ea4dfe9 Merge pull request #8816 from mshabunin:sprintf-fix
Fixed snprintf for VS 2013 (#8816)

* Fixed snprintf for VS 2013

* snprintf: removed declaration from header, changed implementation

* cv_snprintf corrected according to comments

* update snprintf patch
2017-06-08 21:53:16 +02:00
Alexander Alekhin
5c0a287ce8 build: fix warning
C4189: 'clImageUV' : local variable is initialized but not referenced
2017-06-08 20:40:36 +03:00
Alexander Alekhin
781515c514 build: fix "ambiguous call" (MSVS2010) 2017-06-08 20:40:35 +03:00
Alexander Alekhin
71517a910a build: fix errors for MSVS2010-2013, reduce default softfloat scope 2017-06-08 01:09:21 +00:00
Alexander Alekhin
125abe2fe4 Merge pull request #8838 from tomoaki0705:dispatchFp16 2017-06-06 15:31:42 +00:00
Tomoaki Teshima
e269ef96cb update convertFp16 using CV_CPU_CALL_FP16
* avoid link error (move the implementation of software version to header)
 * make getConvertFuncFp16 local (move from precomp.hpp to convert.hpp)
 * fix error on 32bit x86
2017-06-06 22:26:51 +09:00
Rostislav Vasilikhin
c6a3a18894 SoftFloat integrated (#8668)
* everything is put into softfloat.cpp and softfloat.hpp

* WIP: try to integrate softfloat into OpenCV

* extra functions removed

* softfloat made stateless

* CV_EXPORTS added

* operators fixed

* exp added, log: WIP

* log32 fixed

* shorter names; a lot of TODOs

* log64 rewritten

* cbrt32 added

* minors, refactoring

* "inline" -> "CV_INLINE"

* cast to bool warnings fixed

* several warnings fixed

* fixed warning about unsigned unary minus

* fixed warnings on type cast

* inline -> CV_INLINE

* special cases processing added (NaNs, Infs, etc.)

* constants for NaN and Inf added

* more macros and helper functions added

* added (or fixed) tests for pow32, pow64, cbrt32

* exp-like functions fixed

* minor changes

* fixed random number generation for tests

* tests for exp32 and exp64: values are compared to SoftFloat-based naive implementation

* minor warning fix

* pow(f, i) 32/64: special cases handling added

* unused functions removed

* refactoring is in progress (not compiling)

* CV_inline added

* unions {uint_t, float_t} removed

* tests compilation fixed

* static const members -> static methods returning const

* reinterpret_cast

* warning fixed

* const-ness fixed

* all FP calculations (even compile-time) are done in SoftFloat + minor fixes

* pow(f, i) removed from interface (can cause incorrect cast) to internals of pow(f, f), tests fixed

* CV_INLINE -> inline

* internal constants moved to .cpp file

* toInt_minMag() methods merged into toInt() methods

* macros moved to .cpp file

* refactoring: types renamed to softfloat and softdouble; explicit constructors, etc.

* toFloat(), toDouble() -> operator float(), operator double()

* removed f32/f64 prefixes from functions names

* toType() methods removed, round() and trunc() functions added

* minor change

* minors

* MSVC: warnings fixed

* added int cvRound(), cvFloor, cvCeil, cvTrunc, saturate_cast<T>()

* typo fixed

* type cast fixed
2017-05-29 17:07:25 +03:00
Alexander Alekhin
d54b1ad88a Merge pull request #8805 from catree:solvePnP_doc 2017-05-29 13:52:15 +00:00
Alexander Alekhin
36918b3bb8 Merge pull request #8814 from woodychow:openmp_num_threads 2017-05-29 13:17:41 +00:00
catree
542cdb2c39 Improve solvePnP doc, add assert >= 4 in solvePnP, escape underscore character for Scalar_ documentation.
Add reference to SOLVEPNP_ITERATIVE in the doc.
2017-05-29 14:59:14 +02:00
Woody Chow
6e00c7651b Use num_threads clause of #pragma omp parallel instead to avoid calling omp_set_num_threads for the entire application 2017-05-29 14:16:10 +09:00
Vadim Pisarevsky
ee257ffe9e Merge pull request #8455 from terfendail:ovxhal_skipsmall 2017-05-26 12:10:18 +00:00
Vitaly Tuzov
1d62a025b3 Moved size restrictions for OpenVX processed images to corresponding cpp files 2017-05-25 19:25:17 +03:00
mschoeneck
4a4d94f266 Merge pull request #8694 from mschoeneck:Canny
Parallelize Canny with custom gradient (#8694)

* New Canny implementation. Restructuring code in parallelCanny class. Align mag buffer and map.

* Fix warnings.

* Missing SIMD check added.

* Replaced local trailingZeros in contours.cpp. Use alignSize in canny.cpp

* Fix warnings in alignSize and allocate just minimum extra columns.

* Fix another warning in map.create.

* Exchange for loop by do loop to avoid double check at the beginning.
Define extra SIMD CANNY_CHECK to avoid unnecessary continue.
2017-05-24 16:20:25 +03:00
Matthias Grundmann
cf4e9e5ce2 Update matrix.cpp
Fix race condition in getDefaultAllocator and setDefaultAllocator interaction / not threadsafe currently
2017-05-24 13:55:18 +03:00
krishraghuram
9ea2f5211e Correct the existing documented T-API functions to match the doxygen format (#8758)
* Correct the existing documented T-API functions to match the doxygen format.

* docs: fix comments style

* T-API documentation: minor formatting changes
2017-05-24 13:31:35 +03:00
Vadim Pisarevsky
7c3577f7ae Merge pull request #8779 from vpisarev:empty_cmp_fix 2017-05-23 19:06:57 +00:00
Alexander Alekhin
15a2c7724d Merge pull request #8743 from tomoaki0705:featureConvertFp16UMat 2017-05-23 15:32:12 +00:00
Vadim Pisarevsky
4eda8efd42 resolves https://github.com/opencv/opencv/issues/7792 2017-05-23 18:16:40 +03:00
Vadim Pisarevsky
a065e4b9aa Merge pull request #8769 from mshabunin:kw-fixes 2017-05-23 14:59:36 +00:00
Alexander Alekhin
0448260ed7 Merge pull request #8542 from jveitchmichaelis:update-cudadevo-doc
Update documentation for getCudaEnabledDeviceCount
2017-05-23 17:07:20 +03:00
Alexander Alekhin
715b88c4cb Merge pull request #8775 from mshabunin:ipp-count-fix 2017-05-23 13:29:16 +00:00
Tomoaki Teshima
d81cdb8e1c add OpenCL version of convertFp16 and test
* disable vector operation for now
 * brush up the implementation based on comment
2017-05-23 20:00:21 +09:00
Maksim Shabunin
f23b6ba652 Fixed multidimensional count non-zero IPP implementation 2017-05-23 13:23:59 +03:00
Maksim Shabunin
b04ed5956e Fixed several issues found by static analysis in core module 2017-05-23 12:35:31 +03:00
Alexander Alekhin
c5e9d1adae macro for static analysis tools 2017-05-23 12:35:31 +03:00
Vladislav Sovrasov
2c2b1405a3 Add test for Mat_::release() 2017-05-23 12:20:48 +03:00
cDc
003745432f fix Mat_ release #8680 2017-05-23 12:19:57 +03:00
Vadim Pisarevsky
17b89b2a35 Merge pull request #8770 from alalek:fix_pthreads_default 2017-05-22 22:18:26 +00:00
Alexander Alekhin
16ea72e6b9 build: fix snprintf() usage 2017-05-22 22:24:17 +03:00
Alexander Alekhin
900c406541 core: fix threads count in pthreads 2017-05-22 21:45:25 +03:00
Ryuhei Mori
bb3a416320 Fix cpu features detection on android 2017-05-19 21:19:13 +08:00
Alexander Alekhin
17eef4d8a9 Merge pull request #8596 from nnorwitz:nnorwitz 2017-05-12 19:48:28 +00:00
Philipp Hasper
dcd8589b67 Fixed exp32f() compilation on MSVC 2017-05-10 18:25:39 +02:00
Vadim Pisarevsky
b683e68223 Merge pull request #8398 from woodychow:normL2Sqr_avx2 2017-05-03 14:49:56 +00:00
nnorwitz
256b6bb3db Don't blow out the stack. Use a smaller buffer and prevent buffer overruns with snprintf. 2017-05-03 16:56:09 +03:00
Vadim Pisarevsky
925594d1e3 Merge pull request #7894 from alalek:ocl_program 2017-05-03 13:48:58 +00:00
Vadim Pisarevsky
dd81c29834 Merge pull request #8359 from csukuangfj:patch-fix-error-code-documentation 2017-05-03 13:48:28 +00:00