Commit Graph

22655 Commits

Author SHA1 Message Date
Alexander Alekhin
07dca8cc03 pre: OpenCV 4.5.5 (version++) 2021-12-17 10:12:11 +00:00
Alexander Alekhin
60c093f086 pre: OpenCV 3.4.17 (version++) 2021-12-17 10:05:52 +00:00
Maxim Milashchenko
db4ab1c936
Merge pull request #21264 from MaximMilashchenko:AudioGStreamer
Audio GStreamer: added support .wav .flac audio formats

* added support .wav, lossless compressed audio formats

* fixed docs

* fixes

* videoio(gstreamer-audio): extra tests, improve error handling

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-12-16 19:43:02 +00:00
Alexander Alekhin
f071207463 Merge pull request #21277 from alalek:backport_21267 2021-12-16 18:52:23 +00:00
Alexander Alekhin
622b9d9276 Merge pull request #21267 from mshabunin:fix-kw-2021-12 2021-12-16 18:51:47 +00:00
Gruhuang
b4bb98ea60
Merge pull request #21268 from pccvlab:tf_Arg
add argmax and argmin parsing for tensorflow

* add argmax and argmin for tf

* remove whitespace

* remove whitespace

* remove static_cast

Signed-off-by: Crayon-new <1349159541@qq.com>
2021-12-16 17:06:02 +00:00
Maksim Shabunin
792b7e0629 (3.4) Fixed several issues found by static analysis
original commit: a079c2eb7c
2021-12-16 17:02:58 +00:00
Maksim Shabunin
a079c2eb7c Fixed several issues found by static analysis 2021-12-16 19:21:25 +03:00
Alexander Alekhin
6d677bbd63 dnn(test): update ONNX conformance filters (4.x) 2021-12-16 12:09:31 +00:00
Vincent Rabaud
3da17c42a4 Use NaN-safe clip function.
This is to prevent more NaN to int conversions like in #21111.
2021-12-16 11:34:04 +01:00
Alexander Alekhin
299f9837b7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-15 16:38:56 +00:00
Alexander Alekhin
f3ba88c87c dnn(test): update ONNX conformance filters 2021-12-15 12:53:53 +00:00
Alexander Alekhin
498f1525b2 Merge pull request #21246 from pccvlab:square 2021-12-15 12:02:20 +00:00
Smirnov Egor
e97c7e042b fix max_unpool missing attributes, add default value of keepdims in reducemean/max/sum, add support for keepdims=true in full reduction branch, add new padding type to Pad 2021-12-14 22:09:27 +03:00
Alexander Alekhin
35f27d0d3e Merge pull request #21257 from alalek:imgproc_cvtcolor_lab_fix_nan 2021-12-14 16:59:07 +00:00
rogday
4827fe86bb
Merge pull request #21088 from rogday:onnx_tests
Onnx conformance tests

* Add ONNX conformance tests

* dnn(test): add filters for ONNX conformance tests

* add filter lists for OCV backend

* address review comments

* move test_clip_inbounds to all_denylist

* address clip issue

* avoid empty lists

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-12-14 16:58:06 +00:00
Alexander Alekhin
72c55b56f2 imgproc: catch NaNs in clip(), use table index debug check
- no NaN propagation guarantee
2021-12-14 15:31:51 +00:00
Trutnev Aleksei
295da7e5f3
Merge pull request #21150 from alexgiving:atrutnev/fluid_perf
GAPI: Add compare function to perf tests

* Add PhasePerfTest and SqrtPerfTest

* rebasing

* debug tests

* remove spaces

* Disable DivRCPerfTestGPU

* rebase

* Applied comments

* Correction

* Revert parameter changes
2021-12-14 15:16:59 +00:00
Alexander Alekhin
4eab85d364 Merge pull request #21251 from vrabaud:3.4_bayer 2021-12-14 15:15:07 +00:00
Vincent Rabaud
542b3e8a64 Fix harmless signed integer overflow.
When computing:
t1 = (bayer[1] + bayer[bayer_step] + bayer[bayer_step+2] + bayer[bayer_step*2+1])*G2Y;
there is a T (unsigned short or char) multiplied by an int which can overflow.
Then again, it is stored to t1 which is unsigned so the overflow disappears.
Keeping all unsigned is safer.
2021-12-13 23:43:49 +01:00
Alexander Alekhin
4f79eb256d Merge pull request #21250 from alalek:videoio_msmf_update_camera_3.4 2021-12-13 22:24:33 +00:00
Alexander Alekhin
7620456486 videoio(MSMF): add queue for async ReadSample() 2021-12-13 21:02:24 +00:00
Alexander Alekhin
052d209901 Merge pull request #21202 from alalek:videoio_msmf_update_camera 2021-12-13 20:38:15 +00:00
Alexander Alekhin
f1053d48a2 Merge pull request #21204 from anna-khakimova:ak/move_simd_absdiffc 2021-12-13 18:03:50 +00:00
Alexander Alekhin
ba12f52f6c Merge pull request #21247 from rogday:coverity_fix 2021-12-13 17:16:03 +00:00
Polina Smolnikova
456137fa24
Merge pull request #21166 from rayonnant14:issue_21105
Fix intrinsics processing in case USAC parameters

* fixed USAC intrinsics processing

* change mat to matx33d, added test
2021-12-13 17:12:49 +00:00
rogday
692059e899 initialize members 2021-12-13 18:41:23 +03:00
cqn2219076254
252ce0b581 add square layer 2021-12-13 21:43:13 +08:00
Alexander Alekhin
d24befa0bc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-11 15:18:57 +00:00
Alexander Alekhin
04020f391a Merge pull request #21193 from alalek:imgproc_test_bitexact_cvtcolor_yuv 2021-12-10 16:11:06 +00:00
Alexander Alekhin
c4ab0c09ea Merge pull request #21228 from alalek:issue_21198 2021-12-10 16:07:57 +00:00
Alexander Alekhin
6e50e4b9ee Merge pull request #21161 from rogday:elu_alpha_4x 2021-12-10 16:04:01 +00:00
HAN Liutong
1599f9f0c0
Merge pull request #21086 from hanliutong:rvv-dnn
Further optimize DNN for RISC-V Vector.

* Optimize DNN on RVV by using vsetvl.

* Rename vl.

* Update fastConv by using setvl instead of mask.

* Fix fastDepthwiseConv
2021-12-10 16:03:22 +00:00
Alexander Alekhin
0c5b6e5556 videoio(MSMF): add queue for async ReadSample() 2021-12-10 16:01:08 +00:00
Alexander Alekhin
e3e04f5dae Merge pull request #21222 from asenyaev:asen/replace_distutils_copy_tree 2021-12-10 14:12:01 +00:00
Gruhuang
17bc8565f6
Merge pull request #21154 from pccvlab:MatMul_with_two_inputs
Add BatchMatMul layer support for tf_importer

* two inputs

* support batch_matmul

* refactor: remove useless code

* refactor: decrease nesting
2021-12-10 14:44:27 +03:00
Alexander Alekhin
7ba56a4b88 Merge pull request #21194 from whalenpt:qt_opengl_build_fix 2021-12-10 11:33:17 +00:00
Sergey Ivanov
b70370f3fd
Merge pull request #21230 from sivanov-work:gapi_win32_vpl_fix
G-API: Fix Win32 build: uint64_t ->size_t

* Fix Win32 build: uint64_t ->size_t

* Fix for MAC
2021-12-10 08:58:59 +00:00
Andrey Senyaev
4d3cf77ad5 Replaced distutils to shutil when copying files in a tree 2021-12-10 11:46:27 +03:00
Patrick Whalen
b2005ccaef Fix broken build for Qt6 with options: WITH_QT=ON and WITH_OPENGL=ON
- QGLWidget changed to QOpenGLWidget in window_QT.h for Qt6 using
  typedef OpenCVQtWidgetBase for handling Qt version

- Implement Qt6/OpenGL functionality in window_QT.cpp

- Swap QGLWidget:: function calls for OpenCVQtWidgetBase:: function calls

- QGLWidget::updateGL deprecated, swap to QOpenGLWidget::update for Qt6

- Add preprocessor definition to detect Qt6 -- HAVE_QT6

- Add OpenGLWidgets to qdeps list in highgui CMakeLists.txt

- find_package CMake command added for locating Qt module OpenGLWidgets

