platform/upstream/opencv.git
3 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Sat, 13 Mar 2021 13:02:18 +0000 (13:02 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

3 years agoMerge pull request #19284 from Ziachnix:feature/js-qr-code-detector
Ziachnix [Sat, 13 Mar 2021 12:52:44 +0000 (13:52 +0100)]
Merge pull request #19284 from Ziachnix:feature/js-qr-code-detector

Add QRCodeDetector to JavaScript Build

* ADD: js support for qrCodeDetector

- cherry picked commit to solve rebase error

* CHG. Revert haarcascade path

* FIX: Tests without images

* ADD: decodeCurved

* js(docs): don't require OPENCV_TEST_DATA_PATH

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
3 years agoMerge pull request #19720 from alalek:ocl_test_skip_spir_amd
Alexander Alekhin [Sat, 13 Mar 2021 12:48:20 +0000 (12:48 +0000)]
Merge pull request #19720 from alalek:ocl_test_skip_spir_amd

3 years agoMerge pull request #19718 from alalek:backport_19683
Alexander Alekhin [Sat, 13 Mar 2021 12:46:24 +0000 (12:46 +0000)]
Merge pull request #19718 from alalek:backport_19683

3 years agoMerge pull request #19717 from danbey:bad_value_param_should_be_passed_by_reference
Alexander Alekhin [Sat, 13 Mar 2021 12:45:55 +0000 (12:45 +0000)]
Merge pull request #19717 from danbey:bad_value_param_should_be_passed_by_reference

3 years agoMerge pull request #19716 from l-bat:lb/fix_resize
Alexander Alekhin [Sat, 13 Mar 2021 12:45:07 +0000 (12:45 +0000)]
Merge pull request #19716 from l-bat:lb/fix_resize

3 years agocore(ocl): skip SPIR test on AMD devices if problem detected
Alexander Alekhin [Sat, 13 Mar 2021 05:56:40 +0000 (05:56 +0000)]
core(ocl): skip SPIR test on AMD devices if problem detected

3 years agonoexcept def construct Mat, UMat, Mat_, MatSize, MatStep
Dale Phurrough [Mon, 1 Mar 2021 21:42:13 +0000 (22:42 +0100)]
noexcept def construct Mat, UMat, Mat_, MatSize, MatStep

original commit: 1b0f781b7cc18562b59ef60fb303ce0f9cea9f78

3 years agoAvoiding copy by passing param by reference
Dan Ben Yosef [Fri, 12 Mar 2021 19:17:11 +0000 (14:17 -0500)]
Avoiding copy by passing param by reference

It is best to pass bad_value_ param by reference to avoid copy.

3 years agoAdded ngraph::op::v6::MVN
Liubov Batanina [Fri, 12 Mar 2021 13:33:16 +0000 (16:33 +0300)]
Added ngraph::op::v6::MVN

3 years agoMerge pull request #19707 from AsyaPronina:asyadev/upstream_fixes_from_release
Alexander Alekhin [Fri, 12 Mar 2021 14:27:41 +0000 (14:27 +0000)]
Merge pull request #19707 from AsyaPronina:asyadev/upstream_fixes_from_release

3 years agoMerge pull request #19715 from seiko2plus:issue_19698
Alexander Alekhin [Fri, 12 Mar 2021 09:45:19 +0000 (09:45 +0000)]
Merge pull request #19715 from seiko2plus:issue_19698

3 years agoAdded ngraph::op::v4::Interpolation
Liubov Batanina [Fri, 12 Mar 2021 09:00:59 +0000 (12:00 +0300)]
Added ngraph::op::v4::Interpolation

3 years agocore:ppc64 fix detecting CPU features when optimization is off
Sayed Adel [Fri, 12 Mar 2021 02:02:31 +0000 (02:02 +0000)]
core:ppc64 fix detecting CPU features when optimization is off

3 years agoMerge pull request #19683 from diablodale:add_defconstruct_noexcept_matumat
Alexander Alekhin [Thu, 11 Mar 2021 22:02:06 +0000 (22:02 +0000)]
Merge pull request #19683 from diablodale:add_defconstruct_noexcept_matumat

3 years agoMerge pull request #19253 from mightbxg:bugfix_PnPRansac
Xinguang Bian [Thu, 11 Mar 2021 21:53:06 +0000 (05:53 +0800)]
Merge pull request #19253 from mightbxg:bugfix_PnPRansac

* fix unexpected Exception in solvePnPRansac caused by input points

* calib3d: solvePnPRansac - keep minimal changes to handle DLT 6 points requirement

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
3 years agoMerge pull request #19703 from danbey:setting_StereoSGBMParams_in_init_list
Alexander Alekhin [Thu, 11 Mar 2021 21:33:19 +0000 (21:33 +0000)]
Merge pull request #19703 from danbey:setting_StereoSGBMParams_in_init_list

3 years agoUpstream fixes from release
Anastasiya Pronina [Thu, 11 Mar 2021 10:25:36 +0000 (13:25 +0300)]
Upstream fixes from release

3 years agoInit params (StereoSGBMParams) in StereoSGBMImpl constructor initialization list
Dan Ben Yosef [Wed, 10 Mar 2021 18:00:17 +0000 (13:00 -0500)]
Init params (StereoSGBMParams) in StereoSGBMImpl constructor initialization list

    To improve preformence it is better to init the params (StereoSGBMParams) in the
    initialization list.

3 years agoMerge pull request #19222 from YashasSamaga:cuda4dnn-fix-build-diagnostics
Alexander Alekhin [Wed, 10 Mar 2021 17:40:36 +0000 (17:40 +0000)]
Merge pull request #19222 from YashasSamaga:cuda4dnn-fix-build-diagnostics

3 years agoMerge pull request #19542 from OrestChura:oc/BGSub_ptest
Orest Chura [Wed, 10 Mar 2021 17:37:55 +0000 (20:37 +0300)]
Merge pull request #19542 from OrestChura:oc/BGSub_ptest

[G-API]: Performance tests for BackgroundSubtractor

* Perf.Tests for BackgroundSubtractor kernel

* Fix CI

* Addressing comments

* Addressing a comment

* Test cycle and validation changes

* Addressing  comment

* Added assert

3 years agoMerge pull request #19613 from WeiChungChang:NMS_refine
Alexander Alekhin [Wed, 10 Mar 2021 17:36:57 +0000 (17:36 +0000)]
Merge pull request #19613 from WeiChungChang:NMS_refine

3 years agoMerge pull request #18240 from mpashchenkov:mp/ocv-gapi-input-cnn-reshape
Maxim Pashchenkov [Wed, 10 Mar 2021 16:06:46 +0000 (19:06 +0300)]
Merge pull request #18240 from mpashchenkov:mp/ocv-gapi-input-cnn-reshape

[G-API]: Adding reshape for CNN input.

* Added CNN input IE reshape

* rbs

* Added unordered_set instead vector

* Alignment

3 years agoboost NMS performance
Qoo [Wed, 24 Feb 2021 09:32:45 +0000 (04:32 -0500)]
boost NMS performance

3 years agoMerge pull request #19617 from smirnov-alexey:as/extend_kernel_package_api
Alexey Smirnov [Wed, 10 Mar 2021 15:58:34 +0000 (18:58 +0300)]
Merge pull request #19617 from smirnov-alexey:as/extend_kernel_package_api

G-API: Extend GKernelPackage and serialization API

* Extend GKernelPackage API

* Adding tests

* Extend serialization API

* Address review comments

3 years agoMerge pull request #19692 from seiko2plus:issue_19647
Alexander Alekhin [Tue, 9 Mar 2021 18:14:41 +0000 (18:14 +0000)]
Merge pull request #19692 from seiko2plus:issue_19647

3 years agoMerge pull request #19619 from amirtu:OCV-221_get_and_set_cameras_on_stitcher
Amir Tulegenov [Tue, 9 Mar 2021 17:51:40 +0000 (23:51 +0600)]
Merge pull request #19619 from amirtu:OCV-221_get_and_set_cameras_on_stitcher

* Get and set cameras for sticher.

* Code review fixes.

Co-authored-by: amir.tulegenov <amir.tulegenov@xperience.ai>
Co-authored-by: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
3 years agocore:ppc64 fix the build with the newer versions of Eigen on IBM/Power
Sayed Adel [Mon, 8 Mar 2021 19:13:12 +0000 (19:13 +0000)]
core:ppc64 fix the build with the newer versions of Eigen on IBM/Power

   It also fixes the build when universal intrinsics is disabled
   via `-DDCV_ENABLE_INTRINSICS=OFF`.

3 years agoMerge pull request #19690 from hedgepigdaniel:fix/calibration_fisheye
Daniel Playfair Cal [Tue, 9 Mar 2021 15:09:08 +0000 (02:09 +1100)]
Merge pull request #19690 from hedgepigdaniel:fix/calibration_fisheye

* fix(samples/camera_calibration): set new camera matrix for fisheye

* fix(camera_calibration): ignore inapplicable flags for fisheye

3 years agoMerge pull request #19688 from alalek:videoio_docs_hwaccel
Alexander Alekhin [Tue, 9 Mar 2021 15:06:43 +0000 (15:06 +0000)]
Merge pull request #19688 from alalek:videoio_docs_hwaccel

3 years agoMerge pull request #19675 from asmorkalov:as/pylint_warnings
Alexander Alekhin [Tue, 9 Mar 2021 09:43:52 +0000 (09:43 +0000)]
Merge pull request #19675 from asmorkalov:as/pylint_warnings

3 years agoRemoved unused variables found by pylint.
Alexander Smorkalov [Thu, 4 Mar 2021 14:05:15 +0000 (17:05 +0300)]
Removed unused variables found by pylint.

3 years agoMerge pull request #19685 from danbey:setting_stereoBMImpl_in_init_list
Dan Ben-Yosef [Sun, 7 Mar 2021 17:06:08 +0000 (19:06 +0200)]
Merge pull request #19685 from danbey:setting_stereoBMImpl_in_init_list

Init params (StereoBMParams) in StereoBMImpl constructor initialization list

* Init StereoBMImpl in initialization list

To improve preformence it is better to init the params (StereoBMImpl) in the
initialization list.

* coding style

* drop useless copy/move ctor

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
3 years agoMerge pull request #19687 from alalek:videoio_docs_fixes_3.4
Alexander Alekhin [Sun, 7 Mar 2021 16:23:24 +0000 (16:23 +0000)]
Merge pull request #19687 from alalek:videoio_docs_fixes_3.4

3 years agovideoio(doc): add 'videoio_hwaccel' group, fix typos
Alexander Alekhin [Sun, 7 Mar 2021 04:19:26 +0000 (04:19 +0000)]
videoio(doc): add 'videoio_hwaccel' group, fix typos

3 years agovideoio(docs): fixes
Alexander Alekhin [Sun, 7 Mar 2021 04:26:49 +0000 (04:26 +0000)]
videoio(docs): fixes

3 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Sat, 6 Mar 2021 17:29:12 +0000 (17:29 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

3 years agoMerge pull request #19622 from terfendail:ref_doc
Vitaly Tuzov [Sat, 6 Mar 2021 17:22:21 +0000 (20:22 +0300)]
Merge pull request #19622 from terfendail:ref_doc

* Updated cpp reference implementations for a few intrinsics to address wide universal intrinsics as well

* Updated cpp reference implementations for a few more universal intrinsics

3 years agoMerge pull request #19641 from LupusSanctus:am/tf_reshape
Alexander Alekhin [Sat, 6 Mar 2021 17:21:34 +0000 (17:21 +0000)]
Merge pull request #19641 from LupusSanctus:am/tf_reshape

3 years agoMerge pull request #19680 from alalek:cmake_update_python_linters
Alexander Alekhin [Sat, 6 Mar 2021 17:20:02 +0000 (17:20 +0000)]
Merge pull request #19680 from alalek:cmake_update_python_linters

3 years agofix checkVersions()
YashasSamaga [Sat, 6 Mar 2021 13:33:03 +0000 (19:03 +0530)]
fix checkVersions()

3 years agoMerge pull request #19671 from SamFC10:sam-darknet
Alexander Alekhin [Fri, 5 Mar 2021 15:12:20 +0000 (15:12 +0000)]
Merge pull request #19671 from SamFC10:sam-darknet

3 years agoMerge pull request #19565 from cyyever:minor_fix
cyy [Fri, 5 Mar 2021 15:04:51 +0000 (23:04 +0800)]
Merge pull request #19565 from cyyever:minor_fix

Local objects optimization in calibration init

* use emplace_back

* use {} initilization

* remove a tailing white space

3 years agoMerge pull request #19583 from theroyalpekka:patch-1
Mradul Agrawal [Fri, 5 Mar 2021 13:55:52 +0000 (19:25 +0530)]
Merge pull request #19583 from theroyalpekka:patch-1

* Update polynom_solver.cpp

This pull request is in the response to Issue  #19526. I have fixed the problem with the cube root calculation of 2*R. The Issue was in the usage of pow function with negative values of R, but if it is calculated for only positive values of R then changing x0 according to the parity of R, the Issue is resolved. Kindly consider it, Thanks!

* add cv::cubeRoot(double)

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
3 years agoMerge pull request #19655 from raaldrid:EXR_rw_alpha_support_16115
Alexander Alekhin [Fri, 5 Mar 2021 13:54:31 +0000 (16:54 +0300)]
Merge pull request #19655 from raaldrid:EXR_rw_alpha_support_16115

3 years agocmake: update Python linters handling
Alexander Alekhin [Fri, 5 Mar 2021 12:54:51 +0000 (12:54 +0000)]
cmake: update Python linters handling

- exclude from getBuildInformation()
- fix pylint version

3 years agoMerge pull request #19677 from APrigarina:detection_fix
Alexander Alekhin [Fri, 5 Mar 2021 08:40:26 +0000 (08:40 +0000)]
Merge pull request #19677 from APrigarina:detection_fix

3 years agoAligned TF Reshape layer behaviour
Anastasia Murzova [Sun, 28 Feb 2021 16:55:43 +0000 (19:55 +0300)]
Aligned TF Reshape layer behaviour

3 years agofix false positive detection
APrigarina [Thu, 4 Mar 2021 11:04:50 +0000 (14:04 +0300)]
fix false positive detection

3 years agoMerge pull request #19668 from asmorkalov:as/filesystem_py
Alexander Smorkalov [Thu, 4 Mar 2021 16:17:57 +0000 (19:17 +0300)]
Merge pull request #19668 from asmorkalov:as/filesystem_py

* Add Python Bindings for getCacheDirectory function

* Added getCacheDirectory interop test with image codecs.

Co-authored-by: Sergey Slashchinin <sergei.slashchinin@xperience.ai>
3 years agoMerge pull request #19674 from l-bat:lb/fix_ie_tests
Alexander Alekhin [Thu, 4 Mar 2021 14:52:20 +0000 (14:52 +0000)]
Merge pull request #19674 from l-bat:lb/fix_ie_tests

3 years agoDetermine layout
Liubov Batanina [Thu, 4 Mar 2021 10:05:01 +0000 (13:05 +0300)]
Determine layout

3 years agoMerge pull request #19607 from alalek:backport_19606
Alexander Alekhin [Wed, 3 Mar 2021 21:10:57 +0000 (21:10 +0000)]
Merge pull request #19607 from alalek:backport_19606

3 years agoAdded Spatial Attention Module in Darknet Importer
SamFC10 [Wed, 3 Mar 2021 17:12:47 +0000 (22:42 +0530)]
Added Spatial Attention Module in Darknet Importer

3 years agoMerge pull request #19539 from asmorkalov:as/calib_fix_focal_length
Alexander Smorkalov [Wed, 3 Mar 2021 14:06:59 +0000 (17:06 +0300)]
Merge pull request #19539 from asmorkalov:as/calib_fix_focal_length

* Added CALIB_FIX_FOCAL_LENGTH to fisheye calibration #13450

Sometimes you want to calibrate just the principal point of a camera, or just the distortion coefficients. In this case, you can pass the CALIB_FIX_FOCAL_LENGTH flag to keep Fx and Fy

* Added test for CALIB_FIX_FOCAL_LENGTH option in fisheye callinration.

3 years agoMerge pull request #19666 from alalek:update_ffmpeg_4.x
Alexander Alekhin [Wed, 3 Mar 2021 13:06:44 +0000 (13:06 +0000)]
Merge pull request #19666 from alalek:update_ffmpeg_4.x

3 years agoMerge pull request #19669 from alalek:fix_static_analyzer_issues_4.x
Alexander Alekhin [Wed, 3 Mar 2021 12:26:54 +0000 (12:26 +0000)]
Merge pull request #19669 from alalek:fix_static_analyzer_issues_4.x

3 years agoffmpeg/4.x: update FFmpeg wrapper 2021.03
Alexander Alekhin [Wed, 3 Mar 2021 00:53:46 +0000 (00:53 +0000)]
ffmpeg/4.x: update FFmpeg wrapper 2021.03

- FFmpeg 4.3.2

3 years agoMerge pull request #19665 from alalek:update_ffmpeg_3.4
Alexander Alekhin [Wed, 3 Mar 2021 11:22:56 +0000 (11:22 +0000)]
Merge pull request #19665 from alalek:update_ffmpeg_3.4

3 years agoMerge pull request #19667 from alalek:hotfix_ffmpeg_hw_accel
Alexander Alekhin [Wed, 3 Mar 2021 11:08:55 +0000 (11:08 +0000)]
Merge pull request #19667 from alalek:hotfix_ffmpeg_hw_accel

3 years agostatic analyzer issues
Alexander Alekhin [Wed, 3 Mar 2021 09:10:00 +0000 (09:10 +0000)]
static analyzer issues

3 years agovideoio(ffmpeg): fix VIDEO_ACCELERATION_ANY handling
Alexander Alekhin [Wed, 3 Mar 2021 08:41:30 +0000 (08:41 +0000)]
videoio(ffmpeg): fix VIDEO_ACCELERATION_ANY handling

- default is VIDEO_ACCELERATION_NONE

3 years agoMerge pull request #19657 from alalek:update_version_4.5.2-pre
Alexander Alekhin [Wed, 3 Mar 2021 00:26:37 +0000 (00:26 +0000)]
Merge pull request #19657 from alalek:update_version_4.5.2-pre

3 years agoffmpeg/3.4: update FFmpeg wrapper 2021.03
Alexander Alekhin [Tue, 2 Mar 2021 23:56:27 +0000 (23:56 +0000)]
ffmpeg/3.4: update FFmpeg wrapper 2021.03

- FFmpeg 3.4.8

3 years agocore: rework code locality
Alexander Alekhin [Tue, 23 Feb 2021 00:22:06 +0000 (00:22 +0000)]
core: rework code locality

- to reduce binaries size of FFmpeg Windows wrapper
- MinGW linker doesn't support -ffunction-sections (used for FFmpeg Windows wrapper)
- move code to improve locality with its used dependencies
- move UMat::dot() to matmul.dispatch.cpp (Mat::dot() is already there)
- move UMat::inv() to lapack.cpp
- move UMat::mul() to arithm.cpp
- move UMat:eye() to matrix_operations.cpp (near setIdentity() implementation)
- move normalize(): convert_scale.cpp => norm.cpp
- move convertAndUnrollScalar(): arithm.cpp => copy.cpp
- move scalarToRawData(): array.cpp => copy.cpp
- move transpose(): matrix_operations.cpp => matrix_transform.cpp
- move flip(), rotate(): copy.cpp => matrix_transform.cpp (rotate90 uses flip and transpose)
- add 'OPENCV_CORE_EXCLUDE_C_API' CMake variable to exclude compilation of C-API functions from the core module
- matrix_wrap.cpp: add compile-time checks for CUDA/OpenGL calls
- the steps above allow to reduce FFmpeg wrapper size for ~1.5Mb (initial size of OpenCV part is about 3Mb)

backport is done to improve merge experience (less conflicts)
backport of commit: 65eb9467567598c08049bb190a4f3d3cbfabdcd0

3 years agopre: OpenCV 4.5.2 (version++)
Alexander Alekhin [Mon, 1 Mar 2021 21:45:26 +0000 (21:45 +0000)]
pre: OpenCV 4.5.2 (version++)

3 years agoMerge pull request #19606 from alalek:reduce_ffmpeg_wrapper_size_4.x
Alexander Alekhin [Tue, 2 Mar 2021 23:20:44 +0000 (23:20 +0000)]
Merge pull request #19606 from alalek:reduce_ffmpeg_wrapper_size_4.x

3 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Tue, 2 Mar 2021 21:46:30 +0000 (21:46 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

3 years agoMerge pull request #19656 from alalek:update_version_3.4.14-pre
Alexander Alekhin [Tue, 2 Mar 2021 21:44:19 +0000 (21:44 +0000)]
Merge pull request #19656 from alalek:update_version_3.4.14-pre

3 years agopre: OpenCV 3.4.14 (version++)
Alexander Alekhin [Mon, 1 Mar 2021 21:38:18 +0000 (21:38 +0000)]
pre: OpenCV 3.4.14 (version++)

3 years agoMerge pull request #19661 from alalek:ffmpeg_fixes_3.4
Alexander Alekhin [Tue, 2 Mar 2021 20:41:05 +0000 (23:41 +0300)]
Merge pull request #19661 from alalek:ffmpeg_fixes_3.4

* videoio(ffmpeg): eliminate MSVC build warnings

* videoio(ffmpeg): update initialization code

- repair FFmpeg logger settings on each .open() call

3 years agoEXR alpha support for 4 channel reading and writing. Issue https://github.com/opencv...
Rachel A [Mon, 1 Mar 2021 18:57:22 +0000 (10:57 -0800)]
EXR alpha support for 4 channel reading and writing.  Issue https://github.com/opencv/opencv/issues/16115.

3 years agoMerge pull request #19663 from mshabunin:fix-ffmpeg-1x
Alexander Alekhin [Tue, 2 Mar 2021 12:19:00 +0000 (12:19 +0000)]
Merge pull request #19663 from mshabunin:fix-ffmpeg-1x

3 years agoMerge pull request #19660 from alalek:update_openjpeg
Alexander Alekhin [Tue, 2 Mar 2021 12:16:43 +0000 (12:16 +0000)]
Merge pull request #19660 from alalek:update_openjpeg

3 years agoMerge pull request #19659 from alalek:update_libtiff
Alexander Alekhin [Tue, 2 Mar 2021 12:15:32 +0000 (12:15 +0000)]
Merge pull request #19659 from alalek:update_libtiff

3 years agoMerge pull request #19658 from alalek:update_libwebp
Alexander Alekhin [Tue, 2 Mar 2021 12:14:56 +0000 (15:14 +0300)]
Merge pull request #19658 from alalek:update_libwebp

* 3rdparty: update libwebp 1.1.0 => 1.2.0

- https://github.com/webmproject/libwebp/releases/tag/v1.2.0

* 3rdparty(libwebp): re-apply OpenCV patches

3 years agocore: rework code locality
Alexander Alekhin [Tue, 23 Feb 2021 00:22:06 +0000 (00:22 +0000)]
core: rework code locality

- to reduce binaries size of FFmpeg Windows wrapper
- MinGW linker doesn't support -ffunction-sections (used for FFmpeg Windows wrapper)
- move code to improve locality with its used dependencies
- move UMat::dot() to matmul.dispatch.cpp (Mat::dot() is already there)
- move UMat::inv() to lapack.cpp
- move UMat::mul() to arithm.cpp
- move UMat:eye() to matrix_operations.cpp (near setIdentity() implementation)
- move normalize(): convert_scale.cpp => norm.cpp
- move convertAndUnrollScalar(): arithm.cpp => copy.cpp
- move scalarToRawData(): array.cpp => copy.cpp
- move transpose(): matrix_operations.cpp => matrix_transform.cpp
- move flip(), rotate(): copy.cpp => matrix_transform.cpp (rotate90 uses flip and transpose)
- add 'OPENCV_CORE_EXCLUDE_C_API' CMake variable to exclude compilation of C-API functions from the core module
- matrix_wrap.cpp: add compile-time checks for CUDA/OpenGL calls
- the steps above allow to reduce FFmpeg wrapper size for ~1.5Mb (initial size of OpenCV part is about 3Mb)

3 years agovideoio: av_frame_unref compilation fix
Maksim Shabunin [Tue, 2 Mar 2021 07:59:08 +0000 (10:59 +0300)]
videoio: av_frame_unref compilation fix

3 years agoMerge pull request #19651 from LaurentBerger:py_finTransformECC
Alexander Alekhin [Tue, 2 Mar 2021 10:12:07 +0000 (10:12 +0000)]
Merge pull request #19651 from LaurentBerger:py_finTransformECC

3 years ago3rdparty: update openjpeg 2.3.1 => 2.4.0
Alexander Alekhin [Mon, 1 Mar 2021 23:49:55 +0000 (23:49 +0000)]
3rdparty: update openjpeg 2.3.1 => 2.4.0

- https://github.com/uclouvain/openjpeg/releases/tag/v2.4.0

3 years ago3rdparty: update libtiff 4.1.0 => 4.2.0
Alexander Alekhin [Mon, 1 Mar 2021 23:17:30 +0000 (23:17 +0000)]
3rdparty: update libtiff 4.1.0 => 4.2.0

- https://gitlab.com/libtiff/libtiff/-/tags/v4.2.0

3 years agonoexcept def construct Mat, UMat, Mat_, MatSize, MatStep
Dale Phurrough [Mon, 1 Mar 2021 21:42:13 +0000 (22:42 +0100)]
noexcept def construct Mat, UMat, Mat_, MatSize, MatStep

3 years agorelative to https://forum.opencv.org/t/cv2-findtransformecc-sometimes-missing-default...
LaurentBerger [Mon, 1 Mar 2021 16:32:56 +0000 (17:32 +0100)]
relative to https://forum.opencv.org/t/cv2-findtransformecc-sometimes-missing-defaults/1870

3 years agoMerge pull request #19322 from TolyaTalamanov:at/python-callbacks
Anatoliy Talamanov [Mon, 1 Mar 2021 15:52:11 +0000 (18:52 +0300)]
Merge pull request #19322 from TolyaTalamanov:at/python-callbacks

[G-API] Introduce cv.gin/cv.descr_of for python

* Implement cv.gin/cv.descr_of

* Fix macos build

* Fix gcomputation tests

* Add test

* Add using to a void exceeded length for windows build

* Add using to a void exceeded length for windows build

* Fix comments to review

* Fix comments to review

* Update from latest master

* Avoid graph compilation to obtain in/out info

* Fix indentation

* Fix comments to review

* Avoid using default in switches

* Post output meta for giebackend

3 years agoMerge pull request #19460 from mikhail-nikolskiy:videoio-hw
Mikhail Nikolskii [Mon, 1 Mar 2021 15:51:04 +0000 (07:51 -0800)]
Merge pull request #19460 from mikhail-nikolskiy:videoio-hw

videoio: HW decode/encode in FFMPEG backend; new properties with support in FFMPEG/GST/MSMF

* HW acceleration in FFMPEG backend

* fixes on Windows, remove D3D9

* HW acceleration in FFMPEG backend

* fixes on Windows, remove D3D9

* improve va test

* Copyright

* check LIBAVUTIL_BUILD >= AV_VERSION_INT(55, 78, 100) // FFMPEG 3.4+

* CAP_MSMF test on .mp4

* .mp4 in test

* improve va test

* Copyright

* check LIBAVUTIL_BUILD >= AV_VERSION_INT(55, 78, 100) // FFMPEG 3.4+

* CAP_MSMF test on .mp4

* .mp4 in test

* .avi for GStreamer test

* revert changes around seek()

* cv_writer_open_with_params

* params.warnUnusedParameters

* VideoCaptureParameters in GStreamer

* open_with_params

* params->getUnused

* Reduce PSNR threshold 33->32 (other tests use 30)

* require FFMPEG 4.0+; PSNR 30 as in other tests

* GStreamer AVI-demux plugin not installed in Ubuntu test environment?

* fix build on very old ffmpeg

* fix build on very old ffmpeg

* fix build issues

* fix build issues (static_cast)

* FFMPEG built on Windows without H264 encoder?

* fix for write_nothing test on VAAPI

* fix warnings

* fix cv_writer_get_prop in plugins

* use avcodec_get_hw_frames_parameters; more robust fallback to SW codecs

* internal function hw_check_device() for device check/logging

* two separate tests for HW read and write

* image size 640x480 in encode test

* WITH_VA=ON (only .h headers used in OpenCV, no linkage dependency)

* exception on VP9 SW encoder?

* rebase master; refine info message

* videoio: fix FFmpeg standalone plugin build

* videoio(ffmpeg): eliminate MSVC build warnings

* address review comments

* videoio(hw): update videocapture_acceleration.read test

- remove parallel decoding by SW code path
- check PSNR against the original generated image

* videoio: minor fixes

* videoio(test): disable unsupported MSMF cases (SW and HW)

* videoio(test): update PSNR thresholds for HW acceleration read

* videoio(test): update debug messages

* "hw_acceleration" whitelisting parameter

* little optimization in test

* D3D11VA supports decoders, doesn't support encoders

* videoio(test): adjust PSNR threshold in write_read_position tests

* videoio(ffmpeg): fix rejecting on acceleration device name mismatch

* videoio(ffmpeg): fix compilation USE_AV_HW_CODECS=0, add more debug logging

* videoio: rework VideoAccelerationType behavior

- enum is not a bitset
- default value is backend specific
- only '_NONE' and '_ANY' may fallback on software processing
- specific H/W acceleration doesn't fallback on software processing. It fails if there is no support for specified H/W acceleration.

* videoio(test): fix for current FFmpeg wrapper

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
3 years agoMerge pull request #19640 from alalek:issue_19639
Alexander Alekhin [Sun, 28 Feb 2021 21:39:30 +0000 (00:39 +0300)]
Merge pull request #19640 from alalek:issue_19639

calib3d(usac): do not crash on empty models

* calib3d(test): regression test for issue 19639

* calib3d(usac): do not crash in setModelParameters()

* calib3d(usac): handle empty models in isModelGood()

3 years agoMerge pull request #19642 from alalek:backport_19545
Alexander Alekhin [Sun, 28 Feb 2021 21:37:30 +0000 (21:37 +0000)]
Merge pull request #19642 from alalek:backport_19545

3 years agoAdded exp layer
SamFC10 [Sat, 20 Feb 2021 16:46:00 +0000 (22:16 +0530)]
Added exp layer

backport of commit: 6111935835dfd557c6e5ada81f2acfd8a6ae32f9
partial backport of commit: dd5976162b58cc9f78a3abac42da283c0778162f

3 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Sat, 27 Feb 2021 17:41:57 +0000 (17:41 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

3 years agoMerge pull request #19603 from federicohml:fix-ub-copy-make-const-border-8u
Alexander Alekhin [Sat, 27 Feb 2021 17:32:42 +0000 (17:32 +0000)]
Merge pull request #19603 from federicohml:fix-ub-copy-make-const-border-8u

3 years agoMerge pull request #19636 from LaurentBerger:blendlinear_py
Alexander Alekhin [Sat, 27 Feb 2021 17:31:59 +0000 (17:31 +0000)]
Merge pull request #19636 from LaurentBerger:blendlinear_py

3 years agoMerge pull request #19631 from prittt:sota-ccl
Federico Bolelli [Sat, 27 Feb 2021 17:27:24 +0000 (18:27 +0100)]
Merge pull request #19631 from prittt:sota-ccl

* Add Spaghetti algorithm for CCL

* Add stat tests for new and old algorithms

* Switch license header to short version

3 years agopython binding blendLinear
LaurentBerger [Sat, 27 Feb 2021 12:18:13 +0000 (13:18 +0100)]
python binding blendLinear

3 years agoMerge pull request #19628 from alalek:fix_19566
Alexander Alekhin [Fri, 26 Feb 2021 21:43:37 +0000 (21:43 +0000)]
Merge pull request #19628 from alalek:fix_19566

3 years agoFix UB in CopyMakeConstBoder_8u
Federico Martinez [Tue, 23 Feb 2021 07:44:17 +0000 (08:44 +0100)]
Fix UB in CopyMakeConstBoder_8u

Caused by overflow of arithmetic operators conversion rank

3 years agoMerge pull request #19487 from TolyaTalamanov:at/support-nireq-option
Anatoliy Talamanov [Fri, 26 Feb 2021 12:53:30 +0000 (15:53 +0300)]
Merge pull request #19487 from TolyaTalamanov:at/support-nireq-option

[G-API] Support multiple asynchronous requests

* Support nireq option

* Disable tests to check CI

* Fix bug with hanging

* WA to green CI

* Snapshot

* Simplify RequestPool

* Add default values to id

* Fix win warning

3 years agoMerge pull request #19633 from mshabunin:add-gstreamer-video
Alexander Alekhin [Fri, 26 Feb 2021 11:45:52 +0000 (11:45 +0000)]
Merge pull request #19633 from mshabunin:add-gstreamer-video

3 years agogstreamer: add video module
Maksim Shabunin [Fri, 26 Feb 2021 09:25:43 +0000 (12:25 +0300)]
gstreamer: add video module

3 years agoMerge pull request #19497 from OrestChura:oc/kmeans_ptest
Orest Chura [Thu, 25 Feb 2021 21:58:52 +0000 (00:58 +0300)]
Merge pull request #19497 from OrestChura:oc/kmeans_ptest

[G-API]: Performance tests for kmeans

* - Perf.Tests for kmeans(2D, 3D (Point2f/3f), ND (Mat))
 - New file for common parts of acc. and perf. tests for core kernels added
 - Some typos corrections

* Applying comments

3 years agoimgproc(warpAffine): avoid buffer indexes overflow in SIMD code
Alexander Alekhin [Thu, 25 Feb 2021 20:16:50 +0000 (20:16 +0000)]
imgproc(warpAffine): avoid buffer indexes overflow in SIMD code