platform/upstream/opencv.git
2 years agoUpdate OpenCVDetectVTK.cmake
Suleyman TURKMEN [Tue, 28 Sep 2021 18:23:26 +0000 (21:23 +0300)]
Update OpenCVDetectVTK.cmake

2 years agoMerge pull request #20739 from sivanov-work:merge_base_decode
Sergey Ivanov [Tue, 28 Sep 2021 15:02:21 +0000 (18:02 +0300)]
Merge pull request #20739 from sivanov-work:merge_base_decode

G-API: oneVPL (simplification) Add simple decode pipeline

* Add simple decode pipeline & add onevpl namespace

* Address some review comments

* Add compilation guard

2 years agoMerge pull request #20761 from komakai:fix_rect2f
Alexander Alekhin [Tue, 28 Sep 2021 15:01:00 +0000 (15:01 +0000)]
Merge pull request #20761 from komakai:fix_rect2f

2 years agoFix bug in initializers Rect2f(Point2f,Point2f) and Rect2d(Point2d,Point2d)
Giles Payne [Tue, 28 Sep 2021 11:31:07 +0000 (20:31 +0900)]
Fix bug in initializers Rect2f(Point2f,Point2f) and Rect2d(Point2d,Point2d)

2 years agoMerge pull request #20735 from AleksandrPanov:radon_checkerboard
Alexander Panov [Tue, 28 Sep 2021 07:30:07 +0000 (10:30 +0300)]
Merge pull request #20735 from AleksandrPanov:radon_checkerboard

generate radon checkerboard

* added _make_round_rect

* added round rect to make_checkerboard_pattern

* added markers

* update docs

* removed links to findChessboardCornersSB() and added checks to markers

2 years agoMerge pull request #20290 from wjj19950828:add_paddle_humanseg_demo
WJJ1995 [Mon, 27 Sep 2021 21:59:09 +0000 (05:59 +0800)]
Merge pull request #20290 from wjj19950828:add_paddle_humanseg_demo

Add paddle humanseg demo

* fixed onnx resize op bug

* add humanseg demo for PaddlePaddle sample

* update README.md and flake8 format

* update func name

* update README.md for enviroment setup

* update README.md in the way install paddle2onnx

* update README.md

* update README.md

* add paddleseg in requirements.txt

* deal with comments

* replace picture

2 years agoMerge pull request #20558 from alalek:python_cv_mat
Alexander Alekhin [Sun, 26 Sep 2021 17:40:54 +0000 (17:40 +0000)]
Merge pull request #20558 from alalek:python_cv_mat