- Added check that Qt6::OpenGLWidgets component is found. Shut off Qt-openGL functionality if not found.
2021-12-09 13:22:20 -08:00
Alexander Alekhin
659cf7249e imgproc(ocl): fix resizeLN, avoid integer overflow 2021-12-09 20:30:26 +00:00
Vincent Rabaud
6b4ea68bc7 Solve Rect overflow issues.
Fow now, it is possible to define valid rectangle for which some
functions overflow (e.g. br(), ares() ...).
This patch fixes the intersection operator so that it works with
any rectangle.
2021-12-09 12:04:26 +01:00
Andrey Senyaev
d6891c705e
Merge pull request #21219 from asenyaev:asen/remove_distutils
* Replaced distutils module to sysconfig

* Fixed getting a path to python lib
2021-12-08 18:51:34 +00:00
Alexander Alekhin
02ac6ec81c cmake: option to disable GStreamer in G-API
- OPENCV_GAPI_GSTREAMER
2021-12-08 11:07:32 +00:00
Sergey Ivanov
5c91f5b71d
Merge pull request #21049 from sivanov-work:vpl_dx11_merge
G-API: oneVPL merge DX11 acceleration

* Merge DX11 initial

* Fold conditions row in MACRO in utils

* Inject DeviceSelector

* Turn on DeviceSelector in DX11

* Change sharedLock logic & Move FMT checking in FrameAdapter c-tor

* Move out NumSuggestFrame to configure params

* Drain file source fix

* Fix compilation

* Force zero initializetion of SharedLock

* Fix some compiler warnings

* Fix integer comparison warnings

* Fix integers in sample

* Integrate Demux

* Fix compilation

* Add predefined names for some CfgParam

* Trigger CI

* Fix MultithreadCtx bug, Add Dx11 GetBlobParam(), Get rif of ATL CComPtr

* Fix UT: remove unit test with deprecated video from opencv_extra

* Add creators for most usable CfgParam

* Eliminate some warnings

* Fix warning in GAPI_Assert

* Apply comments

* Add VPL wrapped header with MSVC pragma to get rid of global warning masking
2021-12-08 07:09:33 +00:00
Alexander Alekhin
65392d5e6b cmake: fix OPENGL_LIBRARIES handling 2021-12-07 12:12:42 +00:00
Alexander Alekhin
41d108ead6 Merge pull request #21208 from rogday:argminmax_dnn 2021-12-07 12:11:39 +00:00
Alexander Alekhin
0c9dbc61a1 Merge pull request #21212 from OrestChura:oc/fix_openvino_standalone_build 2021-12-07 11:32:28 +00:00
Alexander Alekhin
6788fdb0d6 Merge pull request #21205 from anna-khakimova:ak/fix_for_muldouble_gpu 2021-12-07 10:24:50 +00:00
Anna Khakimova
3a4b61579d GAPI GPU: fix for tests failure. 2021-12-07 11:21:04 +03:00
OrestChura
51d7ba7446 Bring updates from openvino version of standalone files 2021-12-07 06:56:48 +03:00
Smirnov Egor
e608adea60 add ArgMax and ArgMin layers 2021-12-06 20:49:54 +03:00
Anastasiya(Asya) Pronina
8dd6882222
Merge pull request #20709 from AsyaPronina:asyadev/integrate_gstreamer_source
Ported GStreamerSource to OpenCV

* Ported GStreamerSource to OpenCV

* Fixed CI failures

* Whitespaces

* Whitespaces + removed exception from destructors C4722

* Removed assert for Priv's getSS and descr_of

* Removed assert for pull

* Fixed last review comment

Co-authored-by: Pashchenkov Maxim <maxim.pashchenkov@intel.com>
2021-12-06 16:54:21 +00:00
Anna Khakimova
a4d6bcba09 GAPI Fluid: Enable dynamic dispatching for AbsDiffC kernel. 2021-12-06 15:15:47 +03:00
Maksim Shabunin
973e1acb67
Merge pull request #21182 from mshabunin:split-cv2cpp
Split cv2.cpp

* split cv2.cpp: util, numpy

* split cv2.cpp: convert

* split cv2.cpp: highgui, more utils

* split cv2.cpp: fix numpy import
2021-12-05 12:49:36 +00:00
Tejas M R
676a724491
Merge pull request #21180 from tezz-io:4.x
Added CV_PROP_RW macro to keypoints

* Added CV_PROP_RW macro to keypoints

As outlined in the feature request in the issue https://github.com/opencv/opencv/issues/21171 : the keypoints field has been made parsable by the bindings.

* Added test for keypoints

Added test to check if the CV_PROP_RW macro added in the previous commit makes keypoints public and accessible through the python API.
2021-12-05 12:47:44 +00:00
Alexander Alekhin
73318fd514 Merge pull request #21167 from alalek:dnn_test_reenable_ov_2021_4 2021-12-04 22:12:18 +00:00
MaximMilashchenko
cb08c15616
Merge pull request #21145 from MaximMilashchenko:AudioUpdate
Audio MSMF: added the ability to set sample per second

* Audio MSMF: added the ability to set sample per second

* changed the valid sampling rate check

* fixed docs

* add test

* fixed warning

* fixed error

* fixed error
2021-12-04 10:37:10 +00:00
Alexander Alekhin
0c0b1ec9ae imgproc(test): add bit-exact tests for YUV cvtColor conversions 2021-12-04 04:36:57 +00:00
Michael Davis
d2f87ca76c
Merge pull request #21147 from mjmdavis:4.x
* remove tickmarks on NSSlider
2021-12-03 16:40:49 +00:00
HAN Liutong
4935b14539
Merge pull request #21012 from hanliutong:rvv_clang
Update RVV backend for using Clang.

* Update cmake file of clang.

* Modify the RVV optimization on DNN to adapt to clang.

* Modify intrin_rvv: Disable some existing types.

* Modify intrin_rvv: Reinterpret instead of load&cast.

* Modify intrin_rvv: Update load&store without cast.

* Modify intrin_rvv: Rename vfredsum to fredosum.

* Modify intrin_rvv: Rewrite Check all/any by using vpopc.

* Modify intrin_rvv: Use reinterpret instead of c-style casting.

* Remove all macros which is not used in v_reinterpret

* Rename vpopc to vcpop according to spec.
2021-12-03 15:13:24 +00:00
Alexander Alekhin
0835611d3a dnn(test): re-enable tests which works with OpenVINO 2021.4.x 2021-12-03 14:01:30 +00:00
Alexander Alekhin
8b4fa2605e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-03 12:32:49 +00:00
Anna Khakimova
c3910807c5
Merge pull request #21177 from anna-khakimova:ak/simd_mulc
* GAPI Fluid: SIMD for MulC kernel.

* Changes for MulDouble kernel.
2021-12-03 12:30:39 +00:00
Sergey Ivanov
c5b8b5687f
Merge pull request #21041 from sivanov-work:gin_gout_concept
G-API: GAPI introduce compile guard for some types for gin/gout params passing

* Initial for taged solution

* Move out tags to gtags.hpp & add protection for own::Mat

* Add compile guard to proper place

* Fix MACRO concat

* Add unit tests

* Remove class MACRO injection due to Python3

* Revert back unproper changes

* Apply comments: reuse shape from traits

* Throw away unused gtags

* Apply comments

* Handle own::*

* Fix test

* Fix test(1)

* Fix unix build

* Try on type list

* Apply comments

* Apply comments

* Fix warning
2021-12-03 12:30:05 +00:00
Alexander Alekhin
f61883b227 Merge pull request #21165 from utibenkei:fix_android_ndk_camera_order_of_u_and_v 2021-12-02 17:16:35 +00:00
Alexander Alekhin
35ff9af6ce Merge pull request #21162 from rogday:softmax_simplification 2021-12-02 17:14:48 +00:00
Alexander Alekhin
dad2b9aac8 Merge pull request #21160 from rogday:elu_alpha 2021-12-02 17:13:57 +00:00
rogday
1613d30544
Merge pull request #21159 from rogday:ceil_mode
fix ceil_mode for Average/MaxPooling

* fix ceil_mode

