Jonas Vautherin [Fri, 8 Oct 2021 02:07:04 +0000 (04:07 +0200)]
Merge pull request #20801 from JonasVautherin:fix-gst-error-handling
* Fix gst error handling
* Use the return value instead of the error, which gives no guarantee of being NULL in case of error
* Test err pointer before accessing it
* Remove unreachable code
* videoio(gstreamer): restore check in writer code
Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
Alexander Panov [Thu, 7 Oct 2021 22:46:25 +0000 (01:46 +0300)]
Merge pull request #20823 from AleksandrPanov:fix_orb_integer_overflow
Fix ORB integer overflow
* set size_t step to fix integer overflow in ptr0 offset
* added issue_537 test
* minor fix tags, points
* added size_t_step and offset to remove mixed unsigned and signed operations
* features2d: update ORB checks
Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
Alexander Alekhin [Thu, 7 Oct 2021 16:16:59 +0000 (16:16 +0000)]
Merge pull request #20831 from sthalik:fix-msvc-build-3.4
Stanislaw Halik [Mon, 4 Oct 2021 12:42:32 +0000 (14:42 +0200)]
add new supported MSVC version
Oliver Kuckertz [Wed, 6 Oct 2021 16:41:05 +0000 (18:41 +0200)]
Merge pull request #20725 from mologie:fix-dnn-tf-on-arm
* dnn: fix unaligned memory access crash on armv7
The getTensorContent function would return a Mat pointing to some
member of a Protobuf-encoded message. Protobuf does not make any
alignment guarantees, which results in a crash on armv7 when loading
models while bit 2 is set in /proc/cpu/alignment (or the relevant
kernel feature for alignment compatibility is disabled). Any read
attempt from the previously unaligned data member would send SIGBUS.
As workaround, this commit makes an aligned copy via existing clone
functionality in getTensorContent. The unsafe copy=false option is
removed. Unfortunately, a rather crude hack in PReLUSubgraph in fact
writes(!) to the Protobuf message. We limit ourselves to fixing the
alignment issues in this commit, and add getTensorContentRefUnaligned
to cover the write case with a safe memcpy. A FIXME marks the issue.
* dnn: reduce amount of .clone() calls
* dnn: update FIXME comment
Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
Alexander Alekhin [Wed, 6 Oct 2021 12:05:45 +0000 (15:05 +0300)]
Merge pull request #20815 from alalek:fix_20649_revert_19859
features2d: repair SimpleBlobDetector
* features2d: revert code change by PR #19859
Reverted commit
76860933f0a31c0abd1b26c1f11b25972cda031e
* features2d: check SimpleBlobDetector parameters consistency
Alexander Alekhin [Wed, 6 Oct 2021 12:02:34 +0000 (12:02 +0000)]
Merge pull request #20814 from alalek:dnn_pytest_input_3d
Alexander Alekhin [Wed, 6 Oct 2021 12:01:06 +0000 (12:01 +0000)]
Merge pull request #20802 from alalek:core_tls_init_TlsAbstraction
Alexander Alekhin [Tue, 5 Oct 2021 23:21:27 +0000 (23:21 +0000)]
dnn(pytest/test_input_3d): reload model between switching targets
Alexander Alekhin [Tue, 5 Oct 2021 15:06:08 +0000 (15:06 +0000)]
Merge pull request #20808 from alalek:update_ffmpeg_3.4
Alexander Alekhin [Tue, 5 Oct 2021 07:09:27 +0000 (10:09 +0300)]
ffmpeg/3.4: update FFmpeg wrapper 2021.10
- FFmpeg 3.4.8 (no changes)
Alexander Alekhin [Mon, 4 Oct 2021 22:50:26 +0000 (22:50 +0000)]
Merge pull request #20806 from alalek:update_version_3.4.16-pre
Alexander Alekhin [Mon, 4 Oct 2021 20:47:07 +0000 (20:47 +0000)]
pre: OpenCV 3.4.16 (version++)
Alexander Alekhin [Mon, 4 Oct 2021 19:16:27 +0000 (19:16 +0000)]
Merge pull request #20803 from alalek:core_parallel_workaround_tsan
keroiber [Mon, 4 Oct 2021 16:51:49 +0000 (18:51 +0200)]
Merge pull request #20743 from keroiber:prefix_js_function_bindings_with_namespace
* Prefix global javascript functions with sub-namespaces
* js: handle 'namespace_prefix_override', update filtering
- avoid functions override with same name but different namespace
Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
xhawk18 [Mon, 4 Oct 2021 16:44:57 +0000 (00:44 +0800)]
Merge pull request #20183 from xhawk18:3.4
* improve compatibility for qt 6.
* cmake(highgui): rework Qt dependency support
* cmake(highgui): workaround Qt5Config.cmake "components" bug
Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
Alexander Alekhin [Mon, 4 Oct 2021 09:40:16 +0000 (09:40 +0000)]
core(TLS): force TlsAbstraction initialization before main()
Alexander Alekhin [Mon, 4 Oct 2021 10:46:32 +0000 (10:46 +0000)]
core(parallel): suppress TSAN warning
Alexander Alekhin [Sat, 2 Oct 2021 17:50:38 +0000 (17:50 +0000)]
Merge pull request #20797 from sturkmen72:restore_LSD
Alexander Alekhin [Sat, 2 Oct 2021 17:48:23 +0000 (17:48 +0000)]
Merge pull request #20796 from JonasVautherin:patch-1
Jonas Vautherin [Sat, 2 Oct 2021 01:07:25 +0000 (03:07 +0200)]
Fix gst_initializer
Use the return value of gst_init_check instead of testing the error pointer
Alexander Alekhin [Sat, 2 Oct 2021 15:35:56 +0000 (15:35 +0000)]
Merge pull request #20795 from JBamberger:gradle-dynamic-cv-version
Jannik Bamberger [Fri, 1 Oct 2021 22:04:23 +0000 (00:04 +0200)]
Automatically set the correct OpenCV version in build.gradle
Automatically sets the correct OpenCV version in the CMAKE example contained in the build.gradle
file of the Android SDK.
Suleyman TURKMEN [Sat, 2 Oct 2021 10:32:11 +0000 (13:32 +0300)]
additional changes
Alexander Alekhin [Fri, 1 Oct 2021 22:25:47 +0000 (22:25 +0000)]
Merge pull request #20794 from alalek:dnn_ocl_fix_conv_dwconv_workgroup
Alexander Alekhin [Fri, 1 Oct 2021 18:51:01 +0000 (18:51 +0000)]
dnn(ocl): fix conv DWCONV workgroup
Alexander Alekhin [Fri, 1 Oct 2021 15:53:15 +0000 (15:53 +0000)]
Merge pull request #20793 from tomoaki0705:fixGaussianOverflow
Tomoaki Teshima [Fri, 1 Oct 2021 14:17:02 +0000 (23:17 +0900)]
suppress GaussianBlur to generate empty images
* sharp Gaussian kernel causes over flow and ends up in blank image
Suleyman TURKMEN [Fri, 1 Oct 2021 13:23:16 +0000 (16:23 +0300)]
restore LSD
Alexander Alekhin [Thu, 30 Sep 2021 10:16:26 +0000 (10:16 +0000)]
Merge pull request #20774 from alalek:dnn_ocl_fix_conv_basic_workgroup
Alexander Alekhin [Wed, 29 Sep 2021 13:16:46 +0000 (13:16 +0000)]
dnn(ocl): fix conv BASIC workgroup
Alexander Alekhin [Wed, 29 Sep 2021 11:04:13 +0000 (11:04 +0000)]
Merge pull request #20763 from Cavendish-Koo:houghlines_sdiv_bug_fix
Alexander Alekhin [Tue, 28 Sep 2021 17:45:39 +0000 (20:45 +0300)]
Merge pull request #20748 from sturkmen72:clean_up_test_data
Alexander Alekhin [Tue, 28 Sep 2021 15:00:13 +0000 (15:00 +0000)]
Merge pull request #20762 from fishmandev:patch-1
Cavendish-Koo [Tue, 28 Sep 2021 13:18:07 +0000 (21:18 +0800)]
fix the bug of HoughlinesSDIV
Dmitriy Fishman [Tue, 28 Sep 2021 12:29:47 +0000 (15:29 +0300)]
Update video_input_psnr_ssim.markdown
Alexander Alekhin [Tue, 28 Sep 2021 11:47:55 +0000 (11:47 +0000)]
Merge pull request #20754 from asmorkalov:as/parser_verbose_print
Alexander Smorkalov [Mon, 27 Sep 2021 07:53:23 +0000 (10:53 +0300)]
Verbose output for errors found by header parser.
Suleyman TURKMEN [Sat, 25 Sep 2021 06:31:44 +0000 (09:31 +0300)]
Update perf_bgfg_mog2.cpp, perf_bgfg_knn.cpp
Nicholas Ho [Sat, 25 Sep 2021 17:43:33 +0000 (18:43 +0100)]
Merge pull request #20712 from Nicholas-Ho-arm:3.4_RowVec_8u32f
* Add RowVec_8u32f
* Fix build errors in Linux x64 Debug and armeabi-v7a
* Reformat code to make it more clean and conventional
* Optimise with vx_load_expand_q()
Alexander Alekhin [Fri, 24 Sep 2021 17:38:56 +0000 (17:38 +0000)]
Merge pull request #20746 from easonycwang:easonycwang/inpaint_perf_opt
easonycwang [Fri, 24 Sep 2021 09:44:58 +0000 (17:44 +0800)]
Tile:
This submission is used to improve the performance of the inpaint algorithm for 3 channels images(RGB or BGR).
Reason:
The original algorithm implementation did not consider the cache hits.
The loop of channels is outside the core loop, so the perfmance is not very good.
Moving the channel loop inside the core loop can significantly improve cache hits, thereby improving performance.
Performance:
360P, about >= 30% improvement
iphone8P: 5.52ms -> 3.75ms
iphone6s: 14.04ms -> 9.15ms
Alexander Alekhin [Fri, 24 Sep 2021 10:56:22 +0000 (10:56 +0000)]
Merge pull request #20742 from UnaNancyOwen:fix_text_detection
Tsukasa Sugiura [Fri, 24 Sep 2021 06:35:42 +0000 (15:35 +0900)]
fix cast in text detection sample
Amir Tulegenov [Wed, 22 Sep 2021 14:42:32 +0000 (20:42 +0600)]
Merge pull request #19554 from amirtu:OCV-215_cvtColorTwoPlane_wrong_output_when_Y_Plane_Mat_has_step
different paddings in cvtColorTwoPlane() for biplane YUV420
* Different paddings support in cvtColorTwoPlane() for biplane YUV420
* Build fix for dispatch case.
* Resoted old behaviour for y.step==uv.step to exclude perf regressions.
Co-authored-by: amir.tulegenov <amir.tulegenov@xperience.ai>
Co-authored-by: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
Alexander Alekhin [Tue, 21 Sep 2021 22:30:49 +0000 (22:30 +0000)]
Merge pull request #20729 from MikaelUrankar:3.4
mikael [Tue, 21 Sep 2021 17:46:33 +0000 (19:46 +0200)]
Detect FP16 on FreeBSD aarch64
Alexander Alekhin [Tue, 21 Sep 2021 15:27:48 +0000 (15:27 +0000)]
Merge pull request #20713 from SamFC10:unsqueeze-opset13
SamFC10 [Fri, 17 Sep 2021 12:10:57 +0000 (17:40 +0530)]
fix for unsqueeze opset version 13
Alexander Alekhin [Thu, 16 Sep 2021 17:11:32 +0000 (17:11 +0000)]
Merge pull request #20699 from alalek:dnn_perf_update_convolution_tests
rogday [Tue, 14 Sep 2021 17:49:49 +0000 (20:49 +0300)]
Merge pull request #20671 from rogday:yolov4x-mish
Add support for YOLOv4x-mish
* backport to 3.4 for supporting yolov4x-mish
* add YOLOv4x-mish test
* address review comments
Co-authored-by: Guo Xu <guoxu@1school.com.cn>
Alexander Alekhin [Tue, 14 Sep 2021 17:17:53 +0000 (17:17 +0000)]
Merge pull request #20700 from alalek:cmake_fix_handling_ie_version
Alexander Alekhin [Tue, 14 Sep 2021 08:59:35 +0000 (08:59 +0000)]
Merge pull request #20692 from sturkmen72:update_convexhull_cpp
Alexander Alekhin [Tue, 14 Sep 2021 04:15:35 +0000 (04:15 +0000)]
cmake: fix handling of INF_ENGINE_RELEASE
- default value should be handled earlier
Alexander Panov [Mon, 13 Sep 2021 16:27:00 +0000 (19:27 +0300)]
Merge pull request #20676 from AleksandrPanov:delete_createConvexHull_convertTo
* deleted dublicated createConvexHull and convertTo
* replaced checkVector(2) with points.empty()
Alexander Alekhin [Sun, 12 Sep 2021 11:09:51 +0000 (11:09 +0000)]
Merge pull request #20693 from alalek:backport_merge34_fix
Alexander Alekhin [Sat, 11 Sep 2021 22:26:52 +0000 (22:26 +0000)]
dnn(onnx): fix format specifier
Suleyman TURKMEN [Sat, 11 Sep 2021 19:58:45 +0000 (22:58 +0300)]
Update convexhull.cpp
Alexander Alekhin [Sat, 11 Sep 2021 16:26:51 +0000 (16:26 +0000)]
Merge pull request #20690 from alalek:build_opencv_winpack_dldt_2021.4.1
Alexander Alekhin [Sat, 11 Sep 2021 16:26:25 +0000 (16:26 +0000)]
Merge pull request #20687 from alalek:core_ocl_fix_intel_gemm
Alexander Alekhin [Sat, 11 Sep 2021 16:25:04 +0000 (19:25 +0300)]
Merge pull request #20686 from zihaomu:tf_biasadd_bug
DNN: BiasAdd tf_importer.cpp could load Const from First Place
Zihao Mu [Fri, 10 Sep 2021 10:15:22 +0000 (18:15 +0800)]
BiasAdd could load Const from second place.
Alexander Alekhin [Fri, 10 Sep 2021 20:58:37 +0000 (20:58 +0000)]
build: winpack_dldt with dldt 2021.4.1
Alexander Alekhin [Fri, 10 Sep 2021 22:26:36 +0000 (22:26 +0000)]
Merge pull request #20689 from diablodale:fix20613-selectocldevice
Dale Phurrough [Fri, 10 Sep 2021 15:59:56 +0000 (17:59 +0200)]
fix opencv/opencv#20613
* copy 4.x selectOpenCLDevice() -- it is compatible
* filter platforms rather than trying only first matching
* this works on 3.4 and 4.x master
Alexander Alekhin [Fri, 10 Sep 2021 12:42:28 +0000 (12:42 +0000)]
dnn(perf): update convolution tests
Alexander Alekhin [Tue, 7 Sep 2021 04:39:28 +0000 (04:39 +0000)]
core(ocl): buffer bounds in intelblas_gemm_buffer_NT
Alexander Alekhin [Fri, 10 Sep 2021 12:00:11 +0000 (15:00 +0300)]
Merge pull request #20670 from alalek:core_ocl_fix_intel_gpu_gemm_requirements
core(OpenCL): fix intel_gpu_gemm kernel requirements
* core(ocl): fix intel_gpu_gemm integration
- allow bailout to generic OpenCL kernel
* core(ocl): avoid failures of generic OpenCL gemm kernel
* core(ocl): define alignment requirements of intel_gpu_gemm kernels
Alexander Alekhin [Fri, 10 Sep 2021 11:58:52 +0000 (11:58 +0000)]
Merge pull request #20661 from alalek:dnn_ocl_fix_gemm_like_kernel
rogday [Fri, 10 Sep 2021 11:07:16 +0000 (14:07 +0300)]
Merge pull request #20674 from rogday:prelu_slope
Fix PReLU negative slope access pattern
* fix prelu negative slope access pattern
* change begin() to ptr()
Alexander Alekhin [Thu, 9 Sep 2021 21:35:02 +0000 (21:35 +0000)]
Merge pull request #20675 from diablodale:fix2-20544
Dale Phurrough [Thu, 9 Sep 2021 13:20:45 +0000 (15:20 +0200)]
add nodiscard to features2d clone funcs
rogday [Thu, 9 Sep 2021 11:41:40 +0000 (14:41 +0300)]
Merge pull request #20605 from rogday:split_slice_shenanigans
Add Normalize subgraph, fix Slice, Mul and Expand
* Add Normalize subgraph, support for starts<0 and axis<0 in Slice, Mul broadcasting in the middle and fix Expand's unsqueeze
* remove todos
* remove range-based for loop
* address review comments
* change >> to > > in template
* fix indexation
* fix expand that does nothing
Alexander Alekhin [Mon, 6 Sep 2021 02:51:37 +0000 (05:51 +0300)]
dnn(ocl): fix out of bound access in GEMM-like kernels
- dropped usage of CreateSubBuffer() - buffers lifetime management issue
- fixed elementwise offset
- avoid out of bounds read access
Alexander Alekhin [Mon, 6 Sep 2021 17:20:18 +0000 (17:20 +0000)]
Merge pull request #20655 from alalek:dnn_ocl_fix_globalsize
Alexander Alekhin [Mon, 6 Sep 2021 11:31:35 +0000 (11:31 +0000)]
Merge pull request #20657 from zchrissirhcz:upd-doc-for-py_fast
Zhuo Zhang [Mon, 6 Sep 2021 04:03:59 +0000 (12:03 +0800)]
docs: fix image path for py_fast doc
Alexander Alekhin [Sat, 4 Sep 2021 16:27:51 +0000 (16:27 +0000)]
dnn(ocl): fix automatic globalsize adjusting
- if kernel code doesn't support that
Alexander Alekhin [Sat, 4 Sep 2021 18:23:09 +0000 (18:23 +0000)]
Merge pull request #20652 from alalek:ocl_debug
Alexander Alekhin [Sat, 4 Sep 2021 18:22:12 +0000 (18:22 +0000)]
Merge pull request #20651 from alalek:issue_18361
Alexander Alekhin [Sat, 4 Sep 2021 18:21:58 +0000 (18:21 +0000)]
Merge pull request #20648 from alalek:issue_20615
Alexander Alekhin [Fri, 3 Sep 2021 02:38:53 +0000 (02:38 +0000)]
dnn(ocl): avoid out of buffer access in copyWeightsSwizzled
Alexander Alekhin [Sat, 4 Sep 2021 01:34:02 +0000 (01:34 +0000)]
core(ocl): debug capabilities
Alexander Alekhin [Sat, 4 Sep 2021 04:35:00 +0000 (04:35 +0000)]
dnn(ocl): fix buffer offsets in IDLF kernel
- drop CreateSubBuffer
- fix FUSED_CONV_ELTWISE mode
rogday [Fri, 3 Sep 2021 12:32:29 +0000 (15:32 +0300)]
Merge pull request #20647 from rogday:resize_concat_optimization
Fix resize+concat optimization
* fix resize+concat optimization
* add comment and fix indentation
Alexander Alekhin [Thu, 2 Sep 2021 09:30:56 +0000 (09:30 +0000)]
Merge pull request #20646 from VadimLevin:dev/vlevin/fix-vector-conversion
Vadim Levin [Thu, 2 Sep 2021 07:32:17 +0000 (10:32 +0300)]
fix: NumPy array allocation error message in vector conversion
Alexander Alekhin [Wed, 1 Sep 2021 14:09:17 +0000 (14:09 +0000)]
Merge pull request #20573 from rogday:onnx_scale_fix
Alexander Alekhin [Wed, 1 Sep 2021 10:52:37 +0000 (10:52 +0000)]
Merge pull request #20618 from VadimLevin:dev/vlevin/fix-vector-conversion
WJJ1995 [Wed, 1 Sep 2021 10:10:05 +0000 (18:10 +0800)]
Merge pull request #20511 from wjj19950828:add_humanseg_support_0806
* support PPSeg model for dnn module
* fixed README for CI
* add test case
* fixed bug
* deal with comments
* rm dnn_model_runner
* update test case
* fixed bug for testcase
* update testcase
Vadim Levin [Fri, 27 Aug 2021 12:01:09 +0000 (15:01 +0300)]
feat: update conversion logic for `std::vector<T>` in Python bindings
`PyObject*` to `std::vector<T>` conversion logic:
- If user passed Numpy Array
- If array is planar and T is a primitive type (doesn't require
constructor call) that matches with the element type of array, then
copy element one by one with the respect of the step between array
elements. If compiler is lucky (or brave enough) copy loop can be
vectorized.
For classes that require constructor calls this path is not
possible, because we can't begin an object lifetime without hacks.
- Otherwise fall-back to general case
- Otherwise - execute the general case:
If PyObject* corresponds to Sequence protocol - iterate over the
sequence elements and invoke the appropriate `pyopencv_to` function.
`std::vector<T>` to `PyObject*` conversion logic:
- If `std::vector<T>` is empty - return empty tuple.
- If `T` has a corresponding `Mat` `DataType` than return
Numpy array instance of the matching `dtype` e.g.
`std::vector<cv::Rect>` is returned as `np.ndarray` of shape `Nx4` and
`dtype=int`.
This branch helps to optimize further evaluations in user code.
- Otherwise - execute the general case:
Construct a tuple of length N = `std::vector::size` and insert
elements one by one.
Unnecessary functions were removed and code was rearranged to allow
compiler select the appropriate conversion function specialization.
Alexander Alekhin [Tue, 31 Aug 2021 14:42:20 +0000 (14:42 +0000)]
Merge pull request #20635 from alalek:issue_20559
Alexander Alekhin [Mon, 30 Aug 2021 20:40:14 +0000 (20:40 +0000)]
dnn(ocl): drop CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE check
- it is a hint and it should not block kernel execution
Alexander Alekhin [Mon, 30 Aug 2021 18:09:51 +0000 (18:09 +0000)]
Merge pull request #20622 from diablodale:fix20544-nodiscard
Alexander Alekhin [Mon, 30 Aug 2021 13:39:44 +0000 (13:39 +0000)]
Merge pull request #20633 from alalek:ocl_dumpValue_handle_null
Alexander Alekhin [Mon, 30 Aug 2021 11:46:14 +0000 (11:46 +0000)]
core(ocl): handle NULL in dumpValue() debug call
- NULL is used for allocation of workgroup local variables
Alexander Alekhin [Sat, 28 Aug 2021 21:24:02 +0000 (21:24 +0000)]
Merge pull request #20625 from alalek:fix_msvc_warnings
Dale Phurrough [Fri, 27 Aug 2021 23:12:44 +0000 (01:12 +0200)]
fix opencv/opencv#20544 nodiscard for msvc/gcc
- includes workaround for preprocessor non-compliance
- enable attribute syntax checking in msvc
Alexander Alekhin [Sat, 28 Aug 2021 17:11:26 +0000 (17:11 +0000)]
build: eliminate build warnings
Alexander Alekhin [Sat, 28 Aug 2021 13:23:33 +0000 (13:23 +0000)]
Merge pull request #20623 from alalek:fix_java_byte