Commit Graph

16179 Commits

Author SHA1 Message Date
Vladislav Sovrasov
5bf39ceb5d dnn: handle 4-channel images in blobFromImage (#9944) 2017-10-27 14:06:53 +03:00
Alexander Alekhin
9cdeb6dfbf ocl: increase SURF stitching test tolerance
OpenCL SURF implementation is unstable
2017-10-26 13:03:44 +03:00
catree
f9aa411c92 Fix double definitions, correct comment. 2017-10-25 18:11:31 +02:00
Alexander Alekhin
436a1f72a5 dnn: fix sporadic crashes in getUMat()
Incorrect "total" buffer size calculated in StdMatAllocator::allocate() due wrong step values.
2017-10-25 18:07:05 +03:00
Vladislav Sovrasov
7e3e9144de dnn: add an accuracy test for NMS 2017-10-25 13:40:56 +03:00
Vladislav Sovrasov
c704942b8a dnn: add a documentation for NMS, fix missing experimantal namespace 2017-10-25 13:35:49 +03:00
Vladislav Sovrasov
acedb4a579 dnn: make NMS function public 2017-10-25 13:35:49 +03:00
Vitaly Tuzov
2eb61a4a99 AVX2 optimized implementation of FAST corner tracking migrated to separate file 2017-10-24 20:00:48 +03:00
Vitaly Tuzov
868ad16041 Python wrappers for Vec and Matx 2017-10-23 18:50:49 +03: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
Rostislav Vasilikhin
fb5cd42c6b enabled tests for fitEllipse since the issue is fixed 2017-10-23 16:28:49 +03:00
Dmitry Kurtaev
a36ebaecdc PReLU layer for multidimensional input 2017-10-23 16:13:03 +03:00
Maksim Shabunin
bf418ba342 Merge pull request #9917 from alalek:ocl_cache_program_failures 2017-10-23 12:25:25 +00:00
Maksim Shabunin
be9767e014 Merge pull request #9919 from alalek:ocl_fix_macosx_invalid_options 2017-10-23 12:24:42 +00:00
Alexander Alekhin
9e9881aacc ts(misc): support tables exporting in markdown format
basic support only (no symbol escapes/sanitizing)
2017-10-23 14:57:45 +03: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
Suleyman TURKMEN
d1c5e79ec3 Update grfmt_gdal.cpp 2017-10-22 19:01:34 +03:00
blendin
08a5fe3661 Fix out of bounds write 2017-10-21 12:12:53 -07:00
Dmitry Kurtaev
410d44d67d Binary data for batch normalization test from Torch 2017-10-20 12:01:42 +03:00
Igor Wodiany
d7cbe6e947
Add const to getViewerPose()
getViewerPose() doesn't modify an object of the class so it can be
made const. It also makes this method consistent with other getters
in the class as they are defined as const.
2017-10-19 22:05:49 +01:00
Vitaly Tuzov
ad051cdd99 Fixed CAP_PROP_FORMAT evaluation in case CvCaptureCAM_V4L returns CV_16U image 2017-10-19 20:51:00 +03:00
Maksim Shabunin
c97c1a2454 Merge pull request #9879 from alalek:fix_build 2017-10-18 14:49:44 +00:00
Alexander Alekhin
185faf99bd ocl: simplify ocl::Timer interface 2017-10-18 16:01:21 +03:00
Dmitry Kurtaev
b903ff8992 Ceil mode from experimental version of Caffe, https://github.com/BVLC/caffe/pull/3057 2017-10-18 14:04:53 +03:00
Alexander Alekhin
3fd03964a3 fix code style 2017-10-18 13:08:01 +03:00
Vitaly Tuzov
8d5a5d5ceb AVX2 optimizations for FAST corner tracking provided by Victoria Zhislina 2017-10-17 18:53:15 +03:00
Dmitry Kurtaev
a3a446c197 Output blobs shapes initialization in case of identity permutation (NCHW->NCHW) 2017-10-17 17:15:25 +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
Alexander Alekhin
110af09bf9 Merge pull request #9853 from catree:fix_dnn_samples_python3 2017-10-16 16:18:22 +00:00
Alexander Alekhin
73af899b7c Merge pull request #9860 from mshabunin:fix-static-9 2017-10-16 14:39:08 +00:00
Wu Zhiwen
2d8f2c2aea dnn(ocl4dnn): add fusion support
ocl4dnn supports following fusion styles:
Conv + [BN] + [Scale] + [ReLU/PReLU]

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
2017-10-16 19:18:36 +08:00
Maksim Shabunin
b066dd36ff Fixed uninitialized class fields 2017-10-16 13:47:43 +03:00
Vadim Pisarevsky
1563300197 Merge pull request #9833 from tomoaki0705:universalMathFuncs 2017-10-16 10:46:56 +00:00
Vadim Pisarevsky
2914443685 Merge pull request #9848 from jet47:features2d-optional-flann-dep 2017-10-16 10:45:16 +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
catree
22dece8146 Fix DNN samples for compatibility with Python 3.
Add PyInt_Check in pyopencv_dnn.hpp.
2017-10-15 20:24:56 +02:00
dtmoodie
4566105578 fixed non c++11 warnings. 2017-10-15 12:12:00 -04:00
Igor Wodiany
e2499e5b2f
Move vector_size_t and vector_vector_Mat
These two typdefs are not compiled when BUILD_opencv_dnn is set to
false, however there are other modules that uses these typedef so
it may cause build errors. Moving typedef to the python module
ensures they are always defined.
2017-10-14 19:06:15 +01: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
James Perkins
4eb9f175a4 test_stereomatching.cpp: validate min disparity affect on valid ROI 2017-10-13 13:36:33 -07:00
Nickola
b2b56b6896 Fix Issue #9797 minEnclosingCircle from three points
and add test for only 3 pts
2017-10-13 19:26:54 +03:00
klchang
d4ef5bc16a fix the possible bug for key mapping in Linux GTK library 2017-10-13 20:05:55 +08:00
Vladislav Vinogradov
26fe8bd4f2 made flann dependency for features2d optional
it will allow to build features2d even if flann module is not available
2017-10-13 14:59:39 +03:00
Alexander Alekhin
4857cae6ed dnn: don't use "experimental_dnn_v1" namespace directly 2017-10-12 18:16:53 +03:00
Maksim Shabunin
1ba29cc95d Merge pull request #9834 from mshabunin:mediasdk-win-support 2017-10-12 12:08:54 +00:00
Alexander Alekhin
df5b2224d7 Merge pull request #9829 from pengli:ocl4dnn 2017-10-12 11:26:20 +00:00
Alexander Alekhin
b0c6bd0a5b build: resolve naming issue 2017-10-12 13:28:30 +03:00
Alexander Alekhin
4ae30ecdd9 Merge pull request #9838 from alalek:fix_ocl_world_build 2017-10-12 09:40:32 +00:00
Li Peng
937b8e4277 dnn(ocl4dnn): support log softmax in ocl4dnn
Signed-off-by: Li Peng <peng.li@intel.com>
2017-10-12 09:51:13 +08:00
Vadim Pisarevsky
e356ca2369 Merge pull request #9835 from sovrasov:blob_from_img_crop_opt 2017-10-11 17:18:40 +00:00
Vadim Pisarevsky
e955bcb872 Merge pull request #9824 from sturkmen72:upd_minEnclosingTriangle 2017-10-11 17:11:15 +00: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
Suleyman TURKMEN
29c186a022 Update min_enclosing_triangle.cpp 2017-10-11 17:48:19 +03:00
Suleyman TURKMEN
baf9e32af3 Update imgproc.hpp 2017-10-11 17:37:38 +03:00
Vadim Pisarevsky
8b168175ec Merge pull request #9636 from dkurt:duplicate_lp_norm_layer 2017-10-11 13:36:14 +00:00
Maksim Shabunin
83655ba9be MediaSDK video backend: Windows support 2017-10-11 16:33:37 +03:00
Vadim Pisarevsky
0873ebb9b0 Merge pull request #9820 from sovrasov:text_detector_dnn 2017-10-11 13:31:46 +00:00
Vadim Pisarevsky
5e82c98a9f Merge pull request #9828 from berak:fix_c++17_9572 2017-10-11 13:31:18 +00:00
Vadim Pisarevsky
babd21c764 Merge pull request #9823 from alalek:dnn_halide_bypass_tbb_threads 2017-10-11 13:28:38 +00:00
Vladislav Sovrasov
47e1133e71 dnn: add crop flag to blobFromImage 2017-10-11 15:46:20 +03:00
Vladislav Sovrasov
f7175f5050 dnn: fix additional text boxes handling after the latest adaptations for TF 2017-10-11 14:04:48 +03:00
Vladislav Sovrasov
050916fd6b dnn: modify priorBox layer 2017-10-11 11:43:50 +03:00
berak
ada753a54c fix c++17 namsespace issues 2017-10-11 09:50:22 +02:00
Geoff McIver
b2d8e8c508 This statement was keeping HAAR cascades from leveraging opencl on nvidia devices. "localSize" on the featureEvaluator remains Size(0, 0) which sets the bool "use_ocl" to false. Adding this allows NVidia GPUs to leverage opencl HAAR Cascades 2017-10-11 09:32:38 +13:00
Suleyman TURKMEN
b2673a19cf Updates min_enclosing_triangle.cpp 2017-10-10 23:23:36 +03:00
Dmitry Kurtaev
905a9dada2 Removed LPNormalize layer. 2017-10-10 20:38:55 +03:00
Alexander Alekhin
3935e13603 dnn(halide): don't compile Halide via parallel_for_()
To avoid problem with reduced stack size of inner threads.
2017-10-10 18:06:03 +03:00
Vadim Pisarevsky
af8ed9d09f Merge pull request #9816 from opalmirror:fix_stereobm_mindisp_truncation_1 2017-10-10 14:23:02 +00:00
Vadim Pisarevsky
3562a05d90 Merge pull request #8940 from 678098:nonblocking_haar_detector_parallel_for 2017-10-10 13:51:40 +00: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
b7ff9ddcdd Merge pull request #9705 from AlexeyAB:dnn_darknet_yolo_v2 2017-10-10 12:02:03 +00:00
Vadim Pisarevsky
0739f28e56 Merge pull request #9786 from LaurentBerger:Histo3d 2017-10-10 10:58:34 +00:00
Vadim Pisarevsky
046045239c Merge pull request #9750 from dkurt:feature_dnn_tf_text_graph 2017-10-10 10:06:24 +00:00
Vadim Pisarevsky
7d55c09a9f Merge pull request #9763 from seiko2plus:addVsxCore 2017-10-10 10:00:31 +00:00
Vadim Pisarevsky
0be1f4a573 Merge pull request #9811 from dkurt:prelu_with_shared_channels 2017-10-10 09:57:51 +00:00
Alexander Alekhin
bd6fb497bc OpenCV version++
OpenCV 3.3.1
2017-10-10 12:29:57 +03:00
Alexander Alekhin
949ec486c5 experimental version++ 2017-10-10 12:29:57 +03:00
James Perkins
2cfe29276e fix StereoBM disparity map right margin truncation when minDisparities > 0 2017-10-09 14:51:36 -07:00
LaurentBerger
752f232335 It's done 2017-10-09 22:25:57 +02:00
Alexander Alekhin
3ae7515955 qt: fix non-world builds 2017-10-09 22:23:05 +03:00
AlexeyAB
ecc34dc521 Added DNN Darknet Yolo v2 for object detection 2017-10-09 21:08:44 +03:00
Dmitry Kurtaev
eabf728682 PReLU layer from Caffe 2017-10-09 20:30:37 +03:00
Alexander Alekhin
3010cc5971 js: skip 'utils' headers 2017-10-09 16:14:01 +03: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
Vadim Pisarevsky
fee87ea3f7 Merge pull request #9800 from alalek:fix_build_msvs2010 2017-10-09 12:33:08 +00:00
Vadim Pisarevsky
6a80834ed4 Merge pull request #9803 from wzw-intel:ocl_timer 2017-10-09 12:11:22 +00:00
Vadim Pisarevsky
593329401a Merge pull request #9806 from mshabunin:fix-static-7 2017-10-09 12:09:55 +00:00
Maksim Shabunin
ef332dc550 Fixed and suppressed warnings produced by GCC 6.3.0 2017-10-09 13:52:07 +03:00
Alexander Alekhin
746d5f5021 Merge pull request #9790 from mevatron:patch-1 2017-10-09 10:46:50 +00:00
Maksim Shabunin
5a22d81fe5 Fixed warnings produced by static analyzer 2017-10-09 13:37:18 +03: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
e615fafe2d build: fix MSVS2010 2017-10-08 23:32:22 +03:00
Dmitry Kurtaev
e4aa39f9e5 Text TensorFlow graphs parsing. MobileNet-SSD for 90 classes. 2017-10-08 22:25:29 +03: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
mevatron
fdc4344acb Small fix for using Qt 5.x with opencv_world 2017-10-06 16:03:39 -05:00
Vadim Pisarevsky
d25ee8a273 Merge pull request #9761 from Jazmann:ellipseFitAMS&Direct 2017-10-06 14:35:42 +00:00
Vadim Pisarevsky
21bd834a59 Merge pull request #9772 from dkurt:fix_caffe_eltwise_and_fc_layers 2017-10-06 13:47:54 +00:00
Vadim Pisarevsky
b969d86415 Merge pull request #9787 from dkurt:feature_dnn_resize_nearest_neighbor 2017-10-06 13:46:50 +00:00
Vadim Pisarevsky
fe58b58937 Merge pull request #9778 from dkurt:dnn_colorization 2017-10-06 11:48:05 +00:00
Vadim Pisarevsky
87595a6b3a Merge pull request #9779 from Lightricks:feature/assetslibrary-remove-link 2017-10-06 11:45:36 +00:00
Dmitry Kurtaev
b9f94c9315 Nearest neighbor resize layer 2017-10-06 14:33:26 +03:00
Dmitry Kurtaev
e268606e26 Grayscale colorization model (https://github.com/richzhang/colorization) test. 2017-10-06 09:33:41 +03:00
Yaron Inger
0d979a741b videoio: remove AssetsLibrary dependency.
The entire AssetsLibrary framework is deprecated since iOS 8.0. The code
used in the camera example code can use UIKit to save videos to the
camera instead, which allows to avoid linking with PhotoKit instead to
prevent increasing the iOS deployment target.
2017-10-05 20:22:56 +03:00
Vadim Pisarevsky
5f6ce6f4b0 Merge pull request #9762 from dkurt:fix_tensorflow_split_layer 2017-10-05 10:51:49 +00:00
Dmitry Kurtaev
ad8bbaf008 Multidimensional eltwise layer.
Fixed fully-connected layer axis.
2017-10-04 14:01:44 +03:00
Peter J. Stieber
5669ee815b Replace private.cuda.hpp with conditional include of cuda_fp16.h. 2017-10-03 17:47:52 -07:00
Dmitry Kurtaev
2a21c10837 Fix TensorFlow split layer 2017-10-02 22:44:42 +03:00
Jasper Shemilt
800da724a3 Fix Transposed eigenvals and vecs. Didn't notice at first 2017-10-02 17:56:08 +01: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
Vadim Pisarevsky
49afb28738 Merge pull request #9744 from sturkmen72:Update_HOGDescriptor_Documentation 2017-10-02 14:50:46 +00:00
Alexander Alekhin
ab748188b1 Merge pull request #9596 from paroj:circle_board_params 2017-10-02 14:47:21 +00: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
Pavel Rojtberg
629a06d9b6 calib3d: export parameters of CALIB_CB_CLUSTERING 2017-10-02 14:27:32 +02:00
Vadim Pisarevsky
f646f61dad Merge pull request #9752 from alalek:eigenNonSymmetric 2017-10-02 11:51:13 +00:00
Vadim Pisarevsky
eca5906a75 Merge pull request #9746 from alalek:fix_msvs2017_warning 2017-10-02 11:15:48 +00:00
Suleyman TURKMEN
20c11d3b7b Update HOGDescriptor documentation 2017-10-02 07:14:35 +03:00
berak
089aac61f3 imgcodecs: fix 4 reading channel bmp images 2017-10-01 15:32:55 +02: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
Alexander Alekhin
a729f985fd Merge pull request #9726 from blendin:fix_oob 2017-09-29 14:16:40 +00:00
Alexander Alekhin
d43087cafe Merge pull request #9741 from alalek:stitching_test_update 2017-09-29 13:10:53 +00:00
Alexander Alekhin
0bf823e1eb stitching(perf): update condition threshold 2017-09-29 14:33:13 +03:00
Alexander Alekhin
39ee07b8f6 test: clarify fail messages 2017-09-29 14:33:00 +03: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
5e93c82023 Merge pull request #9491 from dkurt:tf_lstm 2017-09-28 21:04:06 +00:00
Vadim Pisarevsky
a6d634b5b8 Merge pull request #9683 from terfendail:grects_weights 2017-09-28 14:02:12 +00:00
Vadim Pisarevsky
af8fc3e209 Merge pull request #9604 from alalek:ocl_kernel_profiling 2017-09-28 13:48:34 +00:00
Vadim Pisarevsky
22467599c4 Merge pull request #9692 from alalek:dnn_perf_net 2017-09-28 13:44:24 +00:00
Vadim Pisarevsky
68cc2e292d Merge pull request #9734 from dkurt:fix_deconv_layer_kernel_layout 2017-09-28 11:42:57 +00:00
Vadim Pisarevsky
45365e4df1 Merge pull request #9691 from dkurt:padding_layer_refactoring 2017-09-28 11:34:28 +00:00
Tomoaki Teshima
139b32734e Merge pull request #9714 from tomoaki0705:universalBilateral
imgproc: use universal intrinsic as much as possible (#9714)

* use universal intrinsic as much as possible
  * make SSE3 part as common as possible with universal intrinsic implementation
  * put the reducing part out of the main loop

* follow the comment
  * fix the typo
  * use v_reduce_sum4

* follow the comment again
  * remove all CV_SSE3 part from smooth.cpp
2017-09-28 12:30:22 +03:00
Alexander Alekhin
488d4df520 Merge pull request #9710 from savuor:ovx_harris_build_fix 2017-09-28 09:27:09 +00:00
Dmitry Kurtaev
6e593cd1f0 Swap dimensions of deconvolution kernel 2017-09-27 22:38:34 +03:00
Alexander Alekhin
55b7073aae Merge pull request #9730 from yanlend:patch-1 2017-09-27 16:02:09 +00:00
Alexander Alekhin
0f0f5652fb Merge pull request #9717 from alalek:fix_fma 2017-09-27 13:48:09 +00:00
Peter Fischer
332588fcee Fix bug: non-maximum suppression for hough circle
The non-maximum suppression in the Hough accumulator incorrectly ignores maxima that extend over more than one cell, i.e. two neighboring cells both have the same accumulator value. This maximum is dropped completely instead of picking at least one of the entries. This frequently results in obvious circles being missed.

The behavior is now changed to be the same as for hough_lines.

See also https://github.com/opencv/opencv/issues/4440
2017-09-27 11:47:30 +02:00
blendin
c58152d94b Fix out of bounds write 2017-09-26 23:04:01 -07:00
Deric Crago
a0d7cf89f2 Fixed 'boundary' spelling 2017-09-26 23:42:48 -04:00
Alexander Alekhin
7475d23fec Merge pull request #9707 from woodychow:fix_undistortrectifymap_avx2 2017-09-26 16:42:47 +00: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
Dmitry Kurtaev
84cec17913 LSTM layer for TensorFlow importer 2017-09-26 12:59:36 +03:00
woody.chow
ef8c919e3f Minor optimization of initUndistortRectifyMapLine_AVX 2017-09-26 09:12:22 +09:00
Alexander Alekhin
d9107601c3 Merge pull request #9690 from tomoaki0705:universalSmooth 2017-09-25 19:42:06 +00:00
Alexander Alekhin
a08044d6f2 Merge pull request #8833 from terfendail:resizenn_perftest 2017-09-25 16:42:07 +00:00
Alexander Alekhin
aea25e7f90 Merge pull request #9676 from jrobble:fix_caffe_swaprb 2017-09-25 16:05:11 +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
62c4cf3ac6 fixed build of OpenVX Harris 2017-09-25 15:58:09 +03:00
Rostislav Vasilikhin
945706a8e8 softfloat f64_sqrt bug fix 2017-09-25 15:52:56 +03:00
Alexander Alekhin
78788e1efb dnn(perf): update perf tests 2017-09-25 15:32:37 +03:00
Alexander Alekhin
08b5dc64af imgcodecs(tiff): drop legacy code
Drop code under *undefined* HAVE_TIFF
(violates several policies, like a way to turn off tiff support)
2017-09-24 22:36:17 +00:00
Tomoaki Teshima
e932160a8d replace raw SSE2/NEON implementation with universal intrinsic 2017-09-22 23:43:05 +09:00
vipinanand4
39e742765a Merge pull request #9618 from vipinanand4:goodFeaturesToTrack_added_gradiantSize
Added gradiantSize param into goodFeaturesToTrack API (#9618)

* Added gradiantSize param into goodFeaturesToTrack API

Removed hardcode value 3 in goodFeaturesToTrack API, and
added new param 'gradinatSize' in this API so that user can
pass any gradiant size as 3, 5 or 7.

Signed-off-by: Vipin Anand <anand.vipin@gmail.com>
Signed-off-by: Nilaykumar Patel<nilay.nilpat@gmail.com>
Signed-off-by: Prashanth Voora <prashanthx85@gmail.com>

* fixed compilation error for java test

Signed-off-by: Vipin Anand <anand.vipin@gmail.com>

* Modifying code for previous binary compatibility and fixing other warnings

fixed ABI break issue

resolved merged conflict

compilation error fix

Signed-off-by: Vipin Anand <anand.vipin@gmail.com>
Signed-off-by: Patel, Nilaykumar K <nilay.nilpat@gmail.com>
2017-09-22 14:04:43 +00:00
jrobble
c67ad49378 Set swapRB to false in Caffe tests and examples. 2017-09-22 09:58:48 -04:00
Alexander Alekhin
b8af7c5f86 ts: update perf test
- use GTest tuple definitions instead of std::tr1
- use "const static" for cv::Size contants to reduce generated binary code
- PERF_TEST_P() violates TEST_P() original semantic. Added PERF_TEST_P_() macro
2017-09-22 14:43:27 +03:00
Vadim Pisarevsky
3f794cd951 Merge pull request #9147 from sovrasov:phase_corr_fix 2017-09-22 10:32:16 +00:00
Dmitry Kurtaev
222149b9c6 Refactored Padding layer 2017-09-22 12:39:00 +03:00
Vitaly Tuzov
22fcbaed64 Added performance test for nearest neighbor resize 2017-09-22 12:34:58 +03:00
Vadim Pisarevsky
a0d3d11470 Merge pull request #9649 from dkurt:dnn_reshape_transpose 2017-09-21 19:25:58 +00:00
Vadim Pisarevsky
f1695bdc38 Merge pull request #9678 from tomoaki0705:universalFastScore 2017-09-21 19:12:30 +00:00
Vitaly Tuzov
9a70fd0123 Disabling reset of 'weights' array for reject level mode of groupRectangles function. 2017-09-21 18:21:50 +03:00
Dmitry Kurtaev
17a85b16fc Remove reorder_dims attribute of Reshape layer 2017-09-21 16:42:03 +03:00
Rostislav Vasilikhin
cc547e8260 Bit-exact version of Luv2RGB_b (#9470)
* lab_tetra squashed

* initial version is almost written

* unfinished work

* compilation fixed, to be debugged

* Lab test removed

* more fixes

* Luv2RGBinteger: channels order fixed

* Lab structs removed

* good trilinear interpolation added

* several fixes

* removed Luv2RGB interpolations, XYZ tables; 8-cell LUT added

* no_interpolate made 8-cell

* interpolations rewritten to 8-cell, minor fixes

* packed interpolation added for RGB2Luv

* tetra implemented

* removing unnecessary code

* LUT building merged

* changes ported to color.cpp

* minor fixes; try to suppress warnings

* fixed v range of Luv

* fixed incorrect src channel number

* minor fixes

* preliminary version of Luv2RGBinteger is done

* Luv2RGB_b is in progress

* XYZ color constants converted to softfloat

* Luv test: precision fixed

* Luv bit-exactness test added

* warnings fixed

* compilation fixed, error message fixed

* Luv check is limited to [0-2,0-2,0-2] by XYZ

* L->Y generation moved to LUT

* LUTs added for up and vp of Luv2RGB_b

* still works

* fixed-point is done, works at maxerr 2

* vectorized code is done, 2x slower than original

* perf improved by 10%

* extra comments removed

* code moved to color.cpp

* test_lab.cpp updated

* minor refactoring

* test added for Luv2RGB

* OCL Luv2RGB_b: XYZ are limited to [0, 2]; docs updated

* Luv2RGB_b rewritten to universal intrinsics

* test_lab.cpp moved to luv_tetra branch
2017-09-21 14:20:45 +03:00
Vadim Pisarevsky
bb679f978d Merge pull request #9653 from dkurt:thresh_16u 2017-09-21 10:57:46 +00:00
Vadim Pisarevsky
2ad27f5757 Merge pull request #9673 from dkurt:feature_dnn_tensorflow_defun 2017-09-21 10:55:25 +00:00
Tomoaki Teshima
bf718b0865 use universal intrinsic in FAST 2017-09-21 18:28:15 +09:00
Vadim Pisarevsky
e70b75b51a Merge pull request #8820 from woodychow:multithread_sift_findScaleSpaceExtrema 2017-09-20 12:03:25 +00:00
Dmitry Kurtaev
bdd8cc697a Import wrapped Dropout subgraphs from TensorFlow 2017-09-20 13:30:25 +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
6a5298a532 Merge pull request #9664 from tomoaki0705:fixBuildVS2013 2017-09-19 12:25:18 +00:00
Adam Rankin
fb8143d55d Using environment variable to store capture options (#9292)
* Using environment variable to store options parsed by av_dict_parse_string(ENV{OPENCV_FFMPEG_CAPTURE_OPTIONS}, ";", "|")

* Adding missing mandatory flags parameter

* Guarding against missing function via LIBAVUTIL version

* Code review fixes

Copy/paste error due to coder mistake reverted
Proper version checking for LIBAVUTIL_BUILD
2017-09-19 13:29:43 +03:00
Vadim Pisarevsky
fd20529686 Merge pull request #9657 from alalek:ocl_global_size_adjustment 2017-09-19 10:19:45 +00:00
Vadim Pisarevsky
92deccbf41 Merge pull request #9654 from savuor:seamlessclone 2017-09-19 10:16:37 +00:00
Tomoaki Teshima
48c4bea57c fix build on Visual Studio 2013 and earlier 2017-09-19 19:08:23 +09: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
Dmitry Kurtaev
fa109b94d9 Update 16UC thresholding 2017-09-18 18:34:45 +03:00
Arvid Piehl Lauritsen Böttiger
ca245e995a Added support for thresholding CV_16U images. 2017-09-18 15:34:37 +03:00
Vadim Pisarevsky
0624411875 Merge pull request #9624 from nilaykumarpatel:Feature2d_getDefaultName 2017-09-18 10:34:35 +00:00
Vadim Pisarevsky
f7df5dd32c Merge pull request #9305 from dkurt:public_dnn_importer_is_deprecated 2017-09-18 09:35:35 +00:00
Vadim Pisarevsky
70c5d69640 Merge pull request #9310 from r2d3:svm_parallel 2017-09-18 09:32:41 +00:00
Vadim Pisarevsky
e012ccda4a Merge pull request #9517 from dkurt:tf_mobilenet 2017-09-18 09:31:19 +00:00
Vadim Pisarevsky
f4136679ea Merge pull request #9551 from ChristofKaufmann:MultiChannelMask 2017-09-18 09:28:34 +00:00
Vadim Pisarevsky
3358b8910b Merge pull request #9591 from dkurt:feature_dnn_caffe_importer_fp16 2017-09-18 09:26:23 +00:00
Vadim Pisarevsky
73298ea875 Merge pull request #9642 from saskatchewancatch:psnr-checks 2017-09-18 09:24:03 +00:00
Dmitry Kurtaev
bd8e6b7e14 Make external cv::dnn::Importer usage is deprecated 2017-09-18 08:52:36 +03:00
Nishant Arora
37ba1d6f2d Merge pull request #9599 from whizzzkid:master
Incorrect Naming (#9599)

* Resolved #9544

* This is a better fix

* This should be good.
2017-09-17 19:24:43 +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
Vadim Pisarevsky
4196543cd5 Merge pull request #9313 from dkurt:dnn_perf_test 2017-09-16 19:39:23 +00: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
99fae8146f Merge pull request #9626 from T0ny0:fisheye_fix_ 2017-09-15 20:29:39 +00:00
Tony0
2f0036c918 remove assignments in expressions 2017-09-15 22:45:17 +03:00
Alexander Alekhin
9dea296241 Merge pull request #9458 from csukuangfj:fix-doc 2017-09-15 19:35:01 +00:00
Alexander Alekhin
2566ef3515 Merge pull request #9526 from sturkmen72:update_documentation 2017-09-15 18:47:06 +00:00
Dmitry Kurtaev
d891e9b1d8 Layers for MobileNet from TensorFlow 2017-09-15 20:17:30 +03:00
Dmitry Kurtaev
8646d5fb84 FP16 Caffe models import and export 2017-09-15 18:06:34 +03:00
stalin18
d343a58580 removed unnecessary line 2017-09-15 17:09:21 +03:00
stalin18
ed3d2cd122 fixed unnecessary reconstruction in seamlessclone
fixed unnecessary reconstruction in seamlessclone by using only the
required rectangular area in input images
2017-09-15 17:09:21 +03:00
Vadim Pisarevsky
6bf8fe815d Merge pull request #9384 from dkurt:torch_split 2017-09-15 13:05:05 +00:00
Vadim Pisarevsky
a391871cce Merge pull request #9301 from dkurt:dnn_npy 2017-09-15 12:42:02 +00:00
Vadim Pisarevsky
41b23fde9f Merge pull request #9524 from dkurt:dnn_torch_openface 2017-09-15 12:38:12 +00:00
Vadim Pisarevsky
48cc1b351d Merge pull request #9560 from sovrasov:undistort_stop_criteria 2017-09-15 12:34:16 +00:00
Vadim Pisarevsky
5707304777 Merge pull request #9633 from saskatchewancatch:psnr-doc 2017-09-15 12:26:34 +00:00
Vadim Pisarevsky
cb0d695984 Merge pull request #9616 from dkurt:feature_dnn_tf_importer_atrous_conv 2017-09-15 10:24:05 +00:00
Vadim Pisarevsky
d60de63fa0 Merge pull request #9623 from dkurt:hotfix_disable_ssd_cpu_halide_test 2017-09-15 10:21:44 +00:00
saskatchewancatch
a90a93b454 i9629 - Added actual documentation for cv::PSNR function 2017-09-14 18:20:00 -06:00
Patel, Nilaykumar K
6857870412 Overloading getDefaultName method for Feature2D and its child classes
Signed-off-by: Vipin Anand <anand.vipin@gmail.com>
Signed-off-by: Prashanth Voora <prashanthx85@gmail.com>
Signed-off-by: Patel, Nilaykumar K <nilay.nilpat@gmail.com>
2017-09-14 23:22:18 +05:30
dtmoodie
3c229aa2eb async bugfix
upload winsize and iters as members to prevent async out of scope issues
2017-09-14 14:48:49 +00:00
Tony0
62df5e8c8b fisheye: fix initUndistortRectifyMap() 2017-09-14 14:57:21 +03:00
Rostislav Vasilikhin
4435ec5f26 Bit-exact version of RGB2Luv_b (#9226)
* Imgproc_ColorLab_Full.accuracy test fixed

* Lab and Luv tests: rewritten, constants explained

* CV_ColorCvtBaseTest: added methods for 8u implementations

* Lab2RGB_b: bit-exactness enabled for all modes; non-vectorized code fixed to comply with vectorized

* srgb support added

* XYZ constants made softdouble

* bit-exact tests written for Lab

* ColorLab_full test fixed

* reverted: no 8u convertors for CV_ColorCvtBaseTest

* added checksum-based test for Lab bit-exactness

* extra declarations removed

* Lab test fix: stop at first mismatch

* test info output improved

* error message fixed

* lab_tetra squashed

* initial version is almost written

* unfinished work

* compilation fixed, to be debugged

* Lab test removed

* more fixes

* Luv2RGBinteger: channels order fixed

* Lab structs removed

* good trilinear interpolation added

* several fixes

* removed Luv2RGB interpolations, XYZ tables; 8-cell LUT added

* no_interpolate made 8-cell

* interpolations rewritten to 8-cell, minor fixes

* packed interpolation added for RGB2Luv

* tetra implemented

* removing unnecessary code

* LUT building merged

* changes ported to color.cpp

* minor fixes; try to suppress warnings

* fixed v range of Luv

* fixed incorrect src channel number

* minor fixes

* preliminary version of Luv2RGBinteger is done

* Luv2RGB_b is in progress

* XYZ color constants converted to softfloat

* Luv test: precision fixed

* Luv bit-exactness test added

* warnings fixed

* compilation fixed, error message fixed

* test_lab.cpp removed
2017-09-14 14:51:27 +03:00
Vladislav Sovrasov
b421ebef86 imgproc: slightly change the signature of undistortPoints overload 2017-09-14 12:19:40 +03:00
Vladislav Sovrasov
701c7e5685 imgproc: add stop criteria tuning in undistortPoints 2017-09-14 11:43:54 +03:00
Dmitry Kurtaev
0ce7c33bc8 Torch's Concat and ConcatTable doesn't use Split layer 2017-09-14 09:26:57 +03:00
Dmitry Kurtaev
7dc6b1d7d4 Layers for OpenFace face recognition network 2017-09-14 09:11:31 +03:00
Dmitry Kurtaev
58b890b9f7 Dilated convolution import from TensorFlow 2017-09-13 18:44:14 +03:00
Dmitry Kurtaev
6639348c5e Disable SSD on CPU Halide test 2017-09-13 18:19:54 +03:00
Vadim Pisarevsky
9640bbe76d Merge pull request #9592 from alalek:issue_9589 2017-09-13 14:57:49 +00:00
Vadim Pisarevsky
32bb71d686 Merge pull request #9603 from alalek:ocl_device_extensions 2017-09-13 14:43:36 +00:00
Vadim Pisarevsky
822d33d64b Merge pull request #9374 from savuor:test_lab_bit_exact 2017-09-13 14:39:04 +00:00
Suleyman TURKMEN
d547c6b1a2 documentation improvement 2017-09-13 17:24:59 +03:00
Vadim Pisarevsky
f1aa180a40 Merge pull request #9574 from saskatchewancatch:i9482 2017-09-13 13:59:43 +00:00
Vadim Pisarevsky
8c7f19850f Merge pull request #9576 from dkurt:feature_dnn_tf_importer_fp16 2017-09-13 13:57:38 +00:00
Vadim Pisarevsky
622318aeae Merge pull request #9561 from dkurt:fix_8693 2017-09-13 13:34:49 +00:00
Vadim Pisarevsky
b8b5d83ad0 Merge pull request #9566 from alalek:python_signatures 2017-09-13 13:32:05 +00:00
Vadim Pisarevsky
93c3f20deb Merge pull request #9569 from dkurt:test_dnn_ssd_halide 2017-09-13 13:29:50 +00:00
Vadim Pisarevsky
258b13f2e0 Merge pull request #9600 from StevenPuttemans:fix_9583 2017-09-13 13:27:04 +00:00
Vadim Pisarevsky
42cd061af0 Merge pull request #9581 from sovrasov:rtree_disable_cv 2017-09-13 13:20:52 +00:00
Rostislav Vasilikhin
18ca3d1e62 error message fixed 2017-09-12 20:05:58 +03:00
Rostislav Vasilikhin
2457bfc1e3 test info output improved 2017-09-12 17:16:30 +03:00
Rostislav Vasilikhin
f6a165d10f Lab test fix: stop at first mismatch 2017-09-12 17:16:30 +03:00
Rostislav Vasilikhin
92093a6e6c extra declarations removed 2017-09-12 17:16:30 +03:00
Rostislav Vasilikhin
f1e8aa70a0 added checksum-based test for Lab bit-exactness 2017-09-12 17:16:30 +03:00
Rostislav Vasilikhin
d25344c257 reverted: no 8u convertors for CV_ColorCvtBaseTest 2017-09-12 17:16:30 +03:00
Rostislav Vasilikhin
62ee92e3e2 ColorLab_full test fixed 2017-09-12 17:16:30 +03:00
Rostislav Vasilikhin
375ec5ed7e bit-exact tests written for Lab 2017-09-12 17:16:30 +03:00
Rostislav Vasilikhin
758f914249 XYZ constants made softdouble 2017-09-12 17:16:30 +03:00