* add a comment
2021-12-02 20:11:11 +03:00
Alexander Alekhin
b6df9debaf Merge pull request #21174 from APrigarina:fix_qr_encoder 2021-12-02 16:41:03 +00:00
Alexander Alekhin
b9d0dc60b0 Merge pull request #21173 from alalek:3.4_dnn_test_reenable_ov_2021_4 2021-12-02 16:33:15 +00:00
APrigarina
37b1876807 qr encoder: fix memory and unused variables issues 2021-12-02 18:35:33 +03:00
Alexander Alekhin
d206350738 Merge pull request #21172 from alalek:dnn_test_drop_non_cpu_int8 2021-12-02 13:50:04 +00:00
Jong Sin Kim
2da1f9181a
Merge pull request #21170 from JJJoonngg:4.x
Check buffer size when frameWidth * frameHeight bigger than allocated buffer size
2021-12-02 13:48:11 +00:00
Alexander Alekhin
bd396e1fd5 dnn(test): re-enable tests which works with OpenVINO 2021.4.x (3.4) 2021-12-02 11:30:45 +00:00
Alexander Alekhin
f55c9ed1ba dnn(test): drop non OCV/CPU cases for Int8
- zero code coverage and up to x3-x8 tests slowdown
- implementation executes OCV/CPU in all cases
- wrong skip conditions
2021-12-02 06:27:10 +00:00
Alexander Alekhin
5da69c0b9a Merge pull request #21164 from rogday:sum_identity 2021-12-01 22:49:02 +00:00
Alexander Alekhin
a806e8cc58 Merge pull request #21163 from rogday:transpose_default 2021-12-01 22:47:57 +00:00
Anna Khakimova
369b260e12
Merge pull request #21158 from anna-khakimova:ak/simd_subC
* GAPI Fluid: SIMD for SubC kernel.

* Applied comments
2021-12-01 21:58:30 +00:00
Alexander Alekhin
d9e7c1626a Merge pull request #21153 from alalek:build_warnings_msvs2017 2021-12-01 12:49:28 +00:00
Vincent Rabaud
1a1a7bbbfd
Merge pull request #21112 from vrabaud:3.4_luv_overflow
* Fix integer overflow in cv::Luv2RGBinteger::process.

For LL=49, uu=205, vv=23, we end up with x=7373056 and y=458
which overflows y*x.

* imgproc(test): adjust test parameters to cover SIMD code
2021-12-01 15:46:03 +03:00
Smirnov Egor
33e97e994d add sum of 1 input 2021-11-30 15:42:20 +03:00
Smirnov Egor
11e6848bb9 add default order to transpose 2021-11-30 15:34:34 +03:00
Smirnov Egor
829410729c add new (Log)SoftMax simplification passes 2021-11-30 15:20:52 +03:00
Smirnov Egor
4995aecd62 add alpha parameter to ELU 2021-11-30 14:43:18 +03:00
Smirnov Egor
0e2a3686c0 add alpha parameter to ELU layer 2021-11-30 12:20:35 +03:00
Alexander Alekhin
66b2140892 build: eliminate C4309 warning from protobuf files with MSVS2017 2021-11-30 04:27:39 +00:00
Alexander Alekhin
0d2857a242 Merge pull request #21152 from rogday:fix_defaults 2021-11-29 22:39:27 +00:00
Alexander Alekhin
17d99e6266 Merge pull request #21142 from alalek:dnn_two_inputs_ocl_fp16_3.4 2021-11-29 21:44:59 +00:00
Andrew Ryrie
ea7d4be3f8
Merge pull request #20658 from smbz:lstm_optimisation
* dnn: LSTM optimisation

This uses the AVX-optimised fastGEMM1T for matrix multiplications where available, instead of the standard cv::gemm.

fastGEMM1T is already used by the fully-connected layer.  This commit involves two minor modifications:
 - Use unaligned access.  I don't believe this involves any performance hit in on modern CPUs (Nehalem and Bulldozer onwards) in the case where the address is actually aligned.
 - Allow for weight matrices where the number of columns is not a multiple of 8.

I have not enabled AVX-512 as I don't have an AVX-512 CPU to test on.

* Fix warning about initialisation order

* Remove C++11 syntax

* Fix build when AVX(2) is not available

In this case the CV_TRY_X macros are defined to 0, rather than being undefined.

* Minor changes as requested:

 - Don't check hardware support for AVX(2) when dispatch is disabled for these
 - Add braces

* Fix out-of-bounds access in fully connected layer

The old tail handling in fastGEMM1T implicitly rounded vecsize up to the next multiple of 8, and the fully connected layer implements padding up to the next multiple of 8 to cope with this.  The new tail handling does not round the vecsize upwards like this but it does require that the vecsize is at least 8.  To adapt to the new tail handling, the fully connected layer now rounds vecsize itself at the same time as adding the padding(which makes more sense anyway).

This also means that the fully connected layer always passes a vecsize of at least 8 to fastGEMM1T, which fixes the out-of-bounds access problems.

* Improve tail mask handling

 - Use static array for generating tail masks (as requested)
 - Apply tail mask to the weights as well as the input vectors to prevent spurious propagation of NaNs/Infs

* Revert whitespace change

* Improve readability of conditions for using AVX

* dnn(lstm): minor coding style changes, replaced left aligned load
2021-11-29 21:43:00 +00:00
Smirnov Egor
05db8784ae fix Clip, LeakyReLU, LRN, Split defaults 2021-11-29 20:20:34 +03:00
utibenkei
68667d6057 fix_android_ndk_camera_order_of_u_and_v 2021-11-30 01:44:22 +09:00
Anna Khakimova
d58b5ef74b
Merge pull request #21119 from anna-khakimova:ak/simd_addc
* GAPI Fluid: SIMD for AddC kernel

* Final version

* Applied comments.
2021-11-29 11:20:53 +00:00
rogday
f044037ec5
Merge pull request #20733 from rogday:argmaxnd
Implement ArgMax and ArgMin

* add reduceArgMax and reduceArgMin

* fix review comments

* address review concerns
2021-11-28 16:17:46 +00:00
Supernovae
b594ed99b8
Merge pull request #20933 from shubham-shahh:master
Improved overall readability of the code

* grid_nms.cu: minor fix-ups

* Update grid_stride_range.hpp

* Update tf_importer.cpp
2021-11-28 12:54:29 +00:00
Alexander Alekhin
58b06222ff dnn(DataLayer): fix CPU/OpenCL code paths for FP16 handling 2021-11-28 07:44:05 +00:00
Alexander Alekhin
58dc397930 dnn(test): add two_inputs test with FP32/U8 data types
- remove similar test from IE scope under HAVE_INF_ENGINE
2021-11-28 07:44:04 +00:00
yuki takehara
a6277370ca
Merge pull request #21107 from take1014:remove_assert_21038
resolves #21038

* remove C assert

* revert C header

* fix several points in review

* fix test_ds.cpp
2021-11-27 18:34:52 +00:00
Alexander Alekhin
31b2d6be75 dnn(test): update InferenceEngine tests (4.x) 2021-11-27 18:16:52 +00:00
Alexander Alekhin
57ee14d62d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-27 16:50:55 +00:00
Alexander Alekhin
d470cfe86e Merge pull request #21134 from alalek:gapi_fix_build_ie_msvs2015 2021-11-27 12:59:46 +00:00
Alexander Alekhin
b55d8f46f4 Merge pull request #21133 from alalek:dnn_test_ie_update_3.4 2021-11-26 20:35:58 +00:00
Alexander Alekhin
c15218e37a gapi: fix build with MSVS2015 (with IE) 2021-11-26 19:34:52 +00:00
Alexander Alekhin
985aa0423d dnn(test): update InferenceEngine tests 2021-11-26 18:46:26 +00:00
Alexander Alekhin
c14a8dce93 Merge pull request #21131 from cclauss:codespell 2021-11-26 18:32:54 +00:00
Orest Chura
e20fe421e7
Merge pull request #21103 from OrestChura:oc/fix_1D_Mat_RMat_View_issue
[G-API] Fix issue of getting 1D Mat out of RMat::View

* Fix issue of getting 1D Mat out of RMat::View
 - added test
 - fixed for standalone too (removed Assert(dims.empty()))

* Fixed asVeiw() function for standalone

* Put more detailed comment
2021-11-26 16:42:12 +00:00
Orest Chura
2deb38d615
Merge pull request #21083 from OrestChura:oc/fix_coverity_vino_issues
[G-API] Fixed Coverity issues

* Fixed Coverity issues
 - VectorRef&OpaqueRef m_kind = CV_UNKNOWN
 - added same-type overload for saturate()
 - sanitized resize value in ByteMemoryInStream::operator>> (std::string& str)
 - handled throws from ~GStreamingExecutor()

* Catching exception by const ref

* Addressing Sergey's comments

* Applied enable_if semanitcs to saturate(x, round) too

* Removed uncaught_exception, made destructor noexcept back

* Split Fluid ConvertTo to multiple functions to avoid ifs; added CV_ALWAYS_INLINE

* Added FIXME to address throwings from stop()

* Fix standalone

* Addressing comments

* Guarded SIMD optimizations properly

