Commit Graph

30180 Commits

Author SHA1 Message Date
cyy
b450dd7a87
Merge pull request #19565 from cyyever:minor_fix
Local objects optimization in calibration init

* use emplace_back

* use {} initilization

* remove a tailing white space
2021-03-05 15:04:51 +00:00
Alexander Smorkalov
2e429268ff
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>
2021-03-04 16:17:57 +00:00
Alexander Smorkalov
e2ca50f1cb
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.
2021-03-03 14:06:59 +00:00
Alexander Alekhin
be24659c03 Merge pull request #19666 from alalek:update_ffmpeg_4.x 2021-03-03 13:06:44 +00:00
Alexander Alekhin
2dc157246b Merge pull request #19669 from alalek:fix_static_analyzer_issues_4.x 2021-03-03 12:26:54 +00:00
Alexander Alekhin
b6670f3ac3 ffmpeg/4.x: update FFmpeg wrapper 2021.03
- FFmpeg 4.3.2
2021-03-03 11:41:36 +00:00
Alexander Alekhin
d2ac304ade Merge pull request #19667 from alalek:hotfix_ffmpeg_hw_accel 2021-03-03 11:08:55 +00:00
Alexander Alekhin
16c3522f4e static analyzer issues 2021-03-03 09:18:40 +00:00
Alexander Alekhin
7ac6abe02a videoio(ffmpeg): fix VIDEO_ACCELERATION_ANY handling
- default is VIDEO_ACCELERATION_NONE
2021-03-03 08:44:46 +00:00
Alexander Alekhin
6af20d3907 Merge pull request #19657 from alalek:update_version_4.5.2-pre 2021-03-03 00:26:37 +00:00
Alexander Alekhin
a823b06fa5 pre: OpenCV 4.5.2 (version++) 2021-03-02 23:20:59 +00:00
Alexander Alekhin
cbb0151303 Merge pull request #19606 from alalek:reduce_ffmpeg_wrapper_size_4.x 2021-03-02 23:20:44 +00:00
Alexander Alekhin
ec4baf337a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-03-02 21:47:19 +00:00
Alexander Alekhin
2ab1f3f166 Merge pull request #19656 from alalek:update_version_3.4.14-pre 2021-03-02 21:44:19 +00:00
Alexander Alekhin
a123c48d4d pre: OpenCV 3.4.14 (version++) 2021-03-02 20:47:29 +00:00
Alexander Alekhin
1c88e1fd19
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
2021-03-02 20:41:05 +00:00
Alexander Alekhin
325bdf952c Merge pull request #19663 from mshabunin:fix-ffmpeg-1x 2021-03-02 12:19:00 +00:00
Alexander Alekhin
6fbf93750b Merge pull request #19660 from alalek:update_openjpeg 2021-03-02 12:16:43 +00:00
Alexander Alekhin
ba7d0c5b23 Merge pull request #19659 from alalek:update_libtiff 2021-03-02 12:15:33 +00:00
Alexander Alekhin
5d499a185b
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
2021-03-02 12:14:56 +00:00
Alexander Alekhin
65eb946756 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)
2021-03-02 11:27:58 +00:00
Maksim Shabunin
137ec1c846 videoio: av_frame_unref compilation fix 2021-03-02 14:20:24 +03:00
Alexander Alekhin
b0afb4d63c Merge pull request #19651 from LaurentBerger:py_finTransformECC 2021-03-02 10:12:07 +00:00
Alexander Alekhin
51fd26b19b 3rdparty: update openjpeg 2.3.1 => 2.4.0
- https://github.com/uclouvain/openjpeg/releases/tag/v2.4.0
2021-03-01 23:56:13 +00:00
Alexander Alekhin
eab8ac9a71 3rdparty: update libtiff 4.1.0 => 4.2.0
- https://gitlab.com/libtiff/libtiff/-/tags/v4.2.0
2021-03-01 23:19:00 +00:00
LaurentBerger
d1c04af603 relative to https://forum.opencv.org/t/cv2-findtransformecc-sometimes-missing-defaults/1870 2021-03-01 17:32:56 +01:00
Anatoliy Talamanov
eb82ba36a3
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
2021-03-01 15:52:11 +00:00
Mikhail Nikolskii
7bcb51eded
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>
2021-03-01 15:51:04 +00:00
Alexander Alekhin
f70e80a6ba
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()
2021-02-28 21:39:30 +00:00
Alexander Alekhin
19865a26e5 Merge pull request #19642 from alalek:backport_19545 2021-02-28 21:37:30 +00:00
SamFC10
96947c30c0 Added exp layer
backport of commit: 6111935835
partial backport of commit: dd5976162b
2021-02-28 19:59:40 +00:00
Alexander Alekhin
e0265c67c6 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-02-27 17:41:57 +00:00
Alexander Alekhin
19f1bac18c Merge pull request #19603 from federicohml:fix-ub-copy-make-const-border-8u 2021-02-27 17:32:42 +00:00
Alexander Alekhin
b3b80f85fe Merge pull request #19636 from LaurentBerger:blendlinear_py 2021-02-27 17:31:59 +00:00
Federico Bolelli
9695165877
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
2021-02-27 17:27:24 +00:00
LaurentBerger
84080c12fd python binding blendLinear 2021-02-27 16:47:35 +00:00
Alexander Alekhin
1a855fed8f Merge pull request #19628 from alalek:fix_19566 2021-02-26 21:43:37 +00:00
Federico Martinez
773262bc09 Fix UB in CopyMakeConstBoder_8u
Caused by overflow of arithmetic operators conversion rank
2021-02-26 19:15:50 +00:00
Anatoliy Talamanov
28c064f345
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
2021-02-26 12:53:30 +00:00
Alexander Alekhin
c7f03814ea Merge pull request #19633 from mshabunin:add-gstreamer-video 2021-02-26 11:45:53 +00:00
Maksim Shabunin
90623498a2 gstreamer: add video module 2021-02-26 12:51:03 +03:00
Orest Chura
21b2e33ebb
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
2021-02-25 21:58:52 +00:00
Alexander Alekhin
fadb25baf8 imgproc(warpAffine): avoid buffer indexes overflow in SIMD code 2021-02-25 20:16:50 +00:00
Giles Payne
0553543e6e
Merge pull request #19597 from komakai:android-ndk-camera
Android NDK camera support

* Add native camera video backend for Android

* In the event of a "No buffer available error" wait for the appropriate callback and retry

* Fix stale context when creating a new AndroidCameraCapture

* Add property handling
2021-02-25 19:14:11 +00:00
Alexander Alekhin
543379d343 Merge pull request #19627 from mshabunin:plugin-default-suffix 2021-02-25 16:33:55 +00:00
Alexander Alekhin
20a46b31cd Merge pull request #19625 from mshabunin:static-analysis-issues-34 2021-02-25 16:31:47 +00:00
Alexander Alekhin
37eba84056 Merge pull request #19620 from mshabunin:static-analysis-issues 2021-02-25 16:30:17 +00:00
Maksim Shabunin
293e777fce plugins: add suffix to default OUTPUT_NAME 2021-02-25 18:00:29 +03:00
Maksim Shabunin
b2321576bc Fixed several issues found by static analysis 2021-02-25 15:44:15 +03:00
Maksim Shabunin
dd5976162b Fixed several issues found by static analysis 2021-02-25 15:08:39 +03:00