platform/upstream/opencv.git
3 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Wed, 9 Dec 2020 18:09:00 +0000 (18:09 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

3 years agoMerge pull request #18712 from mshabunin:doc-update-2
Alexander Alekhin [Wed, 9 Dec 2020 18:05:17 +0000 (21:05 +0300)]
Merge pull request #18712 from mshabunin:doc-update-2

3 years agoMerge pull request #19061 from alalek:dnn_load_face_detector_with_external_protobuf
Alexander Alekhin [Wed, 9 Dec 2020 18:03:52 +0000 (18:03 +0000)]
Merge pull request #19061 from alalek:dnn_load_face_detector_with_external_protobuf

3 years agoMerge pull request #19060 from alalek:issue_18097
Alexander Alekhin [Wed, 9 Dec 2020 18:02:41 +0000 (18:02 +0000)]
Merge pull request #19060 from alalek:issue_18097

3 years agoMerge pull request #19059 from alalek:fixup_19000
Alexander Alekhin [Wed, 9 Dec 2020 18:01:03 +0000 (18:01 +0000)]
Merge pull request #19059 from alalek:fixup_19000

3 years agoMerge pull request #19002 from TolyaTalamanov:at/infer_gframe
Anatoliy Talamanov [Wed, 9 Dec 2020 14:00:56 +0000 (17:00 +0300)]
Merge pull request #19002 from TolyaTalamanov:at/infer_gframe

[G-API] Support GFrame for infer

* GInfer(GFrame), currently broken

* Fixed (API only)

* Support GFrame in GIEBackend

* Fix comments to review

* Fix comments to review

* Fix doxygen

* Fix building with different IE versions

* Fix warning on MacOS

Co-authored-by: Dmitry Matveev <dmitry.matveev@intel.com>
Co-authored-by: Smirnov Alexey <alexey.smirnov@intel.com>
3 years agodnn(caffe): add DetectionOutputParameter.clip to .proto file
Alexander Alekhin [Wed, 9 Dec 2020 05:12:18 +0000 (05:12 +0000)]
dnn(caffe): add DetectionOutputParameter.clip to .proto file

- allow to load opencv_face_detector with external unpatched protobuf

3 years agojs(wasm): use fallback on missing intrinsics in Emscripten 2.0.0+
Alexander Alekhin [Wed, 9 Dec 2020 03:58:36 +0000 (03:58 +0000)]
js(wasm): use fallback on missing intrinsics in Emscripten 2.0.0+

3 years agoMerge pull request #18996 from LupusSanctus:am/dnn_bilinear_resize
Alexander Alekhin [Tue, 8 Dec 2020 21:09:41 +0000 (21:09 +0000)]
Merge pull request #18996 from LupusSanctus:am/dnn_bilinear_resize

3 years agoAdded TF resize_bilinear behaviour alignment
Anastasia Murzova [Wed, 2 Dec 2020 22:48:18 +0000 (01:48 +0300)]
Added TF resize_bilinear behaviour alignment

Fixes OpenCV issue #18721

3 years agocmake: fix handling of wrappers dependencies
Alexander Alekhin [Tue, 8 Dec 2020 19:10:04 +0000 (19:10 +0000)]
cmake: fix handling of wrappers dependencies

3 years agoMerge pull request #19052 from diablodale:fix18888-opencl-doc
Alexander Alekhin [Tue, 8 Dec 2020 18:03:19 +0000 (18:03 +0000)]
Merge pull request #19052 from diablodale:fix18888-opencl-doc

3 years agoMerge pull request #18969 from OrestChura:oc/fix_notes_returns
Orest Chura [Tue, 8 Dec 2020 15:44:33 +0000 (18:44 +0300)]
Merge pull request #18969 from OrestChura:oc/fix_notes_returns

[G-API] Multiple return/note fix

* Fix doxygen:
 - multiple return
 - multiple notes

* Addressing comments
 - divide description of split(merge)3/4

3 years agoclarify opencl execution context doc
Dale Phurrough [Tue, 8 Dec 2020 15:08:53 +0000 (16:08 +0100)]
clarify opencl execution context doc

- fix opencv/opencv#18888

3 years agoMerge pull request #19046 from alalek:issue_16861
Alexander Alekhin [Tue, 8 Dec 2020 11:34:20 +0000 (11:34 +0000)]
Merge pull request #19046 from alalek:issue_16861

3 years agoMerge pull request #19044 from OrestChura:oc/fix_coverity_warn_kmeans
Alexander Alekhin [Tue, 8 Dec 2020 10:31:31 +0000 (10:31 +0000)]
Merge pull request #19044 from OrestChura:oc/fix_coverity_warn_kmeans

3 years agoMerge pull request #19029 from diablodale:fix19004-memthreadstart
Dale Phurrough [Tue, 8 Dec 2020 10:05:14 +0000 (11:05 +0100)]
Merge pull request #19029 from diablodale:fix19004-memthreadstart

add thread-safe startup of fastMalloc and fastFree

* add perf test core memory allocation

* fix threading in isAlignedAllocationEnabled()

* tweaks requested by maintainer

3 years agoandroid: use protected fields in JavaCamera2View
Alexander Alekhin [Tue, 8 Dec 2020 05:18:21 +0000 (05:18 +0000)]
android: use protected fields in JavaCamera2View

3 years agoMoved G-API output to the first place of arguments in comparison functions
OrestChura [Mon, 7 Dec 2020 23:44:01 +0000 (02:44 +0300)]
Moved G-API output to the first place of arguments in comparison functions

3 years agoMerge pull request #19041 from alalek:issue_19025
Alexander Alekhin [Mon, 7 Dec 2020 22:31:53 +0000 (22:31 +0000)]
Merge pull request #19041 from alalek:issue_19025

3 years agoMerge pull request #19035 from berak:fix_dnn_net_dump_colors
Alexander Alekhin [Mon, 7 Dec 2020 22:11:49 +0000 (22:11 +0000)]
Merge pull request #19035 from berak:fix_dnn_net_dump_colors

3 years agovideoio(test): skip GStreamer in 'frame_timestamp' tests
Alexander Alekhin [Mon, 7 Dec 2020 21:18:47 +0000 (21:18 +0000)]
videoio(test): skip GStreamer in 'frame_timestamp' tests

- CAP_PROP_POS_MSEC is not reliable

3 years agoMerge pull request #19023 from alalek:core_update_allocator_stats_type
Alexander Alekhin [Mon, 7 Dec 2020 20:41:37 +0000 (20:41 +0000)]
Merge pull request #19023 from alalek:core_update_allocator_stats_type

3 years agoMerge pull request #19019 from alalek:cmake_avoid_excessive_trace_dump
Alexander Alekhin [Mon, 7 Dec 2020 20:40:56 +0000 (20:40 +0000)]
Merge pull request #19019 from alalek:cmake_avoid_excessive_trace_dump

3 years agoMerge pull request #19015 from alalek:dnn_use_fma
Alexander Alekhin [Mon, 7 Dec 2020 20:40:21 +0000 (20:40 +0000)]
Merge pull request #19015 from alalek:dnn_use_fma

3 years agodnn: add another color to Net::Impl::dump()
berak [Mon, 7 Dec 2020 16:23:04 +0000 (17:23 +0100)]
dnn: add another color to Net::Impl::dump()

3 years agoAdded TOC to most of tutorials
Maksim Shabunin [Mon, 7 Dec 2020 16:13:54 +0000 (19:13 +0300)]
Added TOC to most of tutorials

3 years agoMerge pull request #19021 from alalek:4.x_build_warnings_gcc_4.8.5
Alexander Alekhin [Sun, 6 Dec 2020 17:22:45 +0000 (17:22 +0000)]
Merge pull request #19021 from alalek:4.x_build_warnings_gcc_4.8.5

3 years agoMerge pull request #19022 from alalek:cmake_avoid_duplication_of_winit_self
Alexander Alekhin [Sun, 6 Dec 2020 16:14:25 +0000 (16:14 +0000)]
Merge pull request #19022 from alalek:cmake_avoid_duplication_of_winit_self

3 years agoMerge pull request #18535 from joshdoe:gray16_gstreamer_writing
joshdoe [Sat, 5 Dec 2020 21:28:07 +0000 (16:28 -0500)]
Merge pull request #18535 from joshdoe:gray16_gstreamer_writing

Add CV_16UC1/GRAY16_LE support to GStreamer backend for VideoWriter

* videoio(backend): add Writer_open_with_params to plugin API

This will allow arbitrary parameters to be passed to plugin backends

* videoio(gstreamer): add GRAY16_LE/CV_16UC1 writing support to GStreamer

This introduces a new property VIDEOWRITER_PROP_DEPTH, which defaults to
CV_8U, but for GStreamer can be set to CV_16U.

Also, fix another test to not fail if plugin isn't found, copying logic
from the read_write test.

* videoio(plugin): fix handling plugins with previous API level

* videoio: coding style

* fix warning

3 years agocore: update handling of allocator stats type
Alexander Alekhin [Sat, 5 Dec 2020 20:41:25 +0000 (20:41 +0000)]
core: update handling of allocator stats type

- don't use OPENCV_ALLOCATOR_STATS_COUNTER_TYPE definition in non C++11 builds
- don't use with MinGW

3 years agocmake: avoid duplication of -Winit-self flag
Alexander Alekhin [Sat, 5 Dec 2020 20:18:02 +0000 (20:18 +0000)]
cmake: avoid duplication of -Winit-self flag

3 years agobuild warnings
Alexander Alekhin [Sat, 5 Dec 2020 19:40:04 +0000 (19:40 +0000)]
build warnings

- GCC 4.8.5 / CentOS 7

3 years agoMerge pull request #19018 from alalek:issue_19016
Alexander Alekhin [Sat, 5 Dec 2020 19:59:22 +0000 (19:59 +0000)]
Merge pull request #19018 from alalek:issue_19016

3 years agocmake: avoid excessive output from cmake --trace/--trace-expand
Alexander Alekhin [Sat, 5 Dec 2020 13:28:20 +0000 (13:28 +0000)]
cmake: avoid excessive output from cmake --trace/--trace-expand

- `cmake . --trace-expand -DCMAKE_TRACE_MODE=1`

3 years agosamples: replace regex
Alexander Alekhin [Sat, 5 Dec 2020 12:50:37 +0000 (12:50 +0000)]
samples: replace regex

- GCC 4.8.5 doesn't support regex

3 years agodnn: prefer to use v_fma() instead of v_c += v_a * v_b
Alexander Alekhin [Sat, 5 Dec 2020 11:51:03 +0000 (11:51 +0000)]
dnn: prefer to use v_fma() instead of v_c += v_a * v_b

3 years agodoc: tutorial refactor
Maksim Shabunin [Fri, 4 Dec 2020 22:46:00 +0000 (01:46 +0300)]
doc: tutorial refactor

3 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Fri, 4 Dec 2020 18:25:32 +0000 (18:25 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

3 years agoMerge pull request #18955 from alalek:test_debug_flag
Alexander Alekhin [Fri, 4 Dec 2020 18:09:59 +0000 (18:09 +0000)]
Merge pull request #18955 from alalek:test_debug_flag

3 years agoMerge pull request #17570 from HannibalAPE:text_det_recog_demo
Wenqing Zhang [Thu, 3 Dec 2020 18:47:40 +0000 (02:47 +0800)]
Merge pull request #17570 from HannibalAPE:text_det_recog_demo

[GSoC] High Level API and Samples for Scene Text Detection and Recognition

* APIs and samples for scene text detection and recognition

* update APIs and tutorial for Text Detection and Recognition

* API updates:
(1) put decodeType into struct Voc
(2) optimize the post-processing of DB

* sample update:
(1) add transformation into scene_text_spotting.cpp
(2) modify text_detection.cpp with API update

* update tutorial

* simplify text recognition API
update tutorial

* update impl usage in recognize() and detect()

* dnn: refactoring public API of TextRecognitionModel/TextDetectionModel

* update provided models
update opencv.bib

* dnn: adjust text rectangle angle

* remove points ordering operation in model.cpp

* update gts of DB test in test_model.cpp

* dnn: ensure to keep text rectangle angle

- avoid 90/180 degree turns

* dnn(text): use quadrangle result in TextDetectionModel API

* dnn: update Text Detection API
(1) keep points' order consistent with (bl, tl, tr, br) in unclip
(2) update contourScore with boundingRect

3 years agoMerge pull request #18965 from alalek:cmake_gen_js_code
Alexander Alekhin [Thu, 3 Dec 2020 18:10:30 +0000 (18:10 +0000)]
Merge pull request #18965 from alalek:cmake_gen_js_code

3 years agoMerge pull request #19000 from alalek:cmake_fix_order_of_bindings_generators
Alexander Alekhin [Thu, 3 Dec 2020 18:08:40 +0000 (18:08 +0000)]
Merge pull request #19000 from alalek:cmake_fix_order_of_bindings_generators

3 years agocmake(js): update js targets
Alexander Alekhin [Mon, 30 Nov 2020 03:41:21 +0000 (03:41 +0000)]
cmake(js): update js targets

- unconditional js bindings source code generation
- use common name for tests: opencv_test_js

3 years agoMerge pull request #18997 from alalek:disable_github_action_workflow
Alexander Alekhin [Thu, 3 Dec 2020 13:55:35 +0000 (16:55 +0300)]
Merge pull request #18997 from alalek:disable_github_action_workflow

3 years agoMerge pull request #18993 from alalek:issue_18984
Alexander Alekhin [Thu, 3 Dec 2020 13:55:07 +0000 (13:55 +0000)]
Merge pull request #18993 from alalek:issue_18984

3 years agocmake: fix processing order of <wrapper>_bindings_generator
Alexander Alekhin [Thu, 3 Dec 2020 11:59:06 +0000 (11:59 +0000)]
cmake: fix processing order of <wrapper>_bindings_generator

- ensure that wrapped modules are already processed

3 years agoMerge pull request #18998 from upupming:patch-1
Alexander Alekhin [Thu, 3 Dec 2020 10:59:59 +0000 (10:59 +0000)]
Merge pull request #18998 from upupming:patch-1

3 years agoMerge pull request #18992 from vertexcite:patch-1
Alexander Alekhin [Thu, 3 Dec 2020 10:58:47 +0000 (10:58 +0000)]
Merge pull request #18992 from vertexcite:patch-1

3 years agoMerge pull request #18966 from Staticity:add_live_timestamps_to_msmf
Alexander Alekhin [Thu, 3 Dec 2020 10:57:25 +0000 (10:57 +0000)]
Merge pull request #18966 from Staticity:add_live_timestamps_to_msmf

3 years agoFixed minor typo "poins" in documentation page
Randall Britten [Wed, 2 Dec 2020 01:47:37 +0000 (14:47 +1300)]
Fixed minor typo "poins" in documentation page

3 years agofix: typo
Yiming Li [Thu, 3 Dec 2020 07:35:52 +0000 (15:35 +0800)]
fix: typo

3 years agogithub(actions): manual trigger for arm64-build-checks.yml
Alexander Alekhin [Thu, 3 Dec 2020 02:03:11 +0000 (02:03 +0000)]
github(actions): manual trigger for arm64-build-checks.yml

3 years agoMerge pull request #18994 from alalek:umat_drop_unavailable_methods
Alexander Alekhin [Wed, 2 Dec 2020 22:54:47 +0000 (22:54 +0000)]
Merge pull request #18994 from alalek:umat_drop_unavailable_methods

3 years agoAdd Timestamps to MSMF Video Capture by index
Jaime Rivera [Mon, 30 Nov 2020 05:17:24 +0000 (21:17 -0800)]
Add Timestamps to MSMF Video Capture by index

Enable frame timestamp tests for MSMF

Add functional test for camera live timestamps

Remove trailing whitespace

Add timestamp test to all functional tests. Protect div by 0

Add Timestamps to MSMF Video Capture by index

3 years agoMerge pull request #18911 from chargerKong:quat
Vadim Pisarevsky [Wed, 2 Dec 2020 19:14:47 +0000 (19:14 +0000)]
Merge pull request #18911 from chargerKong:quat

3 years agoMerge pull request #18986 from alalek:fix_ipp_17453_2
Alexander Alekhin [Wed, 2 Dec 2020 19:09:24 +0000 (19:09 +0000)]
Merge pull request #18986 from alalek:fix_ipp_17453_2

3 years agoMerge pull request #18831 from rjiejie:master-opt@pipeline
Alexander Alekhin [Wed, 2 Dec 2020 19:07:38 +0000 (19:07 +0000)]
Merge pull request #18831 from rjiejie:master-opt@pipeline

3 years agoMerge pull request #18977 from Rightpoint:objc-collision-fix
Alexander Alekhin [Wed, 2 Dec 2020 19:06:57 +0000 (19:06 +0000)]
Merge pull request #18977 from Rightpoint:objc-collision-fix

3 years agoMerge pull request #18462 from joy2myself:riscv_toolchian
Vadim Pisarevsky [Wed, 2 Dec 2020 18:38:16 +0000 (18:38 +0000)]
Merge pull request #18462 from joy2myself:riscv_toolchian

3 years agoAdd adding and subtraction operations between a number and a quaternion;
Kong Liangqian [Tue, 24 Nov 2020 10:35:39 +0000 (18:35 +0800)]
Add adding and subtraction operations between a number and a quaternion;
fix a typo;
Add documentation of quaternion operators;
Restrict the type of scalar: the same as quaternion;

3 years agoMerge pull request #18991 from alalek:workaround_12959
Alexander Alekhin [Wed, 2 Dec 2020 17:34:22 +0000 (17:34 +0000)]
Merge pull request #18991 from alalek:workaround_12959

3 years agocore(UMat): drop unavailable methods
Alexander Alekhin [Wed, 2 Dec 2020 15:02:43 +0000 (15:02 +0000)]
core(UMat): drop unavailable methods

3 years agoMerge pull request #18971 from GArik:orbbec
Vadim Pisarevsky [Wed, 2 Dec 2020 13:33:32 +0000 (13:33 +0000)]
Merge pull request #18971 from GArik:orbbec

3 years agoMerge pull request #18228 from joy2myself:rvv
Vadim Pisarevsky [Wed, 2 Dec 2020 13:27:34 +0000 (13:27 +0000)]
Merge pull request #18228 from joy2myself:rvv

3 years agocmake: clean cached INTERNAL variable used for 3rdparty deps
Alexander Alekhin [Wed, 2 Dec 2020 12:34:24 +0000 (12:34 +0000)]
cmake: clean cached INTERNAL variable used for 3rdparty deps

3 years agocore(ipp): workaround getIppTopFeatures() value mismatch
Alexander Alekhin [Wed, 2 Dec 2020 00:21:19 +0000 (00:21 +0000)]
core(ipp): workaround getIppTopFeatures() value mismatch

3 years agoAdded RISC-V backend of universal intrinsics
Zhangyin [Mon, 24 Aug 2020 04:10:42 +0000 (12:10 +0800)]
Added RISC-V backend of universal intrinsics

3 years agoOrbbec tutorial: Sync frames from two streams and process depth & color simultaneously
Igor Murzov [Mon, 23 Nov 2020 11:05:55 +0000 (14:05 +0300)]
Orbbec tutorial: Sync frames from two streams and process depth & color simultaneously

3 years agoObjective-C name clash avoidance
Giles Payne [Wed, 18 Nov 2020 13:06:59 +0000 (22:06 +0900)]
Objective-C name clash avoidance

3 years agoMerge pull request #18981 from anton-potapov:fix_gnet_package_compilation_std_17
Alexander Alekhin [Tue, 1 Dec 2020 17:42:12 +0000 (17:42 +0000)]
Merge pull request #18981 from anton-potapov:fix_gnet_package_compilation_std_17

3 years agocore(ipp): disable SSE4.2 code path in countNonZero()
Alexander Alekhin [Tue, 1 Dec 2020 14:01:42 +0000 (14:01 +0000)]
core(ipp): disable SSE4.2 code path in countNonZero()

3 years agoMerge pull request #18891 from CowKeyMan:NMS_boxes_with_different_labels
Daniel Cauchi [Tue, 1 Dec 2020 13:50:24 +0000 (14:50 +0100)]
Merge pull request #18891 from CowKeyMan:NMS_boxes_with_different_labels

Add option for NMS for boxes with different labels

* DetectionModel impl

* Add option for NMS for boxes with different labels

In the detect function in modules/dnn/include/opencv2/dnn/dnn.hpp, whose implementation can be found at modules/dnn/src/model.cpp, the Non Max Suppression (NMS) is applied only for objects of the same label. Thus, a flag
was added with the purpose to allow developers to choose if they want to keep the default implementation or wether they would like NMS to be applied to all the boxes, regardless of label.

The flag is called nmsDifferentLabels, and is given a default value of false, which applies the current default implementation, thus allowing existing projects to update opencv without disruption

Solves issue opencv#18832

* Change return type of set & Add default constr

* Add assertions due to default constructor

3 years agoMerge pull request #18967 from anton-potapov:reuse_move_through_copy
Alexander Alekhin [Tue, 1 Dec 2020 12:57:06 +0000 (12:57 +0000)]
Merge pull request #18967 from anton-potapov:reuse_move_through_copy

3 years agoMerge pull request #18978 from Rightpoint:testing-ios-deployment-target
Alexander Alekhin [Tue, 1 Dec 2020 12:53:53 +0000 (12:53 +0000)]
Merge pull request #18978 from Rightpoint:testing-ios-deployment-target

3 years agoMerge pull request #18973 from sl-sergei:fix_vulkan_build
Sergei Slashchinin [Tue, 1 Dec 2020 12:52:09 +0000 (15:52 +0300)]
Merge pull request #18973 from sl-sergei:fix_vulkan_build

* Fix build when HAVE_VULKAN is ON

* Fix warnings

3 years agoMerge pull request #18972 from Rightpoint:task/colejd/prevent-existing-xcframework...
Alexander Alekhin [Tue, 1 Dec 2020 12:36:29 +0000 (12:36 +0000)]
Merge pull request #18972 from Rightpoint:task/colejd/prevent-existing-xcframework-error

3 years agoMerge pull request #18982 from anton-potapov:sole_tbb_executor_async_test
Alexander Alekhin [Tue, 1 Dec 2020 12:34:12 +0000 (12:34 +0000)]
Merge pull request #18982 from anton-potapov:sole_tbb_executor_async_test

3 years agoTBB executor for GAPI: fix race consition in Async test
Anton Potapov [Tue, 1 Dec 2020 08:12:36 +0000 (11:12 +0300)]
TBB executor for GAPI: fix race consition in Async test

The test has race condition, which is addressed by the patch.

The race is next:

    Master thread is calling execute (effectively blocked, waiting for
callback to be called)
    "Async" thread picks up the callback
    Call the callback
    Then sets the variables in test
    After call back is called, master thread is unblocked and may check
the variables (set in point 4 by the "async" thread) earlier then they
actually changed

Changes:

    callback should be called as the last step (after flag variables are
    set), as it effectively unblock the master thread

fixes #18974

3 years agoGAPI: fix C++17 compilation errors in GNetPackage (fixes #17385)
Anton Potapov [Tue, 1 Dec 2020 06:34:53 +0000 (09:34 +0300)]
GAPI: fix C++17 compilation errors in GNetPackage (fixes #17385)

- explicitly declared default constructor
- made initilizer_list  constructor to accept the list by copy
   -- as it is  more canonical (and as copying the initializer_list does
not force copy of the list items)
   -- current version anyway does not do what it is intended to

3 years agoBump default IPHONEOS_DEPLOYMENT_TARGET to 9.0
Chris Ballinger [Tue, 1 Dec 2020 01:34:34 +0000 (17:34 -0800)]
Bump default IPHONEOS_DEPLOYMENT_TARGET to 9.0

3 years agoMerge pull request #18968 from asmorkalov:as/cap_prop_frame_msec_test
Alexander Alekhin [Mon, 30 Nov 2020 22:49:54 +0000 (22:49 +0000)]
Merge pull request #18968 from asmorkalov:as/cap_prop_frame_msec_test

3 years agoDelete xcframework if it already exists before building a new one
Jonathan Cole [Mon, 30 Nov 2020 19:10:37 +0000 (14:10 -0500)]
Delete xcframework if it already exists before building a new one

3 years agoMerge pull request #18930 from alalek:issue_18502
Alexander Alekhin [Mon, 30 Nov 2020 18:22:59 +0000 (18:22 +0000)]
Merge pull request #18930 from alalek:issue_18502

3 years agoMerge pull request #18948 from alalek:python_syntax
Alexander Alekhin [Mon, 30 Nov 2020 18:11:43 +0000 (18:11 +0000)]
Merge pull request #18948 from alalek:python_syntax

3 years agoMerge pull request #18674 from anna-khakimova:ak/backgroundSubtractor
Anna Khakimova [Mon, 30 Nov 2020 18:09:42 +0000 (21:09 +0300)]
Merge pull request #18674 from anna-khakimova:ak/backgroundSubtractor

GAPI: New BackgroundSubtractor stateful kernel

* New BackgroundSubtractorMOG2 kernel

* Add BS parameters

3 years agoAdded test for VideoCapture CAP_PROP_FRAME_MSEC option.
Alexander Smorkalov [Mon, 30 Nov 2020 08:54:51 +0000 (11:54 +0300)]
Added test for VideoCapture CAP_PROP_FRAME_MSEC option.

- Suppressed FFMPEG + h264, h265 as it does not pass tests with CI configuration.
- Suppressed MediaFoundation backend as it always returns zero for now.

3 years agoGAPI: reuse copy_through_move_t in the gasync.cpp file
Anton Potapov [Mon, 30 Nov 2020 06:40:42 +0000 (09:40 +0300)]
GAPI: reuse copy_through_move_t in the gasync.cpp file

3 years agoMerge pull request #18857 from OrestChura:oc/kmeans
Orest Chura [Mon, 30 Nov 2020 13:18:43 +0000 (16:18 +0300)]
Merge pull request #18857 from OrestChura:oc/kmeans

[G-API]: kmeans() Standard Kernel Implementation

* cv::gapi::kmeans kernel implementation
 - 4 overloads:
    - standard GMat - for any dimensionality
    - GMat without bestLabels initialization
    - GArray<Point2f> - for 2D
    - GArray<Point3f> - for 3D
 - Accuracy tests:
   - for every input - 2 tests
   1) without initializing. In this case, no comparison with cv::kmeans is done as kmeans uses random auto-initialization
   2) with initialization
   - in both cases, only 1 attempt is done as after first attempt kmeans initializes bestLabels randomly

* Addressing comments
 - bestLabels is returned to its original place among parameters
 - checkVector and isPointsVector functions are merged into one, shared between core.hpp & imgproc.hpp by placing it into gmat.hpp (and implementation - to gmat.cpp)
 - typos corrected

* addressing comments
 - unified names in tests
 - const added
 - typos

* Addressing comments
 - fixed the doc note
 - ddepth -> expectedDepth, `< 0 ` -> `== -1`

* Fix unsupported cases of input Mat
 - supported: multiple channels, reversed width
 - added test cases for those
 - added notes in docs
 - refactored checkVector to return dimentionality along with quantity

* Addressing comments
 - makes chackVector smaller and (maybe) clearer

* Addressing comments

* Addressing comments
 - cv::checkVector -> cv::gapi::detail

* Addressing comments
 - Changed checkVector: returns bool, quantity & dimensionality as references

* Addressing comments
 - Polishing checkVector
 - FIXME added

* Addressing discussion
 - checkVector: added overload, separate two different functionalities
 - depth assert - out of the function

* Addressing comments
 - quantity -> amount, dimensionality -> dim
 - Fix typos

* Addressing comments
 - fix docs
 - use 2 variable's definitions instead of one (for all non-trivial variables)

3 years agoMerge pull request #17851 from anton-potapov:sole_tbb_executor
Anton Potapov [Mon, 30 Nov 2020 13:15:13 +0000 (16:15 +0300)]
Merge pull request #17851 from anton-potapov:sole_tbb_executor

* TBB executor for GAPI

 - the sole executor
 - unit tests for it
 - no usage in the GAPI at the momnet

* TBB executor for GAPI

 - introduced new overload of execute to explicitly accept tbb::arena
   argument
 - added more basic tests
 - moved arena creation code into tests
 -

* TBB executor for GAPI

 - fixed compie errors & warnings

* TBB executor for GAPI

 - split all-in-one execute() function into logicaly independant parts

* TBB executor for GAPI

 - used util::variant in in the tile_node

* TBB executor for GAPI

 - moved copy_through_move to separate header
 - rearranged details staff in proper namespaces
 - moved all implementation into detail namespace

* TBB executor for GAPI

 - fixed build error with TBB 4.4.
 - fixed build warnings

* TBB executor for GAPI

 - aligned strings width
 - fixed spaces in expressions
 - fixed english grammar
 - minor improvements

* TBB executor for GAPI

 - added more comments
 - minor improvements

* TBB executor for GAPI

 - changed ITT_ prefix for macroses to GAPI_ITT

* TBB executor for GAPI

 - no more "unused" warning for GAPI_DbgAssert
 - changed local assert macro to man onto GAPI_DbgAssert

* TBB executor for GAPI

 - file renamings
 - changed local assert macro to man onto GAPI_DbgAsse

* TBB executor for GAPI

 - test file renamed
 - add more comments

* TBB executor for GAPI

 - minor clenups and cosmetic changes

* TBB executor for GAPI

 - minor clenups and cosmetic changes

* TBB executor for GAPI

 - changed spaces and curly braces alignment

* TBB executor for GAPI

 - minor cleanups

* TBB executor for GAPI

 - minor cleanups

3 years agoMerge pull request #18064 from akineeic:gsoc_2020_dnn
Zhiming-Zeng [Sun, 29 Nov 2020 10:09:42 +0000 (18:09 +0800)]
Merge pull request #18064 from akineeic:gsoc_2020_dnn

[GSoC] Develop OpenCV.js DNN modules for promising web use cases together with their tutorials

* [Opencv.js doc] Init commit to add image classification example in opencv.js tutorial

* [Opencv.js doc] Make the code snippet interactive and put the functions into code snippet.

* Fix the utils.loadOpenCv for promise module

* [Opencv.js doc] Code modify and fixed layout issue.

* [Opencv.js doc] Add a JSON file to store parameters for models and show in the web page.

* [Opencv.js doc] Change let to const.

* [Opencv.js doc] Init commit to add image classification example with camera in opencv.js tutorial

* [Opencv.js doc] Init commit to add semantic segmentation example in opencv.js tutorial

* [Opencv.js doc] Add object detection example, supprot YOLOv2

* [Opencv.js doc] Support SSD model for object detection example

* [Opencv.js doc] Add fast neural style transfer example with opencv.js

* [Opencv.js doc] Add pose estimation example in opencv.js tutorial

* Delete whitespace for code check

* [Opencv.js doc] Add object detection example with camera

* [Opencv.js doc] Add json files containing model information to each example

* [Opencv.js doc] Add a js file for common function in dnn example

* [Opencv.js doc] Create single function getBlobFromImage

* [Opencv.js doc] Add url of model into webpage

* [OpenCV.js doc] Update UI for running

* [Opencv.js doc] Load dnn model by input button

* [Opencv.js doc] Fix some UI issues

* [Opencv.js doc] Change code format

Co-authored-by: Ningxin Hu <ningxin.hu@intel.com>
3 years agots: cvtest::debugLevel / --test_debug=<N> option
Alexander Alekhin [Sat, 28 Nov 2020 13:13:28 +0000 (13:13 +0000)]
ts: cvtest::debugLevel / --test_debug=<N> option

3 years agoMerge pull request #18762 from TolyaTalamanov:at/support-garray
Anatoliy Talamanov [Fri, 27 Nov 2020 17:39:46 +0000 (20:39 +0300)]
Merge pull request #18762 from TolyaTalamanov:at/support-garray

[G-API] Wrap GArray

* Wrap GArray for output

* Collect in/out info in graph

* Add imgproc tests

* Add cv::Point2f

* Update test_gapi_imgproc.py

* Fix comments to review

3 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Fri, 27 Nov 2020 14:06:34 +0000 (14:06 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

3 years agoMerge pull request #18935 from rgarnov:rg/remove_double_handle_new_stream_call
Alexander Alekhin [Fri, 27 Nov 2020 14:05:01 +0000 (14:05 +0000)]
Merge pull request #18935 from rgarnov:rg/remove_double_handle_new_stream_call

3 years agoapple/build_xcframework.py: python syntax
Alexander Alekhin [Fri, 27 Nov 2020 13:01:54 +0000 (13:01 +0000)]
apple/build_xcframework.py: python syntax

- make happy old Python linters

3 years agoMerge pull request #18938 from alalek:issue_18865
Alexander Alekhin [Fri, 27 Nov 2020 08:55:49 +0000 (08:55 +0000)]
Merge pull request #18938 from alalek:issue_18865

3 years agoMerge pull request #18285 from YashasSamaga:cuda4dnn-update-tests
Alexander Alekhin [Fri, 27 Nov 2020 08:26:45 +0000 (08:26 +0000)]
Merge pull request #18285 from YashasSamaga:cuda4dnn-update-tests

3 years agoMerge pull request #18939 from alalek:unstable_test_18937
Alexander Alekhin [Fri, 27 Nov 2020 08:21:25 +0000 (08:21 +0000)]
Merge pull request #18939 from alalek:unstable_test_18937

3 years agoMerge pull request #18924 from alalek:4.x-xcode12
Alexander Alekhin [Thu, 26 Nov 2020 22:56:59 +0000 (01:56 +0300)]
Merge pull request #18924 from alalek:4.x-xcode12

(4.x) build: Xcode 12 support

* build: xcode 12 support, cmake fixes

* ts: eliminate clang 11 warnigns

* 3rdparty: clang 11 warnings

* features2d: eliminate build warnings

* test: warnings

* gapi: warnings from 18928