* Removed excess parameter from simd_impl functions
2021-11-26 16:40:36 +00:00
Maxim Pashchenkov
b95d71af2b
Merge pull request #21106 from mpashchenkov:mp/ocv-gapi-clean-samples
G-API: Cleaning samples

* parseSSD + removed render details from gcpukernel

* self-rev

* Applying comment

* Added operators

* warnings
2021-11-26 14:31:15 +03:00
Christian Clauss
ebe4ca6b60 Fix typos discovered by codespell 2021-11-26 12:29:56 +01:00
Christian Clauss
cdbb042ce4 Use print() function in both Python 2 and Python 3 2021-11-26 11:57:54 +01:00
Alexander Alekhin
cc1fbe0956 Merge pull request #21108 from ShuangLiu1992:patch-1 2021-11-24 20:10:37 +00:00
cudawarped
97c6ec6d49
Merge pull request #20978 from cudawarped:videocapture_read_raw_enchancement
Add capacity to Videocapture to return the extraData from FFmpeg when required

* Update rawMode to append any extra data recieved during the initial negotiation of an RTSP stream or during the parsing of an MPEG4 file header.
For h264[5] RTSP streams this ensures the parameter sets if available are always returned on the first call to grab()/read() and has two purposes:
1) To ensure the parameter sets are available even if they are not transmitted in band.  This is common for axis ip camera's.
2) To allow callers of VideoCapture::grab()[read()] to write to split the raw stream over multiple files by appending the parameter sets to the begining of any new files.
For (1) there is no alternative, for (2) if the parameter sets were provided in band it would be possible to parse the raw bit stream and search for the parameter sets however that would be a lot of work when that information is already provided by FFMPEG.
For MPEG4 files this information is only suplied in the header and is required for decoding.

Two properties are also required to enable the raw encoded bitstream to be written to multiple files, these are;
1) an indicator as to whether the last frame was a key frame or not - each new file needs to start at a key frame to avoid storing unusable frame diffs,
2) the length in bytes of the paramater sets contained in the last frame - required to split the paramater sets from the frame without having to parse the stream.  Any call to VideoCapture::get(CAP_PROP_LF_PARAM_SET_LEN) returning a number greater than zero indicates the presense of a parameter set at the begining of the raw bitstream.

* Adjust test data to account for extraData

* Address warning.

* Change added property names and remove paramater set start code check.

* Output extra data on calls to retrieve instead of appending to the first packet.

* Reverted old test case and added new one to evaluate new functionality.

* Add missing definition.

* Remove flag from legacy api.
Add property to determine if returning extra data is supported.
Always allow extra data to be returned on calls to cap.retrieve()
Update test case.

* Update condition which indicates CAP_PROP_CODEC_EXTRADATA_INDEX is not supported in test case.

* Include compatibility for windows dll if not updated.
Enforce existing return status convention.

* Fix return error and missing test constraints.
2021-11-23 21:18:55 +00:00
Hanxi Guo
1fcf7ba5bc
Merge pull request #20406 from MarkGHX:gsoc_2021_webnn
[GSoC] OpenCV.js: Accelerate OpenCV.js DNN via WebNN

* Add WebNN backend for OpenCV DNN Module

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Add WebNN head files into OpenCV 3rd partiy files

Create webnn.hpp

update cmake

Complete README and add OpenCVDetectWebNN.cmake file

add webnn.cpp

Modify webnn.cpp

Can successfully compile the codes for creating a MLContext

Update webnn.cpp

Update README.md

Update README.md

Update README.md

Update README.md

Update cmake files and

update README.md

Update OpenCVDetectWebNN.cmake and README.md

Update OpenCVDetectWebNN.cmake

Fix OpenCVDetectWebNN.cmake and update README.md

Add source webnn_cpp.cpp and libary libwebnn_proc.so

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

update dnn.cpp

update op_webnn

update op_webnn

Update op_webnn.hpp

update op_webnn.cpp & hpp

Update op_webnn.hpp

Update op_webnn

update the skeleton

Update op_webnn.cpp

Update op_webnn

Update op_webnn.cpp

Update op_webnn.cpp

Update op_webnn.hpp

update op_webnn

update op_webnn

Solved the problems of released variables.

Fixed the bugs in op_webnn.cpp

Implement op_webnn

Implement Relu by WebNN API

Update dnn.cpp for better test

Update elementwise_layers.cpp

Implement ReLU6

Update elementwise_layers.cpp

Implement SoftMax using WebNN API

Implement Reshape by WebNN API

Implement PermuteLayer by WebNN API

Implement PoolingLayer using WebNN API

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Implement poolingLayer by WebNN API and add more detailed logs

Update dnn.cpp

Update dnn.cpp

Remove redundant codes and add more logs for poolingLayer

Add more logs in the pooling layer implementation

Fix the indent issue and resolve the compiling issue

Fix the build problems

Fix the build issue

FIx the build issue

Update dnn.cpp

Update dnn.cpp

* Fix the build issue

* Implement BatchNorm Layer by WebNN API

* Update convolution_layer.cpp

This is a temporary file for Conv2d layer implementation

* Integrate some general functions into op_webnn.cpp&hpp

* Update const_layer.cpp

* Update convolution_layer.cpp

Still have some bugs that should be fixed.

* Update conv2d layer and fc layer

still have some problems to be fixed.

* update constLayer, conv layer, fc layer

There are still some bugs to be fixed.

* Fix the build issue

* Update concat_layer.cpp

Still have some bugs to be fixed.

* Update conv2d layer, fully connected layer and const layer

* Update convolution_layer.cpp

* Add OpenCV.js DNN module WebNN Backend (both using webnn-polyfill and electron)

* Delete bib19450.aux

* Add WebNN backend for OpenCV DNN Module

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Add WebNN head files into OpenCV 3rd partiy files

Create webnn.hpp

update cmake

Complete README and add OpenCVDetectWebNN.cmake file

add webnn.cpp

Modify webnn.cpp

Can successfully compile the codes for creating a MLContext

Update webnn.cpp

Update README.md

Update README.md

Update README.md

Update README.md

Update cmake files and

update README.md

Update OpenCVDetectWebNN.cmake and README.md

Update OpenCVDetectWebNN.cmake

Fix OpenCVDetectWebNN.cmake and update README.md

Add source webnn_cpp.cpp and libary libwebnn_proc.so

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

update dnn.cpp

update op_webnn

update op_webnn

Update op_webnn.hpp

update op_webnn.cpp & hpp

Update op_webnn.hpp

Update op_webnn

update the skeleton

Update op_webnn.cpp

Update op_webnn

Update op_webnn.cpp

Update op_webnn.cpp

Update op_webnn.hpp

update op_webnn

update op_webnn

Solved the problems of released variables.

Fixed the bugs in op_webnn.cpp

Implement op_webnn

Implement Relu by WebNN API

Update dnn.cpp for better test

Update elementwise_layers.cpp

Implement ReLU6

Update elementwise_layers.cpp

Implement SoftMax using WebNN API

Implement Reshape by WebNN API

Implement PermuteLayer by WebNN API

Implement PoolingLayer using WebNN API

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Implement poolingLayer by WebNN API and add more detailed logs

Update dnn.cpp

Update dnn.cpp

Remove redundant codes and add more logs for poolingLayer

Add more logs in the pooling layer implementation

Fix the indent issue and resolve the compiling issue

Fix the build problems

Fix the build issue

FIx the build issue

Update dnn.cpp

Update dnn.cpp

* Fix the build issue

* Implement BatchNorm Layer by WebNN API

* Update convolution_layer.cpp

This is a temporary file for Conv2d layer implementation

* Integrate some general functions into op_webnn.cpp&hpp

* Update const_layer.cpp

* Update convolution_layer.cpp

Still have some bugs that should be fixed.

* Update conv2d layer and fc layer

still have some problems to be fixed.

* update constLayer, conv layer, fc layer

There are still some bugs to be fixed.

* Update conv2d layer, fully connected layer and const layer

* Update convolution_layer.cpp

* Add OpenCV.js DNN module WebNN Backend (both using webnn-polyfill and electron)

* Update dnn.cpp

* Fix Error in dnn.cpp

* Resolve duplication in conditions in convolution_layer.cpp

* Fixed the issues in the comments

* Fix building issue

* Update tutorial

* Fixed comments

* Address the comments

* Update CMakeLists.txt

* Offer more accurate perf test on native

* Add better perf tests for both native and web

* Modify per tests for better results

* Use more latest version of Electron

* Support latest WebNN Clamp op

* Add definition of HAVE_WEBNN macro