2 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Sat, 25 Sep 2021 17:50:00 +0000 (17:50 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

2 years agoMerge pull request #20712 from Nicholas-Ho-arm:3.4_RowVec_8u32f
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()

2 years agoMerge pull request #20636 from thezane:recoverPoseFromDifferentCameras
thezane [Sat, 25 Sep 2021 17:42:12 +0000 (13:42 -0400)]
Merge pull request #20636 from thezane:recoverPoseFromDifferentCameras

Recover pose from different cameras (version 2)

* add recoverPose for two different cameras

* Address review comments from original PR

* Address new review comments

* Rename private api

Co-authored-by: tompollok <tom.pollok@gmail.com>
Co-authored-by: Zane <zane.huang@mail.utoronto.ca>
2 years agoMerge pull request #20746 from easonycwang:easonycwang/inpaint_perf_opt
Alexander Alekhin [Fri, 24 Sep 2021 17:38:56 +0000 (17:38 +0000)]
Merge pull request #20746 from easonycwang:easonycwang/inpaint_perf_opt

2 years agoTile:
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

2 years agoMerge pull request #20747 from rgarnov:rg/desync_rmats_and_media
Alexander Alekhin [Fri, 24 Sep 2021 13:27:15 +0000 (13:27 +0000)]
Merge pull request #20747 from rgarnov:rg/desync_rmats_and_media

2 years agoAdded desync RMats and MediaFrames support
Ruslan Garnov [Fri, 24 Sep 2021 11:25:57 +0000 (14:25 +0300)]
Added desync RMats and MediaFrames support

2 years agoMerge pull request #20742 from UnaNancyOwen:fix_text_detection
Alexander Alekhin [Fri, 24 Sep 2021 10:56:22 +0000 (10:56 +0000)]
Merge pull request #20742 from UnaNancyOwen:fix_text_detection

2 years agofix cast in text detection sample
Tsukasa Sugiura [Fri, 24 Sep 2021 06:35:42 +0000 (15:35 +0900)]
fix cast in text detection sample

2 years agoMerge pull request #20705 from TolyaTalamanov:at/handle-reshape-in-gexecutor
Anatoliy Talamanov [Thu, 23 Sep 2021 19:59:40 +0000 (22:59 +0300)]
Merge pull request #20705 from TolyaTalamanov:at/handle-reshape-in-gexecutor

G-API: Handle reshape for generic case in GExecutor

* Handle reshape for generic case for GExecutor

* Add initResources

* Add tests

* Refactor reshape method

2 years agoMerge pull request #20727 from sivanov-work:merge_vpl_accel_impl
Sergey Ivanov [Thu, 23 Sep 2021 11:34:30 +0000 (14:34 +0300)]
Merge pull request #20727 from sivanov-work:merge_vpl_accel_impl

G-API: oneVPL (simplification) added CPU, DX11(fallback CPU) accels & surface pool

* Add CPU, DX11(fallback CPU) accels & surface pool

* Fix build for surface_pool

* Apply some comments

* Fix indentation

2 years agoMerge pull request #19554 from amirtu:OCV-215_cvtColorTwoPlane_wrong_output_when_Y_Pl...
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>
2 years agoMerge pull request #20682 from rogday:min
rogday [Wed, 22 Sep 2021 12:17:37 +0000 (15:17 +0300)]
Merge pull request #20682 from rogday:min

* Add Min layer to CPU, OpenCL, Halide, Inference Engine, NGraph and CUDA

* fix indentation

* add min to fusion and halide tests; fix doc

2 years agoMerge pull request #20729 from MikaelUrankar:3.4
Alexander Alekhin [Tue, 21 Sep 2021 22:30:49 +0000 (22:30 +0000)]
Merge pull request #20729 from MikaelUrankar:3.4

2 years agoDetect FP16 on FreeBSD aarch64
mikael [Tue, 21 Sep 2021 17:46:33 +0000 (19:46 +0200)]
Detect FP16 on FreeBSD aarch64

2 years agoMerge pull request #20716 from komakai:fix_ios_macos_put_get
Alexander Alekhin [Tue, 21 Sep 2021 15:31:35 +0000 (15:31 +0000)]
Merge pull request #20716 from komakai:fix_ios_macos_put_get

2 years agoMerge pull request #20713 from SamFC10:unsqueeze-opset13
Alexander Alekhin [Tue, 21 Sep 2021 15:27:48 +0000 (15:27 +0000)]
Merge pull request #20713 from SamFC10:unsqueeze-opset13

2 years agopython: cv.Mat wrapper over numpy.ndarray
Alexander Alekhin [Sun, 15 Aug 2021 20:33:06 +0000 (20:33 +0000)]
python: cv.Mat wrapper over numpy.ndarray

2 years agoFix put/get functions for non-contiguous Mat on iOS/macOS
Giles Payne [Mon, 20 Sep 2021 13:44:13 +0000 (22:44 +0900)]
Fix put/get functions for non-contiguous Mat on iOS/macOS

2 years agoMerge pull request #20601 from sivanov-work:surf_bk_test
Sergey Ivanov [Mon, 20 Sep 2021 13:28:32 +0000 (16:28 +0300)]
Merge pull request #20601 from sivanov-work:surf_bk_test

G-API: oneVPL (simplification) added surface & frame adapter

* added surface & frame adapter

* Add FrameAdapter unut tests

* Fix compilation after rebase

* Fix compilation tests

* Apply some review comments

* Fix compile warning

* Revert back CV_Func usage

* Apply some comments

2 years agoMerge pull request #20611 from VadimLevin:dev/vlevin/pure-python-modules
Vadim Levin [Sat, 18 Sep 2021 07:02:55 +0000 (10:02 +0300)]
Merge pull request #20611 from VadimLevin:dev/vlevin/pure-python-modules

* feat: OpenCV extension with pure Python modules

* feat: cv2 is now a Python package instead of extension module

Python package cv2 now can handle both Python and C extension modules
properly without additional "subfolders" like "_extra_py_code".

* feat: can call native function from its reimplementation in Python

2 years agofix for unsqueeze opset version 13
SamFC10 [Fri, 17 Sep 2021 12:10:57 +0000 (17:40 +0530)]
fix for unsqueeze opset version 13

2 years agoMerge pull request #20699 from alalek:dnn_perf_update_convolution_tests
Alexander Alekhin [Thu, 16 Sep 2021 17:11:32 +0000 (17:11 +0000)]
Merge pull request #20699 from alalek:dnn_perf_update_convolution_tests

2 years agoMerge pull request #20361 from r0hit2005:master
Rohit Sutradhar [Wed, 15 Sep 2021 16:50:49 +0000 (22:20 +0530)]
Merge pull request #20361 from r0hit2005:master

Tutorial for parallel_for_ and Universal Intrinsic (GSoC '21)

* New parallel_for tutorial

* Universal Intrinsics Draft Tutorial

* Added draft of universal intrinsic tutorial

* * Added final markdown for parallel_for_new
* Added first half of universal intrinsic tutorial
* Fixed warnings in documentation and sample code for parallel_for_new
tutorial
* Restored original parallel_for_ tutorial and table_of_content_core
* Minor changes

* Added demonstration of 1-D vectorized convolution

* * Added 2-D convolution implementation and tutorial
* Minor changes in vectorized implementation of 1-D and 2-D convolution

* Minor changes to univ_intrin tutorial. Added new tutorials to the table of contents

* Minor changes

* Removed variable sized array initializations

* Fixed conversion warnings

* Added doxygen references, minor fixes

* Added jpg image for parallel_for_ doc

2 years agoMerge pull request #20671 from rogday:yolov4x-mish
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>
2 years agoMerge pull request #20700 from alalek:cmake_fix_handling_ie_version
Alexander Alekhin [Tue, 14 Sep 2021 17:17:53 +0000 (17:17 +0000)]
Merge pull request #20700 from alalek:cmake_fix_handling_ie_version

2 years agoMerge pull request #20695 from YashasSamaga:cuda4dnn-fix-padding-effrank
Alexander Alekhin [Tue, 14 Sep 2021 11:46:06 +0000 (11:46 +0000)]
Merge pull request #20695 from YashasSamaga:cuda4dnn-fix-padding-effrank

2 years agoMerge pull request #20692 from sturkmen72:update_convexhull_cpp
Alexander Alekhin [Tue, 14 Sep 2021 08:59:35 +0000 (08:59 +0000)]
Merge pull request #20692 from sturkmen72:update_convexhull_cpp

2 years agocmake: fix handling of INF_ENGINE_RELEASE
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

2 years agoMerge pull request #20676 from AleksandrPanov:delete_createConvexHull_convertTo
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()

2 years agofix effrank assert to allow input effrank <= output effrank
YashasSamaga [Mon, 13 Sep 2021 15:14:33 +0000 (20:44 +0530)]
fix effrank assert to allow input effrank <= output effrank

2 years agoMerge pull request #20693 from alalek:backport_merge34_fix
Alexander Alekhin [Sun, 12 Sep 2021 11:09:51 +0000 (11:09 +0000)]
Merge pull request #20693 from alalek:backport_merge34_fix

2 years agodnn(onnx): fix format specifier
Alexander Alekhin [Sat, 11 Sep 2021 22:26:52 +0000 (22:26 +0000)]
dnn(onnx): fix format specifier

2 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Sat, 11 Sep 2021 16:32:13 +0000 (16:32 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

2 years agoUpdate convexhull.cpp
Suleyman TURKMEN [Sat, 11 Sep 2021 19:58:45 +0000 (22:58 +0300)]
Update convexhull.cpp

2 years agoMerge pull request #20690 from alalek:build_opencv_winpack_dldt_2021.4.1
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

2 years agoMerge pull request #20687 from alalek:core_ocl_fix_intel_gemm
Alexander Alekhin [Sat, 11 Sep 2021 16:26:25 +0000 (16:26 +0000)]
Merge pull request #20687 from alalek:core_ocl_fix_intel_gemm

2 years agoMerge pull request #20686 from zihaomu:tf_biasadd_bug
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

2 years agoBiasAdd could load Const from second place.
Zihao Mu [Fri, 10 Sep 2021 10:15:22 +0000 (18:15 +0800)]
BiasAdd could load Const from second place.

2 years agobuild: winpack_dldt with dldt 2021.4.1
Alexander Alekhin [Fri, 10 Sep 2021 20:58:37 +0000 (20:58 +0000)]
build: winpack_dldt with dldt 2021.4.1

2 years agoMerge pull request #20689 from diablodale:fix20613-selectocldevice
Alexander Alekhin [Fri, 10 Sep 2021 22:26:36 +0000 (22:26 +0000)]
Merge pull request #20689 from diablodale:fix20613-selectocldevice

2 years agofix opencv/opencv#20613
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

2 years agodnn(perf): update convolution tests
Alexander Alekhin [Fri, 10 Sep 2021 12:42:28 +0000 (12:42 +0000)]
dnn(perf): update convolution tests

2 years agocore(ocl): buffer bounds in intelblas_gemm_buffer_NT
Alexander Alekhin [Tue, 7 Sep 2021 04:39:28 +0000 (04:39 +0000)]
core(ocl): buffer bounds in intelblas_gemm_buffer_NT

2 years agoMerge pull request #20670 from alalek:core_ocl_fix_intel_gpu_gemm_requirements
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

2 years agoMerge pull request #20661 from alalek:dnn_ocl_fix_gemm_like_kernel
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

2 years agoMerge pull request #20674 from rogday:prelu_slope
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()

2 years agoMerge pull request #20675 from diablodale:fix2-20544
Alexander Alekhin [Thu, 9 Sep 2021 21:35:02 +0000 (21:35 +0000)]
Merge pull request #20675 from diablodale:fix2-20544

2 years agoMerge pull request #20591 from fortemSteve:ffmpeg_get_stream_open_time
fortemSteve [Thu, 9 Sep 2021 21:23:49 +0000 (15:23 -0600)]
Merge pull request #20591 from fortemSteve:ffmpeg_get_stream_open_time

Add CAP_PROP_STREAM_OPEN_TIME

* Added CAP_PROP_STREAM_OPEN_TIME to videoio module - can be used to query the time at which the stream was opened, in seconds since Jan 1 1970 (midnight, UTC). Useful for RTSP and other live video where absolute timestamps are needed. Only applicable to ffmpeg backends

* use nanoseconds instead of seconds to mark the stream open time, and change the cap prop name to CAP_PROP_STREAM_OPEN_TIME_NSEC

* use microseconds for CAP_PROP_STREAM_OPEN_TIME (nanoseconds rolls over too soon, and milliseconds/seconds requires a division)

* fix whitespace issue

2 years agoadd nodiscard to features2d clone funcs
Dale Phurrough [Thu, 9 Sep 2021 13:20:45 +0000 (15:20 +0200)]
add nodiscard to features2d clone funcs

2 years agoMerge pull request #20605 from rogday:split_slice_shenanigans
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

2 years agoMerge pull request #20673 from ilya-lavrenov:print-openvino-information
Ilya Lavrenov [Thu, 9 Sep 2021 07:56:34 +0000 (10:56 +0300)]
Merge pull request #20673 from ilya-lavrenov:print-openvino-information

* Support of OpenVINO interface libraries

* cmake: rename and move ocv_get_imported_target to OpenCVUtils.cmake

2 years agoMerge pull request #20667 from rgonzalezfluendo:rgonzalezfluendo-patch-1
Alexander Alekhin [Wed, 8 Sep 2021 07:26:21 +0000 (07:26 +0000)]
Merge pull request #20667 from rgonzalezfluendo:rgonzalezfluendo-patch-1

2 years agoimgcodecs(doc): Sync imread_ docuemtation with the implemetation.
Ruben Gonzalez [Tue, 7 Sep 2021 10:02:25 +0000 (12:02 +0200)]
imgcodecs(doc): Sync imread_ docuemtation with the implemetation.

Documentation was desynchronized in commit 11eafca3e2a4cbc62f1309d25db0ea3ed9a6ea8e

2 years agodnn(ocl): fix out of bound access in GEMM-like kernels
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

2 years agoMerge pull request #20655 from alalek:dnn_ocl_fix_globalsize
Alexander Alekhin [Mon, 6 Sep 2021 17:20:18 +0000 (17:20 +0000)]
Merge pull request #20655 from alalek:dnn_ocl_fix_globalsize

2 years agoMerge pull request #20657 from zchrissirhcz:upd-doc-for-py_fast
Alexander Alekhin [Mon, 6 Sep 2021 11:31:35 +0000 (11:31 +0000)]
Merge pull request #20657 from zchrissirhcz:upd-doc-for-py_fast

2 years agodocs: fix image path for py_fast doc
Zhuo Zhang [Mon, 6 Sep 2021 04:03:59 +0000 (12:03 +0800)]
docs: fix image path for py_fast doc

2 years agodnn(ocl): fix automatic globalsize adjusting
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

2 years agoMerge pull request #20652 from alalek:ocl_debug
Alexander Alekhin [Sat, 4 Sep 2021 18:23:09 +0000 (18:23 +0000)]
Merge pull request #20652 from alalek:ocl_debug

2 years agoMerge pull request #20651 from alalek:issue_18361
Alexander Alekhin [Sat, 4 Sep 2021 18:22:12 +0000 (18:22 +0000)]
Merge pull request #20651 from alalek:issue_18361

2 years agoMerge pull request #20648 from alalek:issue_20615
Alexander Alekhin [Sat, 4 Sep 2021 18:21:58 +0000 (18:21 +0000)]
Merge pull request #20648 from alalek:issue_20615

2 years agodnn(ocl): avoid out of buffer access in copyWeightsSwizzled
Alexander Alekhin [Fri, 3 Sep 2021 02:38:53 +0000 (02:38 +0000)]
dnn(ocl): avoid out of buffer access in copyWeightsSwizzled

2 years agocore(ocl): debug capabilities
Alexander Alekhin [Sat, 4 Sep 2021 01:34:02 +0000 (01:34 +0000)]
core(ocl): debug capabilities

2 years agodnn(ocl): fix buffer offsets in IDLF kernel
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

2 years agoMerge pull request #20647 from rogday:resize_concat_optimization
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

2 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Thu, 2 Sep 2021 15:24:04 +0000 (15:24 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

2 years agoMerge pull request #20646 from VadimLevin:dev/vlevin/fix-vector-conversion
Alexander Alekhin [Thu, 2 Sep 2021 09:30:56 +0000 (09:30 +0000)]
Merge pull request #20646 from VadimLevin:dev/vlevin/fix-vector-conversion

2 years agofix: NumPy array allocation error message in vector conversion
Vadim Levin [Thu, 2 Sep 2021 07:32:17 +0000 (10:32 +0300)]
fix: NumPy array allocation error message in vector conversion

2 years agoMerge pull request #20573 from rogday:onnx_scale_fix
Alexander Alekhin [Wed, 1 Sep 2021 14:09:17 +0000 (14:09 +0000)]
Merge pull request #20573 from rogday:onnx_scale_fix

2 years agoMerge pull request #20618 from VadimLevin:dev/vlevin/fix-vector-conversion
Alexander Alekhin [Wed, 1 Sep 2021 10:52:37 +0000 (10:52 +0000)]
Merge pull request #20618 from VadimLevin:dev/vlevin/fix-vector-conversion

2 years agoMerge pull request #20511 from wjj19950828:add_humanseg_support_0806
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

2 years agofeat: update conversion logic for `std::vector<T>` in Python bindings
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.

2 years agoMerge pull request #20635 from alalek:issue_20559
Alexander Alekhin [Tue, 31 Aug 2021 14:42:20 +0000 (14:42 +0000)]
Merge pull request #20635 from alalek:issue_20559

2 years agodnn(ocl): drop CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE check
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

2 years agoMerge pull request #20622 from diablodale:fix20544-nodiscard
Alexander Alekhin [Mon, 30 Aug 2021 18:09:51 +0000 (18:09 +0000)]
Merge pull request #20622 from diablodale:fix20544-nodiscard

2 years agoMerge pull request #20633 from alalek:ocl_dumpValue_handle_null
Alexander Alekhin [Mon, 30 Aug 2021 13:39:44 +0000 (13:39 +0000)]
Merge pull request #20633 from alalek:ocl_dumpValue_handle_null

2 years agocore(ocl): handle NULL in dumpValue() debug call
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

2 years agoMerge pull request #20628 from alalek:fix_build_warnings_4.x
Alexander Alekhin [Mon, 30 Aug 2021 08:26:51 +0000 (08:26 +0000)]
Merge pull request #20628 from alalek:fix_build_warnings_4.x

2 years agobuild: eliminate build warnings
Alexander Alekhin [Sun, 29 Aug 2021 09:17:44 +0000 (09:17 +0000)]
build: eliminate build warnings

2 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Sat, 28 Aug 2021 21:30:28 +0000 (21:30 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

2 years agoMerge pull request #20625 from alalek:fix_msvc_warnings
Alexander Alekhin [Sat, 28 Aug 2021 21:24:02 +0000 (21:24 +0000)]
Merge pull request #20625 from alalek:fix_msvc_warnings

2 years agofix opencv/opencv#20544 nodiscard for msvc/gcc
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

2 years agobuild: eliminate build warnings
Alexander Alekhin [Sat, 28 Aug 2021 17:11:26 +0000 (17:11 +0000)]
build: eliminate build warnings

2 years agoMerge pull request #20623 from alalek:fix_java_byte
Alexander Alekhin [Sat, 28 Aug 2021 13:23:33 +0000 (13:23 +0000)]
Merge pull request #20623 from alalek:fix_java_byte

2 years agojava(test): avoid deprecation warning
Alexander Alekhin [Sat, 28 Aug 2021 01:28:34 +0000 (01:28 +0000)]
java(test): avoid deprecation warning

- 'new Byte' => 'Byte.valueOf'

2 years agoMerge pull request #20609 from vrabaud:3.4
Alexander Alekhin [Fri, 27 Aug 2021 23:42:24 +0000 (23:42 +0000)]
Merge pull request #20609 from vrabaud:3.4

2 years agoDo not use deprecated ReleaseCleared in protobuf library.
Vincent Rabaud [Thu, 26 Aug 2021 07:46:25 +0000 (09:46 +0200)]
Do not use deprecated ReleaseCleared in protobuf library.

This is to make code work with protobuf arenas for memory
management (ReleaseCleared is incompatible).
The cleaning of the memory is also simpler.

2 years agoMerge pull request #20598 from hanliutong:rvv-fix
Alexander Alekhin [Thu, 26 Aug 2021 07:28:55 +0000 (07:28 +0000)]
Merge pull request #20598 from hanliutong:rvv-fix

2 years agoMerge pull request #20602 from diablodale:fix20594-refcounts-wiith-exceptions
Alexander Alekhin [Wed, 25 Aug 2021 22:13:43 +0000 (22:13 +0000)]
Merge pull request #20602 from diablodale:fix20594-refcounts-wiith-exceptions

2 years agofix opencv/opencv#20594 - exception handling with refcounts
Dale Phurrough [Tue, 24 Aug 2021 16:56:25 +0000 (18:56 +0200)]
fix opencv/opencv#20594 - exception handling with refcounts

2 years agoadd test case
Dale Phurrough [Tue, 24 Aug 2021 18:06:36 +0000 (20:06 +0200)]
add test case

2 years agoMerge pull request #20597 from alalek:issue_20592
Alexander Alekhin [Tue, 24 Aug 2021 19:30:38 +0000 (19:30 +0000)]
Merge pull request #20597 from alalek:issue_20592