Commit Graph

986 Commits

Author SHA1 Message Date
Anatoliy Talamanov
0e151e3c88
Merge pull request #24060 from TolyaTalamanov:at/advanced-device-selection-onnxrt-directml
G-API: Advanced device selection for ONNX DirectML Execution Provider #24060

### Overview
Extend `cv::gapi::onnx::ep::DirectML` to accept `adapter name` as `ctor` parameter in order to select execution device by `name`.
E.g:
```
pp.cfgAddExecutionProvider(cv::gapi::onnx::ep::DirectML("Intel Graphics"));
```

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2023-11-16 08:49:53 +03:00
Chris Lee
f530a24544 Fix MinGW build issue due to obsensor 2023-11-01 12:18:09 -06:00
Alexander Alekhin
02525abd9f cmake: revise OPENCV_DNN_BACKEND_DEFAULT integration
- disable message on default value
2023-09-10 13:11:36 +00:00
Björn Böken
639836ebf0 Added CMake configuration OPENCV_DNN_BACKEND_DEFAULT 2023-09-05 10:05:12 +02:00
Yuantao Feng
ba70ec99b3
Merge pull request #24122 from fengyuentau:remove_tengine
dnn: cleanup of tengine backend #24122

🚀 Cleanup for OpenCV 5.0. Tengine backend is added for convolution layer speedup on ARM CPUs, but it is not maintained and the convolution layer on our default backend has reached similar performance to that of Tengine.

Tengine backend related PRs:
- https://github.com/opencv/opencv/pull/16724
- https://github.com/opencv/opencv/pull/18323

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-08-09 09:26:02 +03:00
cudawarped
08d457edcf cuda: suppress CMP0146 Warning 2023-08-01 09:15:31 +03:00
Dmitry Kurtaev
433c364456
Merge pull request #23724 from dkurt:java_without_ant
Build Java without ANT #23724

### Pull Request Readiness Checklist

Enables a path of building Java bindings without ANT

* Able to build OpenCV JAR and Docs without ANT
  ```
  --   Java:
  --     ant:                         NO
  --     JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include
  --     Java wrappers:               YES
  --     Java tests:                  NO
  ```
* Possible to build OpenCV JAR without ANT but tests still require ANT

**Merge with**: https://github.com/opencv/opencv_contrib/pull/3502

Notes:
- Use `OPENCV_JAVA_IGNORE_ANT=1` to force "Java" flow for building Java bindings
- Java tests still require Apache ANT
- JAR doesn't include `.java` source code files.


See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-06-16 19:58:20 +03:00
Vincent Rabaud
472aad46a6
Merge pull request #23596 from vrabaud:libavif
Add AVIF support through libavif. #23596

This is to fix https://github.com/opencv/opencv/issues/19271
Extra: https://github.com/opencv/opencv_extra/pull/1069

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-06-09 15:39:10 +03:00
CSBVision
a5f04f9e17 Add ENABLE_DELAYLOAD option 2023-02-23 11:24:33 +01:00
Alexander Alekhin
bdff0949bb dnn(tflite): add 3rdparty flatbuffers with pre-generated schema 2023-02-21 16:06:19 +00:00
Dmitry Kurtaev
76350cd30f
Merge pull request #23161 from dkurt:dnn_tflite
TFLite models importer

* initial commit

* Refactor TFLiteImporter

* Better FlatBuffers detection

* Add permute before 4D->3D reshape

* Track layers layout

* TFLite Convolution2DTransposeBias layer

* Skip TFLite tests without FlatBuffers

* Fix check of FlatBuffers in tests. Add readNetFromTFLite from buffer

* TFLite Max Unpooling test

* Add skip for TFLite unpooling test

* Revert DW convolution workaround

* Fix ObjC bindings

* Better errors handling

* Regenerate TFLite schema using flatc

* dnn(tflite): more checks, better logging