* Support group convolution

* Implement Scale_layer using WebNN

* Add Softmax option for native classification example

* Fix comments

* Fix comments
2021-11-23 21:15:31 +00:00
Alexander Alekhin
12c1e1d149 Merge pull request #21032 from alalek:js_tracker_mil 2021-11-23 19:57:38 +00:00
ShuangLiu1992
fa222b0ea2
Update cap_android_camera.cpp
since u and v Pixel ptr have been swapped the compare condition should be updated too
2021-11-23 15:03:18 +00:00
Sergey Ivanov
02f08879a4
Merge pull request #21022 from sivanov-work:async_mfp_demux
G-API: oneVPL Implement asynchronous MFP demux data provider

* Add dummy dmux

* Initial commit for draft versionn

* Demux for low res file works

* Add media source resolver to work over incorrect MIME

* Add MFP Demux logger

* stash changes

* Extend IDataProvider with CodecId, Add troubleshooting info

* Add IDapaProvider dispatcher

* Add ComPtrGuard wrappers

* Add new unit test scope for MFP demux & Add minor changes

* Enhance UTs

* Remove ATL header

* Remove ATL another one

* Fix build

* Add static for some methods

* Initial commit

* Add async demuxing

* Apply tdd idea

* Intro IDataProvider changes: +fetch_bitstream, -fetch_data

* Fix UTs

* Remove IDataProvider::CodecId & Fix EOF hang

* Remove sync demux

* Remove mfp async dependencies

* Remove VPL dependencies from IDataProvider declaration

* Apply comments

* Fix compilation

* Suppress unused warning

* Apply some comments

* Apply some comments

* Apply comments
2021-11-22 14:53:38 +03:00
Alexander Alekhin
61f1ee2d2d core(logger): dump timestamp information with message 2021-11-20 15:34:23 +00:00
Alexander Alekhin
ac4b592b4e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-20 05:13:50 +00:00
zcx
f5de714451
Merge pull request #20987 from zcx-xxx:master
* Update drawing.cpp

optimize FillEdgeCollection function

* Update drawing.cpp

optimize FillEdgeCollection,remove sort_flag
2021-11-19 18:57:07 +03:00
Vincent Rabaud
d4741eece1 Fix H clamping for very small negative values.
In case of very small negative h (e.g. -1e-40), with the current implementation,
you will go through the first condition and end up with h = 6.f, and will miss
the second condition.
2021-11-19 16:34:09 +01:00
Alexander Alekhin
585484cb06 Merge pull request #21067 from NickJackolson:nickjackolson/imread-warning 2021-11-18 22:48:40 +00:00
nickjackolson
b696928a5b add !empty assertion in seamlessClone()
issue #20617 addresses lack of warnings on
seamlessClone() function when src is None.
This commit adds source check using CV_Assert
therefore debugging would be easier.

Signed-off-by: nickjackolson <metedurlu@gmail.com>
2021-11-18 21:19:05 +01:00
nickjackolson
79d4e865fe Add warning message to imread()
Add a warning message using CV_LOG__WARNING().
This way api behaviour is preserved. Outputs are
the same but user gets an extra warning in case
fopen() fails to access image file for some reason.
This would help new users and also debugging
complex apps which use imread()

Signed-off-by: nickjackolson <metedurlu@gmail.com>
2021-11-18 21:19:05 +01:00
Alexander Alekhin
8380879804 Merge pull request #21077 from alalek:js_test_pin_cli_table 2021-11-18 18:34:44 +00:00
Alexander Alekhin
091461cece Merge pull request #21081 from alalek:issue_17261 2021-11-18 18:23:00 +00:00
Alexander Alekhin
d228c5459d core: avoid using of 'check' identifier 2021-11-18 16:02:59 +00:00
Alexander Alekhin
3d5d3ea20c js: add TrackerMIL 2021-11-18 12:13:05 +00:00
Alexander Alekhin
de7f8eec04 js(test): pin cli-table dependency 2021-11-18 05:40:16 +00:00
Alexander Alekhin
4b6047e746 Merge pull request #21024 from anna-khakimova:ak/simd_mul 2021-11-17 18:41:52 +00:00
Anna Khakimova
c47673bf10 Fluid: SIMD multiply kernel 2021-11-17 11:35:32 +03:00
Alexander Alekhin
49432009fe Merge pull request #21064 from alalek:doc_videoio_api_preference_3.4 2021-11-16 20:05:59 +00:00
Maxim Pashchenkov
2f6d2b08aa
Merge pull request #20995 from mpashchenkov:mp/ocv-gapi-tdp-skip
G-API: Removing G-API test code that is a reflection of ts module

* gapi: don't hijack testing infrastructure

* Removed initDataPath functionality (ts module exists)

* Removed false for ocv_extra data from findDataFile

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-11-16 18:27:42 +00:00
Alexander Alekhin
473f10877c doc(videoio): fix apiPreference note, replace DSHOW(deprecated)->MSMF 2021-11-16 17:08:11 +00:00
Anatoliy Talamanov
c7df82460c
Merge pull request #20925 from TolyaTalamanov:at/enable-2d-inputs-giebackend
[G-API] Enable 2D inputs for GIEBackend

* Enable 2D inputs

* Fix typo
2021-11-16 12:52:42 +00:00
Anna Khakimova
b19697e3ac
Merge pull request #20914 from anna-khakimova:ak/simd_div
GAPI Fluid: SIMD Div kernel.

* HAL implementation for Div kernel

* Removed dbg lines

* Applied comments.

* Reworked

* Final version
2021-11-15 17:16:25 +00:00
Qiushi Zheng
3e51448ef0
Merge pull request #17889 from ZhengQiushi:my_3.4
QR code (encoding process)

* add qrcode encoder

* qr encoder fixes

* qr encoder: fix api and realization

* fixed qr encoder, added eci and kanji modes

* trigger CI

* qr encoder constructor fixes

Co-authored-by: APrigarina <ann73617@gmail.com>
2021-11-15 17:15:39 +00:00
Anatoliy Talamanov
2b2e515a30
Merge pull request #20918 from TolyaTalamanov:at/fix-empty-map-importNetwork
[G-API] Fix bugs in GIEBackend

* Remove inputs/outputs map from IEUnit

* Add test

* Add NV12 test

* Reorganize setBlob function

* Check that backend don't overwrite blob precision

* Stop setting config to global IE::Core

* Replace mutable to const_cast

* Update modules/gapi/test/infer/gapi_infer_ie_test.cpp

* Update modules/gapi/test/infer/gapi_infer_ie_test.cpp

* Make blob parameter as const ref

* Cosmetic fixes

* Fix failed test on inferROI

* Removed double ref for ii

* Disable tests

* Skip tests if device not available

* Use Sync prim under shared_ptr to avoid issue on MAC

* Apply WA for IE::Core

* Apply WA for MAC build

* Try to apply another WA

* Not release IE::Core for apple

* Put comment

* Support PreprocInfo for

* InferROI
* InferList
* InferList2

* Remove empty line

* Fix alignment

Co-authored-by: Maxim Pashchenkov <maxim.pashchenkov@intel.com>
2021-11-15 17:11:53 +00:00
Alexander Alekhin
394e640909 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-13 15:11:30 +00:00
Alexander Alekhin
b48eb4e88b Merge pull request #21039 from SegaraRai:use-pragma-message 2021-11-12 14:31:03 +00:00
Trutnev Aleksei
b525480b25
Merge pull request #20857 from alexgiving:atrutnev/move_API_samples
Move API sample code to tutorial_code location
2021-11-12 14:17:21 +00:00
Fabrice Fontaine
4c92a2869b modules/videoio/src/cap_ffmpeg_impl.hpp: fix build with gcc 4.8
Fix the following build failure with gcc 4.8:

In file included from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp💯0,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/cap_ffmpeg.cpp:50:
/home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/cap_ffmpeg_hw.hpp: In constructor 'HWAccelIterator::HWAccelIterator(cv::VideoAccelerationType, bool, AVDictionary*)':
/home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/cap_ffmpeg_hw.hpp:939:23: error: use of deleted function 'std::basic_istringstream<char>& std::basic_istringstream<char>::operator=(const std::basic_istringstream<char>&)'
             s_stream_ = std::istringstream(accel_list);
                       ^
In file included from /home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/arm-none-linux-gnueabi/include/c++/4.8.3/complex:45:0,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/core/include/opencv2/core/cvstd.inl.hpp:47,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/core/include/opencv2/core.hpp:3306,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/include/opencv2/videoio.hpp:46,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/precomp.hpp:57,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/cap_ffmpeg.cpp:42:
/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/arm-none-linux-gnueabi/include/c++/4.8.3/sstream:272:11: note: 'std::basic_istringstream<char>& std::basic_istringstream<char>::operator=(const std::basic_istringstream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_istringstream : public basic_istream<_CharT, _Traits>
           ^
/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/arm-none-linux-gnueabi/include/c++/4.8.3/sstream:272:11: error: use of deleted function 'std::basic_istream<char>& std::basic_istream<char>::operator=(const std::basic_istream<char>&)'

Fixes:
 - http://autobuild.buildroot.org/results/60f8846b435dafda0ced412d59ffe15bdff0810d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-11-12 09:50:17 +01:00
Alexander Alekhin
8041ab8a61
Merge pull request #21025 from alalek:issue_21004
* dnn(ocl4dnn): fix LRN layer accuracy problems

- FP16 intermediate computation is not accurate and may provide NaN values

* dnn(test): update tolerance for FP16
2021-11-12 01:54:07 +03:00
Alexander Alekhin
827ff80c06 Merge pull request #20977 from JulieBar:remap_overflow 2021-11-11 22:06:16 +00:00
Trutnev Aleksei
18ca998f67
Merge pull request #21040 from alexgiving:atrutnev/rename_RMatAdapter
GAPI: Rename MatAdapter to RMatOnMat
2021-11-11 14:52:38 +03:00
tv3141
cb286a66be
Merge pull request #21030 from tv3141:fix_seg_fault_houghlinespointset
Fix seg fault houghlinespointset

* Clarify parameter doc for HoughLinesPointSet

* Fix seg fault.

* Add regression test.

* Fix latex typo
2021-11-10 22:15:38 +03:00
SegaraRai
8444470e3a use #pragma message instead of #warning for non-GCC compilers 2021-11-11 03:14:19 +09:00
Alexander Alekhin
f33828a1ca Merge pull request #20870 from pkubaj:master 2021-11-10 16:08:20 +00:00
Piotr Kubaj
68e425f869 Add support for runtime CPU feature check on POWER on FreeBSD.
1. Code uses PPC_FEATURE_HAS_VSX, but it's not checked similarly to
PPC_FEATURE2_ARCH_3_00 and PPC_FEATURE2_ARCH_3_00 for availability. FreeBSD has
those macros in machine/cpu.h, but I went with the way chosen for
PPC_FEATURE2_ARCH_3_00 and PPC_FEATURE2_ARCH_3_00. Other than that, FreeBSD also
has sys/auxv.h and that's where elf_aux_info() is defined.
2. getauxval() is actually Linux-only, but code checked for __unix__. It won't
work on all UNIX, so change it back to __linux__. Add another code variant
strictly for FreeBSD.
3. Update comment. This commit adds code for FreeBSD, but recently there
appeared support for powerpc64 in OpenBSD.
2021-11-10 13:28:09 +00:00
Sergey Ivanov
da6344297a
Merge pull request #20901 from sivanov-work:merge_source_unite_perf_mod
G-API: oneVPL - Performance: Add async decode pipeline & add cached pool

* Add async decode pipeline & intro cached pool

* Fix performacne test with checking OPENCV_EXTRA

* Add sip perf test with no VPL

* Fix misprint

* Remove empty line..

* Apply some comments

* Apply some comments

* Make perf test fail if no OPENCV_TEST_DATA_PATH declared
2021-11-10 13:21:51 +00:00
Anna Khakimova
3cfca01372
Merge pull request #20664 from anna-khakimova:ak/resize_simd
Fluid: SIMD for Resize Linear 8UC3

* SIMD for fluid::Resize 8U3C

* Rework horizontal pass + add 8U4C case

* Reproduce stackoverflow test

* StackOverflow test

* SSE42 impl

* SSE42 impl improvement

* GAPI:SSE42 simd opt for Resize 8UC3. Final version

* Fix tests

* Conditional compilation fix

* Applied comments

* Applied comments. Step2

* Applied comments. Step2
2021-11-10 13:19:52 +00:00
Alexander Alekhin
d934bb15b0
Merge pull request #20998 from alalek:update_protobuf_3.19.1
3rdparty(protobuf): upgrade 3.5.2 => 3.19.1

* 3rdparty(protobuf): upgrade 3.5.2 => 3.19.1

* dnn: update protobuf files (3.19.1)

* 3rdparty(protobuf): re-apply OpenCV patch for custom fields (3.19.1)

* protobuf: suppress new build warnings

* protobuf: remove unused files
2021-11-10 12:03:45 +00:00
ZaKiiiiiiiii
98b6ce353c
Merge pull request #20904 from Crayon-new:fix_bug_in_maxLayer
fix bug: wrong output dimension when "keep_dims" is false in pooling layer.

* fix bug in max layer

* code align

* delete permute layer and add test case

* add name assert

* check other cases

* remove c++11 features

* style:add "const" remove assert

* style:sanitize file names
2021-11-09 19:24:04 +03:00
jcong
d2c1f1131b videoio: drop unnecessary offset for accessing video output buffer
Fix: #21021

NDK API AMediaCodec_getOutputBuffer() returns MediaCodecBuffer::data()
which is actually ABuffer::data(). The returned buffer address is already
adjusted by offset.

More info:
    ABuffer::base() returns base address without offset
    ABuffer::data() returns base + offset

Change-Id: I2936339ce4fa9acf657a5a7d92adc1275d7b28a1
2021-11-09 17:23:34 +08:00
Alexander Alekhin
a2716712ab highgui(win32): fix trackbar setRange 2021-11-06 15:19:22 +00:00
Alexander Alekhin
7842181b47 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-05 09:27:46 +00:00
Alexander Alekhin
2ce47fda88 Merge pull request #21011 from vrabaud:3.4 2021-11-05 09:25:50 +00:00
Vincent Rabaud
ffd010767f Only use fma functions when CV_FMA3 is set.
In practice, processors offering AVX2/AVX512 also FMA, that is why it got unnoticed.
2021-11-04 23:15:49 +01:00
Alexander Alekhin
562f2375c5 dnn(test): skip tests with high memory usage
- 32-bit configuration may fail due to memory fragmentation
2021-11-04 13:26:33 +00:00
Alexander Alekhin
edf533c83e Merge pull request #21007 from alalek:cmake_dnn_fix_wrong_tengine_order 2021-11-04 12:28:27 +00:00
Alexander Alekhin
c1d61c88e9 dnn(cmake): don't hijack OpenCL options with Tengine 2021-11-04 09:59:19 +00:00
Alexander Alekhin
6360b846c6 Merge pull request #21003 from APrigarina:add_test_qrdetect_fix 2021-11-03 22:32:00 +00:00
Alexander Alekhin
57900d07f0 Merge pull request #20882 from flytogcp:flytogcp-patch-1 2021-11-03 20:30:24 +00:00
APrigarina
8e72e1ed88 add test case for QR detect fix 2021-11-03 19:56:54 +00:00
Alexander Alekhin
10c547396d Merge pull request #20990 from alalek:fix_warnings_msvc_clang_dshow_3.4 2021-11-03 19:51:31 +00:00
cpengu
66dd871288 Update qrcode.cpp
Fixed issue #20880, QRDetect::searchHorizontalLines() boundary condition will skip the matched qrcode near the end
2021-11-03 19:45:24 +00:00
Alexander Alekhin
d484939c02
Merge pull request #20999 from alalek:dnn_replace_deprecated_calls
dnn(protobuf): replace deprecated calls

* dnn: replace deprecated ByteSize() => ByteSizeLong()

* dnn: replace deprecated calls, use GetRepeatedFieldRef
2021-11-03 15:59:36 +00:00
Alexander Alekhin
b3e16c6423 videoio(dshow): eliminate build warnings from MSVC-Clang 2021-11-02 19:22:47 +00:00
Souriya Trinh
30d6766db4 Add conventional Bayer naming. 2021-11-02 20:17:57 +01:00
Trutnev Aleksei
17234f82d0
Merge pull request #20836 from alexgiving:atrutnev/rename_Adapter_to_IAdapter
* Rename RMat::Adapter to RMat::IAdapter