* Checks for unimplemented fusion. Fix tests
2023-02-13 14:00:20 +00:00
Tinson Lai
f8f425e34c
Change custom_hal.hpp output location 2023-02-03 18:21:15 +08:00
Yuantao Feng
a2b3acfc6e
dnn: add the CANN backend (#22634)
* cann backend impl v1

* cann backend impl v2: use opencv parsers to build models for cann

* adjust fc according to the new transA and transB

* put cann net in cann backend node and reuse forwardLayer

* use fork() to create a child process and compile cann model

* remove legacy code

* remove debug code

* fall bcak to CPU backend if there is one layer not supoorted by CANN backend

* fix netInput forward
2022-12-21 09:04:41 +03:00
cudawarped
b1288dad40 Enable cudacodec libs by default, prevent their locations being lost when cmake is re-run and add log info when the libs/headers cannot be found. 2022-12-15 15:01:31 +02:00
Amir Hassan
da4ac6b7ef
Merge pull request #22706 from kallaballa:libavdevice_for_ffmpeg_v4l2
Introduce libavdevice to make v4l2 available to the ffmpeg backend

* introduce libavdevice to make v4l2 available to the ffmpeg backend

* downgrade the min required libavdevice version to 53.2.0

* make libavdevice optional

* create OCV_OPTION OPENCV_FFMPEG_ENABLE_LIBAVDEVICE and add definition through ocv_add_external_target

* move OCV_OPTION 'OPENCV_FFMPEG_ENABLE_LIBAVDEVICE' to detect_ffmpeg.cmake
2022-11-11 22:28:02 +00:00
cudawarped
be670e168a
Merge pull request #22615 from cudawarped:nvcuvenc
Update CMake rules to include Nvidia Video Codec SDK encoding libs
2022-10-28 11:03:51 +03:00
Suleyman TURKMEN
292f62c5cc cosmetic changes 2022-10-16 04:05:20 +03:00
Alexander Smorkalov
364b3f181d
Merge pull request #22372 from ocpalo:libjpegturbo_nasm
[GSoC 2022] nasm/simd support for libjpeg-turbo
2022-09-14 09:08:28 +03:00
ocpalo
04849f26b2 libjpegturbo simd extension update cmake flag 2022-09-13 22:12:52 +03:00
ocpalo
d717de5719 nasm/simd support for libjpeg-turbo 2022-09-12 20:26:26 +03:00
Alexander Smorkalov
448e3a7e58
Merge pull request #22226 from ocpalo:libspng
[GSoC 2022] spng encoder/decoder added as optional png codec
2022-09-05 13:25:41 +03:00
Berke
3929e26276 spng encoder/decoder added as optional png codec 2022-08-29 00:03:43 +03:00
Biswapriyo Nath
7e5d012f75 cmake: Enable pkgconfig support for mingw 2022-08-21 12:06:46 +05:30
hzc
fc3e393516
videoio: add support for obsensor (Orbbec RGB-D Camera ) (#22196)
* videoio: add support for obsensor (Orbbec RGB-D Camera )

* obsensor: code format issues fixed and some code optimized

* obsensor: fix typo and format issues

* obsensor: fix crosses initialization error
2022-07-26 14:35:34 +03:00
Joel Winarske
0769bf416f highgui Wayland xdg_shell
-enable using -DWITH_WAYLAND=ON
-adapted from https://github.com/pfpacket/opencv-wayland
-using xdg_shell stable protocol
-overrides HAVE_QT if HAVE_WAYLAND and WITH_WAYLAND are set

Signed-off-by: Joel Winarske <joel.winarske@gmail.com>

Co-authored-by: Ryo Munakata <afpacket@gmail.com>
2022-06-26 12:11:09 -07:00
Zihao Mu
7b582b71ba
Merge pull request #21036 from fengyuentau:timvx_backend_support
dnn: TIM-VX NPU backend support

* Add TimVX NPU backend for DNN module.

* use official branch from tim-vx repo; fix detecting viv sdk

Co-authored-by: fytao <yuantao.feng@outlook.com>
2022-03-31 21:42:11 +00:00
Alexander Alekhin
57d3002ee1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-02-06 16:10:43 +00:00
Alexander Alekhin
09af10f635 Merge pull request #21562 from alalek:cmake_carotene_use_cv_disable_optimization 2022-02-03 19:18:26 +00:00
Alexander Alekhin
4d7953aa56 cmake(carotene): disable with CV_DISABLE_OPTIMIZATION 2022-02-03 17:25:52 +00:00
Maksim Shabunin
d1e76a34a0 3.4: Use modern OpenVINO package interface
original commit: 437af37b13
2022-02-02 09:04:03 +00:00
Ilya Lavrenov
5b3d5f9f3c 3.4: Support of OpenVINO interface libraries
original commit: c703f1eed6
2022-02-02 08:57:56 +00:00
Maksim Shabunin
437af37b13 Use modern OpenVINO package interface 2022-02-01 16:52:17 +00:00
Alexander Alekhin
217fea9667 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-24 16:48:07 +00:00
Alexander Alekhin
f43fec7ee6 cmake: use find_package(OpenEXR) to support OpenEXR 3+ 2021-12-24 00:21:48 +00:00
Alexander Alekhin
57ee14d62d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-27 16:50:55 +00:00
Christian Clauss
23bbe511fe
CMakeLists.txt: Fix typo discovered by codespell
https://pypi.org/project/codespell/
2021-11-26 11:07:14 +01: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
7b57df02a7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-30 14:26:17 +00:00
Alexander Alekhin
e5647cf70d cmake: use CMAKE_BUILD_TYPE=Release by default 2021-10-29 15:15:17 +00:00
Alexander Alekhin
87d4970e8b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-04 19:50:01 +00:00
xhawk18
24f43e7ae9
Merge pull request #20183 from xhawk18:3.4
* improve compatibility for qt 6.

* cmake(highgui): rework Qt dependency support

* cmake(highgui): workaround Qt5Config.cmake "components" bug

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-10-04 16:44:57 +00:00
Ilya Lavrenov
c703f1eed6
Merge pull request #20673 from ilya-lavrenov:print-openvino-information
* Support of OpenVINO interface libraries

* cmake: rename and move ocv_get_imported_target to OpenCVUtils.cmake
2021-09-09 10:56:34 +03:00
Alexander Alekhin
d52e4e5df3 Merge pull request #20446 from alalek:cmake_eliminate_modules_scope 2021-07-31 14:49:03 +00:00
Alexander Alekhin
4015a5486c cmake: process modules in the same CMake scope 2021-07-22 15:22:42 +00:00
Francesco Petrogalli
d29c7e7871
Merge pull request #20392 from fpetrogalli:aarch64-semihosting
AArch64 semihosting

* [ts] Disable filesystem support in the TS module.

Because of this change, all the tests loading data will file, but tat
least the core module can be tested with the following line:

    opencv_test_core --gtest_filter=-"*Core_InputOutput*:*Core_globbing.accuracy*"

* [aarch64] Build OpenCV for AArch64 semihosting.

This patch provide a toolchain file that allows to build the library
for semihosting applications [1]. Minimal changes have been applied to
the code to be able to compile with a baremetal toolchain.

[1] https://developer.arm.com/documentation/100863/latest

The option `CV_SEMIHOSTING` is used to guard the bits in the code that
are specific to the target.

To build the code:

    cmake ../opencv/ \
        -DCMAKE_TOOLCHAIN_FILE=../opencv/platforms/semihosting/aarch64-semihosting.toolchain.cmake \
        -DSEMIHOSTING_TOOLCHAIN_PATH=/path/to/baremetal-toolchain/bin/ \
        -DBUILD_EXAMPLES=ON -GNinja

A barematel toolchain for targeting aarch64 semihosting can be found
at [2], under `aarch64-none-elf`.

[2] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads

The folder `samples/semihosting` provides two example semihosting
applications.

The two binaries can be executed on the host platform with:

    qemu-aarch64 ./bin/example_semihosting_histogram
    qemu-aarch64 ./bin/example_semihosting_norm

Similarly, the test and perf executables of the modules can be run
with:

    qemu-aarch64 ./bin/opecv_[test|perf]_<module>

Notice that filesystem support is disabled by the toolchain file,
hence some of the test that depend on filesystem support will fail.

* [semihosting] Remove blank like at the end of file. [NFC]

The spurious blankline was reported by
https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/31158.

* [semihosting] Make the raw pixel file generation OS independent.

Use the facilities provided by Cmake to generate the header file
instead of a shell script, so that the build doesn't fail on systems
that do not have a unix shell.

* [semihosting] Rename variable for semihosting compilation.

* [semihosting] Move the cmake configuration to a variable file.

* [semihosting] Make the guard macro private for the core module.

* [semihosting] Remove space. [NFC]

* [semihosting] Improve comment with information about semihosting. [NFC]

* [semihosting] Update license statement on top of sourvce file. [NFC]

* [semihosting] Replace BM_SUFFIX with SEMIHOSTING_SUFFIX. [NFC]

* [semihosting] Remove double space. [NFC]

* [semihosting] Add some text output to the sample applications.

* [semihosting] Remove duplicate entry in cmake configuration. [NFCI]

* [semihosting] Replace `long` with `int` in sample apps. [NFCI]

* [semihosting] Use `configure_file` to create the random pixels. [NFCI]

* [semihosting][bugfix] Fix name of cmakedefine variable.

* [semihosting][samples] Use CV_8UC1 for grayscale images. [NFCI]

* [semihosting] Add readme file.

* [semihosting] Remove blank like at the end of README. [NFC]

This fixes the failure at
https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/31272.
2021-07-21 18:46:05 +03:00
Alexander Alekhin
39b91c97f0 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-07-16 10:35:42 +00:00
Pablo Romero
6f417b57c1
Merge pull request #20399 from pablorcum:3.4
Improves support for Unix non-Linux systems, including QNX

* Fixes #20395. Improves support for Unix non-Linux systems. Focus on QNX Neutrino.

Signed-off-by: promero <promero@mathworks.com>

* Update system.cpp
2021-07-13 19:40:15 +00:00
Francesco Petrogalli
b928ebdd53
Merge pull request #19985 from fpetrogalli:disable_threads
* [build][option] Introduce `OPENCV_DISABLE_THREAD_SUPPORT` option.

The option forces the library to build without thread support.

* update handling of OPENCV_DISABLE_THREAD_SUPPORT

- reduce amount of #if conditions

* [to squash] cmake: apply mode vars in toolchains too

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-07-08 20:21:21 +00:00
Giles Payne
3b42e19505 At-like function for Java/Kotlin 2021-06-06 20:09:13 +09:00
Francesco Petrogalli
da4a531717 [build] Move OPENCV_DISABLE_FILESYSTEM_SUPPORT. [NFC]
The option as been moved away from python-related options.
2021-05-21 12:50:08 +00:00
Mikhail Nikolskii
a604d44d06
Merge pull request #19755 from mikhail-nikolskiy:ffmpeg-umat
cv::UMat output/input in VideoCapture/VideoWriter (data stays in GPU memory)

* FFMPEG with UMat input/output

* OpenCL_D3D* context

* fix Linux build

* cosmetic changes

* fix build if USE_AV_HW_CODECS=0

* simplify how child context pointer stored in parent context

* QSV interop with OpenCL on Windows

* detect_msdk.cmake via pkg-config

* fix av_buffer_ref() usage

* revert windows-decode-mfx whitelisting; remove debug msg

* address review comments

* rename property to HW_ACCELERATION_USE_OPENCL

* fix issue with "cl_khr_d3d11_sharing" extension not reported by OpenCL GPU+CPU platform

* core(ocl): add OpenCL stubs for configurations without OpenCL

* videoio(ffmpeg): update #if guards

* Put OpenCL related code under HAVE_OPENCL; simplify reuse of media context from OpenCL context

* videoio(test): skip unsupported tests

- plugins don't support OpenCL/UMat yet
- change handling of *_USE_OPENCL flag

* videoio(ffmpeg): OpenCL dependency

* videoio(ffmpeg): MediaSDK/oneVPL dependency

* cleanup, logging

* cmake: fix handling of 3rdparty interface targets

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-05-14 16:48:50 +00:00
Alexander Alekhin
776d92e797 Merge pull request #20045 from blackliner:master 2021-05-11 16:57:03 +00:00
Francesco Petrogalli
7a31a6edee [build][option] Build option to disable filesystem support. 2021-05-11 12:54:54 +00:00
Florian Berchtold
71e2a17fdb
Update CMakeLists.txt 2021-05-07 15:49:24 +02:00
Mary Strodl
c41650db20
CMakeLists: remove extraneous checks, minimum required version is 3.5.1 2021-04-19 21:01:37 -04:00
Alexander Alekhin
d643a90efa Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-03-06 17:31:08 +00:00
Alexander Alekhin
625d4fc884 cmake: update Python linters handling
- exclude from getBuildInformation()
- fix pylint version
2021-03-05 12:54:51 +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
Maksim Shabunin
317db39a5e Enable VA only on selected x86/64 platforms 2021-02-24 12:04:58 +03:00
Alexander Alekhin
3dd55d284d core(libva): use dynamic loader 2021-02-19 10:32:59 +00:00
the-sparrow
3d5f9e8b14 fix the spell error 2021-02-13 17:08:56 +08:00
Alexander Alekhin
2b787eb4b8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-01-31 17:44:15 +00:00
Alexander Alekhin
e448f4f6ef cmake: fix pylint/flake8 detection, update flake8 exclude 2021-01-29 17:06:54 +00:00
Alexander Alekhin
28c0cd8460 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-01-16 19:03:42 +00:00
Alexander Alekhin
eea4397b12 Merge pull request #19332 from alalek:xcode_ccache 2021-01-16 18:58:02 +00:00
Alexander Alekhin
8215380336 cmake: support ccache with Xcode generator 2021-01-15 19:58:01 +00:00
Alexander Alekhin
d3bc563c6e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-01-12 18:34:33 +00:00
krush11
87b3b48fe0 added multi-config to regexp 2021-01-10 11:11:23 +05:30
Alexander Alekhin
cd68cc1f46 Merge pull request #19195 from diablodale:win32AlignAlloc 2020-12-23 17:33:58 +00:00
Dale Phurrough
109255a730
add windows native aligned malloc + unit test case
* implements https://github.com/opencv/opencv/issues/19147
* CAUTION: this PR will only functions safely in the
  4+ branches that already include PR 19029
* CAUTION: this PR requires thread-safe startup of the alloc.cpp
  translation unit as implemented in PR 19029
2020-12-23 14:59:28 +01:00
Alexander Alekhin
8ac304517e Merge pull request #19055 from alalek:4.x_issue_18244 2020-12-11 19:07:57 +00:00
Giles Payne
d1ea2ad143 CMake version checks for iOS and macOS builds 2020-12-10 21:43:26 +09:00
Alexander Alekhin
8ebe320270 cmake: don't define ENABLE_NEON flags in non-cross-compiling mode
- NEON / ANDROID_ARM_NEON are toolchain-specific flags
- they are usually not defined for native builds
- let work CPU_BASELINE=DETECT properly
2020-12-08 18:01:03 +00:00
Alexander Alekhin
fe3893ff01 cmake: don't define ENABLE_NEON flags in non-cross-compiling mode
- NEON / ANDROID_ARM_NEON are toolchain-specific flags
- they are usually not defined for native builds
- let work CPU_BASELINE=DETECT properly
2020-12-08 18:00:40 +00:00
Alexander Alekhin
387a76ba59 build: xcode 12 support, cmake fixes 2020-11-26 07:54:03 +00:00
Alexander Alekhin
b4b2a276c8 Merge pull request #18756 from andy-held:add_ueye_capture 2020-11-16 22:28:54 +00:00
Andreas Franek
a3f3fbe05d add rudimentary support for uEye cameras
uEye are cameras from IDS, c.f. https://en.ids-imaging.com/
Supports driver version 4.94 and up currently, since the event system was overhauled there.
Supports setting/getting the properties: fps,width,height
2020-11-13 18:38:51 +01:00
Dmitry Matveev
a110ede0a2
Merge pull request #18716 from dmatveev:dm/upstream_onnx
* G-API: Introduce ONNX backend for Inference

- Basic operations are implemented (Infer, -ROI, -List, -List2);
- Implemented automatic preprocessing for ONNX models;
- Test suite is extended with `OPENCV_GAPI_ONNX_MODEL_PATH` env for test data
  (test data is an ONNX Model Zoo repo snapshot);
- Fixed kernel lookup logic in core G-API:
  - Lookup NN kernels not in the default package, but in the associated
    backend's aux package. Now two NN backends can work in the same graph.
- Added Infer SSD demo and a combined ONNX/IE demo;

* G-API/ONNX: Fix some of CMake issues

Co-authored-by: Pashchenkov, Maxim <maxim.pashchenkov@intel.com>
2020-11-03 18:39:16 +00:00
Odianosen Ejale
862fc06b6f Fixed and updated OpenCL-VA interoperability 2020-09-25 16:11:50 +03:00
Alexander Alekhin
f52a2cf5e1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-09-19 17:03:08 +00:00
Maksim Shabunin
2dff2f36bf Install: added prebuilt samples installation 2020-09-08 20:22:26 +03:00
Alexander Alekhin
cf8322c0d3 Merge pull request #18194 from VadimLevin:dev/vlevin/openjpeg-source-intergration 2020-09-02 22:48:09 +00:00
Vadim Levin
0384eb7d8c 3rdparty: integrate OpenJPEG build to the OpenCV CMake
- adopted build scripts
- OpenJPEG build warnings are suppressed
2020-09-02 20:45:35 +00:00
Giles Payne
60354e3901
Merge pull request #18094 from komakai:macos-universal-binary
* Universal Build for Big Sur

* Refactor MacOS/iOS build to only ever build one architecture at a time + improve code readability

* Workaround for CMake issue 20989
2020-08-30 01:41:54 +03:00
Alexander Alekhin
524a2fffe9 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-07-06 23:05:04 +00:00
Alexander Alekhin
eb6678ebef
Merge pull request #17699 from alalek:build_core_cuda
* core(cuda): fix build

- MSVS 19.25.28612.0
- CUDA release 11.0, V11.0.167

* cmake(cuda): backport workaround for CUDA 11

* cmake(cuda): call CUDA_BUILD_CLEAN_TARGET() on finalize

* cmake(cuda): use CMAKE_SUPPRESS_REGENERATION with MSVS
2020-07-06 22:58:17 +00:00
Giles Payne
02385472b6
Merge pull request #17165 from komakai:objc-binding
Objc binding

* Initial work on Objective-C wrapper

* Objective-C generator script; update manually generated wrappers

* Add Mat tests

* Core Tests

* Imgproc wrapper generation and tests

* Fixes for Imgcodecs wrapper

* Miscellaneous fixes. Swift build support

* Objective-C wrapper build/install

* Add Swift wrappers for videoio/objdetect/feature2d

* Framework build;iOS support

* Fix toArray functions;Use enum types whenever possible

* Use enum types where possible;prepare test build

* Update test

* Add test runner scripts for iOS and macOS

* Add test scripts and samples

* Build fixes

* Fix build (cmake 3.17.x compatibility)

* Fix warnings

* Fix enum name conflicting handling

* Add support for document generation with Jazzy

* Swift/Native fast accessor functions

* Add Objective-C wrapper for calib3d, dnn, ml, photo and video modules

* Remove IntOut/FloatOut/DoubleOut classes

* Fix iOS default test platform value

* Fix samples

* Revert default framework name to opencv2

* Add converter util functions

* Fix failing test

* Fix whitespace

* Add handling for deprecated methods;fix warnings;define __OPENCV_BUILD

* Suppress cmake warnings

* Reduce severity of "jazzy not found" log message

* Fix incorrect #include of compatibility header in ios.h

* Use explicit returns in subscript/get implementation

* Reduce minimum required cmake version to 3.15 for Objective-C/Swift binding
2020-06-08 18:32:53 +00:00
Alexander Alekhin
3c5fec6746 build: updates for winpack dldt 2020-03-31 22:18:21 +00:00
Alexander Alekhin
e12b1c2209 build: updates for winpack dldt 2020-03-31 20:29:11 +00:00
StefanBruens
8d78400052
Merge pull request #16494 from StefanBruens:jpeg2000_openjpeg_port
Jpeg2000 OpenJPEG port

* OpenJPEG based JPEG2000 decoder implementation

Currently, the following input color spaces and depth conversions are
supported:

- 8 bit -> 8 bit
- 16 bit -> 16 bit (IMREAD_UNCHANGED, IMREAD_ANYDEPTH)

- RGB(a) -> BGR
- RGBA -> BGRA (IMREAD_UNCHANGED)
- Y(a) -> Y(a) (IMREAD_ANYCOLOR, IMREAD_GRAY, IMREAD_UNCHANGED))
- YCC -> Y (IMREAD_GRAY)

* Check for OpenJPEG availability

This enables OpenJPEG based JPEG2000 imread support by default, which
can be disabled by -DWITH_OPENJPEG=OFF. In case OpenJPEG is enabled
and found, any checks for Jasper are skipped.

* Implement precision downscaling for precision > 8 without IMREAD_UNCHANGED

With IMREAD_UNCHANGED, values are kept from the input image, without it
components are downscaled to CV_8U range.

* Enable Jpeg2K tests when OpenJPEG is available

* Add support for some more color conversions

Support IMREAD_GRAY when input color space is RGB or unspecified.
Support YUV input color space for BGR output.

* fix: problems with unmanaged memory

* fix: CMake warning - HAVE_OPENJPEG is undefined

Removed trailing whitespaces

* fix: CMake find_package OpenJPEG add minimal version

* Basic JPEG2K encoder

Images with depth CV_8U and CV_16U are supported, with 1 to 4 channels.

* feature: Improved code for OpenJPEG2000 encoder/decoder

 - Removed code duplication
 - Added error handlers
 - Extracted functions

* feature: Update conversion openjpeg array from/to Mat

* feature: Extend ChannelsIterator to fulfill RandomAccessIterator named requirements

 - Removed channels split in copyFromMatImpl. With ChannelsIterator no allocations are performed.
 - Split whole loop into 2 parts in copyToMat -> where std::copy and std::transforms are called.

* fix: Applied review comments.

 - Changed `nullptr` in CV_LOG* functions to `NULL`
 - Added `falls through` comment in decoder color space `switch`
 - Added warning about unsupported parameters for the encoder

* feature: Added decode from in-memory buffers.

Co-authored-by: Vadim Levin <vadim.levin@xperience.ai>
2020-03-27 07:18:58 +00:00
Alexander Alekhin
0b4c101e8a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-23 16:54:35 +00:00
Alexander Alekhin
801f26c35d cmake: set CMP0066 => NEW 2020-03-23 01:15:49 +00:00
Alexander Alekhin
4cdb4652cf Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-20 21:41:15 +00:00
NesQl
bf224e61a9
Merge pull request #16832 from liqi-c:3.4-tengine-android
* Add android support for tengine

* modify tengine download use commit id

* Del some invalid log in Tengine

* Test. default enable tengine

* ndk version judegment

* Close test . set Tengine default OFF

* Logic problem

* test .Android NDK judgement .

* Cmake error modify.

* cmake: cleanup tengine scripts

* cmake: use tengine target name

* cmake: disable testing of BUILD_ANDROID_PROJECTS=OFF

* Close test .
2020-03-20 10:10:39 +00:00
Alexander Alekhin
9b3be01b83 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-09 20:27:34 +00:00
NesQl
0bcdf7d03e
Merge pull request #16724 from liqi-c:3.4-tengine
* Add Tengine support .

* Modify printf to CV_LOG_WARNING

* a few minor fixes in the code

* Renew Tengine version

* Add header file for CV_LOG_WARNING

* Add #ifdef HAVE_TENGINE in tengine_graph_convolution.cpp

* remove trailing whitespace

* Remove trailing whitespace

* Modify for compile problem

* Modify some code style error

* remove whitespace

* Move some code style problem

* test

* add ios limit and build problem

* Modified as alalek suggested

* Add cmake 2.8 support

* modify cmake 3.5.1 problem

* test and set BUILD_ANDROID_PROJECTS OFF

* remove some compile error

* remove some extra code in tengine

* close test.

* Test again

* disable android.

* delete ndk version judgement

* Remove setenv() call . and add License information

* Set tengine default OFF. Close test .

Co-authored-by: Vadim Pisarevsky <vadim.pisarevsky@gmail.com>
2020-03-09 14:59:23 +00:00
Alexander Alekhin
77dd40c96c
Merge pull request #16619 from alalek:cmake_custom_cxx_standard_master
* cmake: allow customization of CMAKE_CXX_STANDARD value

* cmake: extra skip flag OPENCV_SKIP_CMAKE_CXX_STANDARD

* cmake: dump CMAKE_CXX_STANDARD value

- compiler option is missing in dumped flags
2020-02-20 14:18:43 +03:00
Alexander Alekhin
560f85f8e5 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-01-28 14:26:57 +03:00
Alexander Alekhin
ffaf15d0d9 cmake: reuse OpenCV NEON detection in carotene
- use carotene if NEON available only
2020-01-24 16:42:56 +03:00
Alexander Alekhin
fb61f88b9c Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-01-12 09:35:39 +00:00