* Add comments
2021-11-01 12:43:27 +00:00
Alexander Alekhin
7b57df02a7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-30 14:26:17 +00:00
Alexander Alekhin
b65ae3b036 Merge pull request #20982 from alalek:highgui_drop_cvGetWindowImageRect_4.x 2021-10-30 14:01:33 +00:00
Alexander Alekhin
bce76a7977 Merge pull request #20980 from alalek:highgui_fix_cvGetWindowImageRect_3.4 2021-10-30 13:59:08 +00:00
Alexander Alekhin
66f3e97457 highgui: drop invalid cvGetWindowImageRect 2021-10-30 12:47:07 +00:00
Alexander Alekhin
0ee61d178f highgui: drop invalid cvGetWindowImageRect
- return type is C++ template
- removal from 'extern "C"' scope broke ABI anyway, so this symbols is removed completelly
2021-10-30 12:40:20 +00:00
Alexander Alekhin
1ceba29f4b Merge pull request #20976 from alalek:issue_20968 2021-10-30 10:27:32 +00:00
Alexander Alekhin
40c748a2ae python: properly handle step for multichannel case 2021-10-29 18:29:19 +00:00
Julie Bareeva
69d0bc8fd5 Added overflow handling during conversion from float to int for LinearFilter 2021-10-29 19:46:11 +03:00
Trutnev Aleksei
6a73e5a720
Merge pull request #20922 from alexgiving:atrutnev/align_expect_assert_macros
GAPI: Align EXPECT/ASSERT macros

* Align TEST macros

* restart CI

* Fix ASSERT_GT in gapi_async_test
2021-10-29 16:30:35 +00:00
Alexander Alekhin
74cc63ba2f Merge pull request #20969 from alalek:fix_msvc_clang_warning_noreturn 2021-10-28 23:00:49 +00:00
Alexander Alekhin
0b6e360602 Merge pull request #20967 from alalek:fix_msvc_clang_unused_parameter 2021-10-28 22:27:41 +00:00
Alexander Alekhin
a49cda6523 core: eliminate Winvalid-noreturn in base.hpp 2021-10-28 21:33:20 +00:00
Alexander Alekhin
d612c72405 build: fix MSVC-Clang warnings about unused parameters in stubs 2021-10-28 21:08:36 +00:00
Maxim Pashchenkov
eb152d7431
Merge pull request #20937 from mpashchenkov:mp/ocv-gapi-warnings
G-API: Disable Windows warnings with 4996 code

* Windows warnings 4503 and 4996 are disabled with dnn style

* Applying comments to review

* Reproducing

* Added check MSVC_VERSION for both warnings
2021-10-28 18:19:46 +00:00
Alexander Alekhin
6bd143dd25 Merge pull request #20961 from alalek:fix_msvc_clang 2021-10-28 13:54:24 +00:00
Alexander Alekhin
770d3eabc0 Merge pull request #20960 from alalek:fix_icc_support_3.4 2021-10-28 13:54:07 +00:00
Alexander Alekhin
75e2ba5af3 core(simd): fix compilation with MSVC-Clang 2021-10-28 11:25:00 +00:00
Alexander Alekhin
1726bb6c0d build(icc): fix nodiscard attribute handling 2021-10-28 05:52:22 +00:00
Alexander Alekhin
83afd09f13 Merge pull request #20950 from Harvey-Huang:master 2021-10-27 20:09:51 +00:00
Alexander Alekhin
d059cc7170 Merge pull request #20958 from noahstier:3.4_tvl1_optimization 2021-10-27 19:59:57 +00:00
Noah Stier
84a81579ba tvl1 cuda optflow optimization 2021-10-27 12:01:53 -07:00
shengyu
9dadc06e64 remove redundant semicolons 2021-10-27 20:19:05 +08:00
Alexander Alekhin
60f949e36f Merge pull request #20924 from alexgiving:atrutnev/fix_gkernel_documentation 2021-10-27 09:17:16 +00:00
Harvey
af154e3053 fixed bug: opencv read tif file convert Palette color image as grayscale image 2021-10-27 14:10:11 +08:00
MaximMilashchenko
0a71063530
Merge pull request #20942 from MaximMilashchenko:AudioPatch
Audio patch

* fixed microphone, audio position

* fixed docs

* changed AudioOpenCheck
2021-10-26 14:33:53 +00:00
Alexander Alekhin
6a2077cbd8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-23 15:33:31 +00:00
Alexander Alekhin
aa11cc19e8 Merge pull request #20919 from berak:patch-1 2021-10-22 14:08:08 +00:00
Harvey
9267536fee
Merge pull request #20875 from Harvey-Huang:master
* bmp specified BI_BITFIELDS should take care RGBA bit mask

* change the name

* support xrgb bmp file

* support xrgb bmp file(add test case)

* update testing code
2021-10-22 17:04:19 +03:00
berak
a6f5717567 resolves #20913
imgproc: remove asserts for circles_ in HoughCircles
2021-10-22 15:07:57 +02:00
atrutnev
0a58d6812a fix gkernel Doxygen documentation 2021-10-22 11:06:09 +03:00
Sergey Ivanov
d376fe9e17
Merge pull request #20921 from sivanov-work:atl_patch
G-API: FIX OpenVINO build - Add CComPtr RAII replacement into G-API sample

* Add CComPtr RAII replacement into G-API sample

* Remove completely `atlbase.h'
2021-10-21 16:12:03 +00:00
AleksandrPanov
d21622bef4 fix findMinEnclosingTriangle and add tests 2021-10-21 18:12:51 +03:00
Maksim Shabunin
7febec49b2
Merge pull request #20614 from mshabunin:use-onevpl-load
videoio: use oneVPL load mechanism, encoder bitrate estimation

* videoio: updated oneVPL support - use mfxLoad

* videoio: advanced bitrate estimation for MFX encoder

* videoio: improved MediaSDK/oneVPL/libva detection

* videoio(ffmpeg): don't try oneVPL

* videoio(test): tune checks of videoio_mfx.read_write_raw tests

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-10-21 13:56:11 +00:00
Alexander Alekhin
4e65db80e8 Merge pull request #20916 from Harvey-Huang:32bit_rgb 2021-10-21 11:45:48 +00:00
Alexander Alekhin
c0c71d6b3a Merge pull request #20920 from alalek:hotfix_clang_abi 2021-10-21 11:35:58 +00:00
Alexander Alekhin
bac1c6d12f hotfix: repair Clang ABI 2021-10-21 09:36:25 +00:00
Harvey
ce68291d83 32bit rgb bmp file should not copy data as rgba 2021-10-21 16:47:27 +08:00
Alexander Alekhin
ec10f2e72b Merge pull request #20877 from rogday:simple_layers 2021-10-20 17:00:38 +00:00
MaximMilashchenko
f36c268b9e
Merge pull request #19721 from MaximMilashchenko:Audio
add audio support in cap_msmf

* audio msmf

* fixed warnings

* minor fix

* fixed SampleTime MSMF

* minor fix, fixed audio test, retrieveAudioFrame

* fixed warnings

* impelemented sync audio and video stream with start offset

* fixed error

* fixed docs

* fixed audio sample

* CAP_PROP_AUDIO_POS, minor fixed

* fixed warnings

* videoio(MSMF): update audio test checks, add debug logging

* fixed

* fixed desynchronization of time positions, warnings

* fixed warnings

* videoio(audio): tune tests checks

* videoio(audio): update properties description

* build warnings

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-10-20 16:18:24 +03:00
Sergey Ivanov
1f9a7b8fd3
Merge pull request #20738 from sivanov-work:merge_master_vpl_dev_select
G-API: oneVPL - Implement IDeviceSelector & default cfg_param-based selector

* Initial commit

* Add MACRO undef

* Change IDeviceSelector, Change Inf sample for choose external device

* Fix compilation

* Address some comments

* Fix compilation

* Add missing header

* Add EXPORT to dev selector

* Add guard

* Remove enum type attr

* Fix compilation without VPL

* Add HAVE_INFER guard in sample

* Remove unusable include from tests

* Remove unusable include from sample

* Remove cl_d3d11 header from unit test
2021-10-20 12:43:32 +03:00
Alexander Alekhin
d33a048d89 Merge pull request #20892 from alalek:issue_20888 2021-10-19 19:45:35 +00:00
Zhuo Zhang
7da51787b9
Merge pull request #20900 from zchrissirhcz:3.4-hwfeatures-support-qnx
* fix: correctly check neon flags for QNX platform

* refactor: change __QNXNTO__ to __QNX__
2021-10-19 13:30:27 +00:00
Alexander Alekhin
b1f422c1c5 Merge pull request #20894 from alalek:core_simd_int64_ctor_sse 2021-10-19 13:29:52 +00:00
rogday
b3f966e2ca
Merge pull request #20883 from rogday:eltwise_refactoring
* backport elementwise_layers refactor

* keep NULL
2021-10-19 13:29:22 +00:00
Michel Promonet
9a9e457dd6 Allow to set av_log_set_level to reduce ffmpeg level below AV_LOG_ERROR 2021-10-19 10:46:41 +02:00
Alexander Alekhin
b5fcb06a76 core(SIMD): update int64 SSE constructor 2021-10-18 18:59:40 +00:00
Anatoliy Talamanov
b5a9a6793b
Merge pull request #20856 from TolyaTalamanov:at/cfg-batch-size
G-API: Extend ie::Params to specify batch size

* Add cfgBatchSize to ie::Params

* Fix comments to review
2021-10-18 19:31:48 +03:00
Sergey Ivanov
0cf79155d4
Merge pull request #20773 from sivanov-work:merge_vpl_source_unite
G-API: oneVPL (simplification) unite components in entire VPL source

* Unify components in VPLSource

* Revert back decode WRN & Add compile guard

* Address come comments

* Add source alias

* Apply comment for exception handling
2021-10-18 19:20:55 +03:00
Sergiu Deitsch
f8f9f3c438 fixed AVX compile error
Some older compilers do not allow to pass a `const int` as an immediate. Use an unnamed enum instead.
2021-10-18 14:56:19 +02:00
Alexander Alekhin
1926e919be dnn(int8): fix using of incorrect UMat constructor 2021-10-18 04:46:00 +00:00
Wehzie
f9e747dbc6 Fixed typo in CV_Error message
Error was "Input parameters must be a matrices!", but "matrices" is plural and doesn't allow the unspecific article "a".
2021-10-17 15:37:14 +03:00
Alexander Alekhin
0e86e292e4 Merge pull request #20885 from alalek:cmake_fix_python_submodules 2021-10-15 15:34:30 +00:00
Alexander Alekhin
a590682764 cmake: update installation of python extra submodules
- support Python standalone builds
- loader installs submodules unconditionally
2021-10-15 14:21:31 +00:00
Alexander Alekhin
31c40fa4cc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-15 13:35:03 +00:00
Smirnov Egor
1feb3838b5 add Ceil, Floor, Log, Round, Sqrt, Not, Equal, Less, Greater 2021-10-15 16:02:46 +03:00
Nicholas Ho
bd0732b1d0
Merge pull request #20740 from Nicholas-Ho-arm:3.4_SymmColumnVec_32f8u
* Add SymmColumnVec_32f8u

* Fix double to float warnings
2021-10-15 11:47:53 +00:00
Alexander Alekhin
3c8cadf7ca Merge pull request #20867 from alalek:fix_CV_POPCNT_U64_msvs 2021-10-13 17:08:58 +00:00
Alexander Alekhin
7c0b26e8a0 Merge pull request #20834 from sthalik:msvc-shared-library-static-crt 2021-10-13 14:21:08 +00:00
Alexander Alekhin
982503e9a8 core: ensure 'int' result from CV_POPCNT_U64(x) 2021-10-13 01:14:37 +00:00
Stanislaw Halik
3d93675ff9 fix link error on shared libs with -MT 2021-10-12 17:50:31 +02:00
Alexander Alekhin
53d6c9b9c0 Merge pull request #20860 from rogday:sum_fix 2021-10-12 15:36:32 +00:00
Smirnov Egor
238dbffb48 change asserts for Sum 2021-10-11 20:59:44 +03:00
Smirnov Egor
a9d7b6eab7 fix const - input and remove unimplemented function 2021-10-11 18:58:10 +03:00
Alexander Alekhin
39c3334147 Merge tag '4.5.4' 2021-10-10 00:22:46 +00:00
Alexander Alekhin
4223495e6c release: OpenCV 4.5.4 2021-10-09 15:48:26 +00:00
Alexander Alekhin
023e86d68f Merge pull request #20848 from alalek:reverse_plugins_candidates_order 2021-10-09 15:45:17 +00:00
Yaniv Hollander
ac57be91e1
Merge pull request #20721 from YanivHollander:DocFixes
Doc fixes

* Update imgproc.hpp

* Update imgproc.hpp
2021-10-09 15:43:50 +00:00
Alexander Alekhin
c2e65bafb5 Merge pull request #20846 from alalek:issue_19947 2021-10-09 06:22:02 +00:00
Alexander Alekhin
74161b2122 Merge pull request #20847 from alalek:fix_build_js_simd_tests 2021-10-09 05:59:24 +00:00
Alexander Alekhin
39ee5c5a46 plugins: reverse candidates order to fetch higher versions first 2021-10-08 20:34:07 +00:00
Alexander Alekhin
788f330d07 js: fix build of SIMD tests 2021-10-08 20:15:41 +00:00
Alexander Alekhin
af56151231 highgui(docs): we don't support 32-bit integer images in imshow() 2021-10-08 19:51:18 +00:00
Yuantao Feng
34d359fe03
Merge pull request #20422 from fengyuentau:dnn_face
Add DNN-based face detection and face recognition into modules/objdetect

* Add DNN-based face detector impl and interface

* Add a sample for DNN-based face detector

* add recog

* add notes

* move samples from samples/cpp to samples/dnn

* add documentation for dnn_face

* add set/get methods for input size, nms & score threshold and topk

* remove the DNN prefix from the face detector and face recognizer

* remove default values in the constructor of impl

* regenerate priors after setting input size

* two filenames for readnet

* Update face.hpp

* Update face_recognize.cpp

* Update face_match.cpp

* Update face.hpp

* Update face_recognize.cpp

* Update face_match.cpp

* Update face_recognize.cpp

* Update dnn_face.markdown

* Update dnn_face.markdown

* Update face.hpp

* Update dnn_face.markdown

* add regression test for face detection

* remove underscore prefix; fix warnings

* add reference & acknowledgement for face detection

* Update dnn_face.markdown

* Update dnn_face.markdown

* Update ts.hpp

* Update test_face.cpp

* Update face_match.cpp

* fix a compile error for python interface; add python examples for face detection and recognition

* Major changes for Vadim's comments:

* Replace class name FaceDetector with FaceDetectorYN in related failes

* Declare local mat before loop in modules/objdetect/src/face_detect.cpp

* Make input image and save flag optional in samples/dnn/face_detect(.cpp, .py)

* Add camera support in samples/dnn/face_detect(.cpp, .py)

* correct file paths for regression test

* fix convertion warnings; remove extra spaces

* update face_recog

* Update dnn_face.markdown

* Fix warnings and errors for the default CI reports:

* Remove trailing white spaces and extra new lines.

* Fix convertion warnings for windows and iOS.

* Add braces around initialization of subobjects.

* Fix warnings and errors for the default CI systems:

* Add prefix 'FR_' for each value name in enum DisType to solve the
redefinition error for iOS compilation; Modify other code accordingly

* Add bookmark '#tutorial_dnn_face' to solve warnings from doxygen

* Correct documentations to solve warnings from doxygen

* update FaceRecognizerSF

* Fix the error for CI to find ONNX models correctly

* add suffix f to float assignments

* add backend & target options for initializing face recognizer

* add checkeq for checking input size and preset size

* update test and threshold

* changes in response to alalek's comments:

* fix typos in samples/dnn/face_match.py

* import numpy before importing cv2

* add documentation to .setInputSize()

* remove extra include in face_recognize.cpp

* fix some bugs

* Update dnn_face.markdown

* update thresholds; remove useless code

* add time suffix to YuNet filename in test

* objdetect: update test code
2021-10-08 19:13:49 +00:00
Alexander Alekhin
4672dbda2a Merge pull request #20818 from rogday:yolov4x_mish_cuda 2021-10-08 19:12:43 +00:00
Alexander Alekhin
62252d157e Merge tag '3.4.16' 2021-10-08 19:05:00 +00:00
Alexander Alekhin
b1cf550123 release: OpenCV 3.4.16 2021-10-08 18:31:56 +00:00
Smirnov Egor
9c84749e2c backport YOLOv4x-mish new_coords CUDA implementation 2021-10-08 14:14:49 +03:00
Alexander Alekhin
cca4c47781 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-08 11:05:45 +00:00
Alexander Alekhin
17bd9a1fa1 Merge pull request #20841 from alalek:core_keep_TlsAbstraction_singleton_3.4 2021-10-08 07:01:05 +00:00
Alexander Alekhin
81e7988eb9 Merge pull request #20840 from alalek:dnn_ocl_cleanup_code 2021-10-08 05:07:51 +00:00
Alexander Alekhin
4985311d46 core(tls): avoid destruction of TlsAbstraction singleton 2021-10-08 03:12:58 +00:00