Commit Graph

2147 Commits

Author SHA1 Message Date
Alexander Smorkalov
fde99e68c0 Removed Android AIDL from build scrips and tutorials as it's not needed since 4.9.0. 2024-01-10 16:27:52 +03:00
Alexander Smorkalov
43c1c81c8c
Merge pull request #24799 from cudawarped:fix_24789
`cuda`: Fix 24789 (Cannot build opencv 4.9 with test module)
2024-01-09 15:58:41 +03:00
Alexander Smorkalov
105eb95b02
Merge pull request #24781 from FantasqueX:remove-deprecated-cmake-variable-2
Remove deprecated CMake variable
2024-01-09 13:58:59 +03:00
Alexander Smorkalov
e6d5de69fe
Merge pull request #24805 from MengqingCao:dvpp_support
Link libacl_dvpp_mpi library when building with CANN backend
2024-01-09 13:57:42 +03:00
Brad Smith
a86e9f161d Fix building on OpenBSD
FAILED: lib/libopencv_core.so.13.0
...
ld: error: undefined symbol: __cxa_atexit

Do not try to use --no-undefined on OpenBSD. OpenBSD does not link
shared libraries with libc and thus linkage with --no-undefined is
expected to fail.
2024-01-07 01:26:24 -05:00
cudawarped
10f6cbf41c Fix 24789 2023-12-29 16:58:05 +02:00
Letu Ren
0f1c484ea9 Remove deprecated CMake variable
CMake variable `CMAKE_COMPILER_IS_CCACHE` is marked as deprecated and "# FIXIT Avoid setting of CMAKE_ variables". It is introduced in https://github.com/opencv/opencv/pull/11167 which is before the release of 4.0. Since it's deprecated almost six years ago, I think it's OK to remove them.

Related: https://github.com/opencv/opencv/pull/24771
2023-12-27 22:26:36 +08:00
Alexander Alekhin
212795db64 build: disable Python2 detection by default 2023-12-26 21:19:36 +00:00
Alexander Smorkalov
e80b7940ef
Merge pull request #23021 from cudawarped:add_cuda_first_class_support
`cuda`: CMake add CUDA first class language support
2023-12-26 18:24:22 +03:00
Alexander Smorkalov
56aae015cd
Merge pull request #24771 from FantasqueX:remove-is-clang
Remove deprecated CMake variable
2023-12-26 16:36:20 +03:00
Letu Ren
e019a6738d Remove deprecated CMake variable
Two CMake variable are marked as deprecated and "#TODO next release:
remove this". It is introduced in https://github.com/opencv/opencv/pull/11167
which is before the release of 4.0. Since it's deprecated almost six
years ago, I think it's OK to remove them.
2023-12-26 18:20:23 +08:00
cudawarped
7d681cf80d build: first class cuda support 2023-12-26 09:39:18 +03:00
Alexander Smorkalov
46792849d4
Merge pull request #24752 from asmorkalov:as/android_aar_with_gradle
Enable Android AAR package build with SDK project itself without Python
2023-12-25 20:38:47 +03:00
Alexander Smorkalov
b59eca22ae Enable Android AAR package build with SDK project itself without Python
- Added JavaDoc package build and publishing
- Added Source package build and publishing
- More metadata for publishing
- Disable native samples build with aar, because prefab is not complete yet
2023-12-25 18:39:49 +03:00
Letu Ren
4546f40d8b Refine logic of parsing PNG version
Currently, if `PNG_FOUND`, cmake scripts will check include and parse
header while we can use `PNG_VERSION_STRING` conveniently. If
`BUILD_PNG`, parse version from `PNG_LIBPNG_VER_STRING` directly is more
convenient than parsing major, minor and patch and concatenate them.

The comment of png.h also supports this.
```
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
```
https://github.com/glennrp/libpng/blob/libpng16/png.h#L287

This patch also modifies `ocv_parse_header_version` macro to receive
another parameter to make it more general.

The reason why changing `PNG_VERSION` to `PNG_VERSION_STRING` is to be
consistent with cmake's FindPNG.

This patch removes `HAVE_LIBPNG_PNG_H` variable because `PNG_INCLUDE_DIR`
is where to find png.h, etc according to
https://cmake.org/cmake/help/latest/module/FindPNG.html.

This patch also removes `PNG_PNG_INCLUDE_DIR` variable which is an
advanced variable used in cmake's FindPNG and is not used in opencv.
2023-12-23 16:01:42 +08:00
Letu Ren
4ee4479cd7 Fix OpenJPEG version in cmake scripts
Currently, if OpenJPEG is found, only version information in summary is
correct and the information right after `find_package(OpenJPEG)` is
wrong.
```
-- Found system OpenJPEG: openjp2 (found version "")
```

The reason is OpenJPEGConfig.cmake only sets `OPENJPEG_MAJOR_VERSION`,
`OPENJPEG_MINOR_VERSION` and `OPENJPEG_BUILD_VERSION` but not `OPENJPEG_VERSION`.
2023-12-22 20:14:08 +08:00
Alexander Smorkalov
a050285058
Merge pull request #24741 from FantasqueX:fix-zlib-version-parse
Fix zlib version parse
2023-12-22 14:56:43 +03:00
chacha21
6d2064b32f added URL to understand CUDA options
A reference to https://docs.opencv.org/4.x/d2/dbc/cuda_intro.html is given.
This page is not up-to-date but it can evolve independently
2023-12-22 08:10:56 +01:00
Letu Ren
3a600db4ab Fix zlib version parse
Currently cmake scripttry to use regex to parse VER_MAJOR, VER_MINOR,
VER_REVISION from ZLIB_VERSION. However, ZLIB_VERSION is "1.3" which
means that there is no VER_REVISION.
You can reproduce using "-DBUILD_ZLIB=ON"
```
--     ZLib:                        zlib (ver 1.3.#define ZLIB_VERSION "1.3")
```

This patch add a new macro ocv_parse_header_version to extract version
information.
2023-12-22 13:49:36 +08:00
Alexander Smorkalov
f0d3bbddff Do not install removed toolchain file for Android. 2023-12-21 10:40:05 +03:00
Giles Payne
3d9cb5329c
Merge pull request #24136 from komakai:visionos_support
Add experimental support for Apple VisionOS platform #24136

### 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

This is dependent on cmake support for VisionOs which is currently in progress.
Creating PR now to test that there are no regressions in iOS and macOS builds
2023-12-20 15:35:10 +03:00
Alexander Smorkalov
c92815238e
Merge pull request #24718 from asmorkalov/as/system_spng
Add support for external libspng. #24718

Fixes https://github.com/opencv/opencv/issues/24683
Related patch to libspng: https://github.com/randy408/libspng/pull/264

### 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
- [ ] 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-12-20 13:05:09 +03:00
MengqingCao
b6cc74f855 link libacl_dvpp_mpi library when building with CANN backend 2023-12-19 17:35:11 +08:00
Tomoaki Teshima
b6ec9b9d8c prepare to build for ARM64 on Windows with Visual Studio 2023-12-19 09:40:35 +09:00
Alexander Smorkalov
7892517b3d
Merge pull request #24642 from tomoaki0705:merge_features_aarch64
build: merge multiple features specified at once
2023-12-18 19:57:19 +03:00
Tomoaki Teshima
bc12e4fe55 merge multiple features specified at once
* follow the comment
2023-12-18 22:02:33 +09:00
Anatoliy Talamanov
1017ea4f83
Merge pull request #24601 from TolyaTalamanov:at/fix-onnxrt-include-path-in-cmake
Fix path to ONNX Runtime include folder #24601

### Pull Request Readiness Checklist

Looks the `install` directory layout has been changed for `v1.16.3`

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-12-15 16:21:01 +03:00
Anatoliy Talamanov
9a47e1764a
Merge pull request #24068 from TolyaTalamanov:at/add-onnx-coreml-execution-provider
G-API: Support CoreML Execution Providers for ONNXRT Backend #24068

### 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-12-13 21:22:15 +03:00
Tomoaki Teshima
b13514e33c reenable fp16 compile in old compiler 2023-12-09 10:32:21 +09:00
alexlyulkov
81656597e9
Merge pull request #24622 from alexlyulkov:al/fixed-android-sample-img-save
Fixed problem with saving images in Android sample #24622

Fixes https://github.com/opencv/opencv/issues/24590

Current code for saving images in Android sample worked only on very old phones.
Added support for modern Android versions.

Required:
- https://github.com/opencv/ci-gha-workflow/pull/127
- https://github.com/opencv-infrastructure/opencv-gha-dockerfile/pull/27
2023-12-04 10:00:40 +03:00
Alexander Smorkalov
3893936243
Merge pull request #24565 from CNClareChen:4.x
Change the lsx to baseline features.
2023-11-30 15:27:49 +03:00
Alexander Smorkalov
aa6b399b5a AAR package build and test with CI
- Use the same tools and plugins for SDK build and AAR build
- Added script to test Gradle-based samples against local maven repo
- Various local fixes and debug prints
2023-11-28 10:00:56 +03:00
Hao Chen
c19adb4953 Change the lsx to baseline features.
This patch change lsx to baseline feature, and lasx to dispatch
feature. Additionally, the runtime detection methods for lasx and
lsx have been modified.
2023-11-21 11:51:22 +08:00
zihaomu
b913e73d04
DNN: add the Winograd fp16 support (#23654)
* add Winograd FP16 implementation

* fixed dispatching of FP16 code paths in dnn; use dynamic dispatcher only when NEON_FP16 is enabled in the build and the feature is present in the host CPU at runtime

* fixed some warnings

* hopefully fixed winograd on x64 (and maybe other platforms)

---------

Co-authored-by: Vadim Pisarevsky <vadim.pisarevsky@gmail.com>
2023-11-20 13:45:37 +03:00
alexlyulkov
6c57ce9e09
Merge pull request #24473 from alexlyulkov:al/samples_with_maven
Updated Android samples for modern Android studio. Added OpenCV from Maven support. #24473

Updated samples for recent Android studio:

- added namespace field that is required in build.gradle files
- replaced _switch_ by _if-else_ because it doesn't work with constants from resources
- added missed log library dependency in face-detection/jni/CMakeLists.txt
- use local.properties to define NDK location

Added support for OpenCV from Maven. Now you can choose 3 possible sources of OpenCV lib in settings.gradle: SDK path, local Maven repository, public Maven repository. (Creating Maven repository from SDK is added here #24456 )

There are differences in project configs for SDK and Maven versions:

- different dependencies in build.gradle
- different OpenCV library names in CMakeLists.txt
- SDK version requires OpenCV_DIR definition

Requires:
- https://github.com/opencv/ci-gha-workflow/pull/124
- https://github.com/opencv-infrastructure/opencv-gha-dockerfile/pull/26
2023-11-17 14:17:17 +03:00
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
Alexander Smorkalov
b3791dc4be
Merge pull request #24488 from hipudding:npu_support
Link lib_acl_op_compiler when compile with CANN
2023-11-09 09:26:18 +03:00
huafengchun
fb352e3098 Link lib_acl_op_compiler when compile with CANN 2023-11-08 10:42:28 +08:00
CNClareChen
d142a796d8
Merge pull request #23929 from CNClareChen:4.x
* Optimize some function with lasx.

Optimize some function with lasx. #23929

This patch optimizes some lasx functions and reduces the runtime of opencv_test_core from 662,238ms to 633603ms on the 3A5000 platform.

### 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-10-20 14:20:09 +03:00
Stefan Isak
5bffcdf7e8
Merge pull request #24382 from sisakat:cuda-compile-multicore
Enable multicore CUDA compilation #24382

CUDA source files are compiled single threaded. The option `--threads` was introduced in NVCC 11.2. The option specifies the number of threads to be used for compilation (see [NVIDIA NVCC Documentation](https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#threads-number-t)).

With CMake 3.12 the environment variable `CMAKE_BUILD_PARALLEL_LEVEL` was introduced (see [CMake Documentation](https://cmake.org/cmake/help/latest/envvar/CMAKE_BUILD_PARALLEL_LEVEL.html)). This variable is used to set the NVCC `--threads` option.

### 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
- [ ] 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-10-19 13:13:21 +03:00
Kumataro
6e4280ea81
Merge pull request #24372 from Kumataro:fix24369
Supporting protobuf v22 and later(with abseil-cpp/C++17) #24372

fix https://github.com/opencv/opencv/issues/24369
related https://github.com/opencv/opencv/issues/23791

1. This patch supports external protobuf v22 and later, it required abseil-cpp and c++17.
    Even if the built-in protobuf is upgraded to v22 or later, 
    the dependency on abseil-cpp and the requirement for C++17 will continue.
2. Some test for caffe required patched protobuf, so this patch disable them.

This patch is tested by following libraries.
-  Protobuf:                    /usr/local/lib/libprotobuf.so (4.24.4)
-  abseil-cpp:                YES (20230125)

### 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-10-19 08:45:08 +03:00
Vadim Pisarevsky
ba4d6c859d
added detection & dispatching of some modern NEON instructions (NEON_FP16, NEON_BF16) (#24420)
* added more or less cross-platform (based on POSIX signal() semantics) method to detect various NEON extensions, such as FP16 SIMD arithmetics, BF16 SIMD arithmetics, SIMD dotprod etc. It could be propagated to other instruction sets if necessary.

* hopefully fixed compile errors

* continue to fix CI

* another attempt to fix build on Linux aarch64

* * reverted to the original method to detect special arm neon instructions without signal()
* renamed FP16_SIMD & BF16_SIMD to NEON_FP16 and NEON_BF16, respectively

* removed extra whitespaces
2023-10-18 22:06:20 +03:00
Sérgio M. Basto
00ca8f455e numpy.distutils is removed in numpy 1.26 on Python 3.12.
so we don't use numpy.distutils to get includes dirs of python-numpy
2023-10-03 12:28:10 +01:00
ashadrina
3889dcf3f8
Merge pull request #24286 from ashadrina:intel_icx_compiler_support
Add Intel® oneAPI DPC++/C++ Compiler (icx) #24286

Intel® C++ Compiler Classic (icc) is deprecated and will be removed in a oneAPI release in the second half of 2023 ([deprecation notice](https://community.intel.com/t5/Intel-oneAPI-IoT-Toolkit/DEPRECATION-NOTICE-Intel-C-Compiler-Classic/m-p/1412267#:~:text=Intel%C2%AE%20C%2B%2B%20Compiler%20Classic%20(icc)%20is%20deprecated%20and%20will,the%20second%20half%20of%202023.)). This commit is intended to add support for the next-generation compiler, Intel® oneAPI DPC++/C++ Compiler (icx) (the documentation for the compiler is available on the [link](https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/2023-2/overview.html)). 

### 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
- [ ] 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-09-22 17:09:58 +03:00
Alexander Smorkalov
ec1c0608bc
Merge pull request #24131 from cudawarped:cuda_add_default_ptx
`cuda`: update default PTX behaviour when `CUDA_ARCH_BIN` is unset
2023-09-14 15:00:34 +03:00
FlyinTeller
347a1e2913
Update OpenCVFindOpenBLAS.cmake to accomodate alternative lib name
openBLAS windows release calls their library libopenblas which was not recognized before. see #24268
2023-09-14 09:04:41 +02:00
CSBVision
70a58d7198
Use STRING instead of PATH to fix #24141 2023-08-17 12:02:29 +02:00
cudawarped
358e3065ab cuda: add default ptx when CUDA_ARCH_BIN is missing and allow CUDA_ARCH_PTX to be passed in isolation 2023-08-12 11:09:06 +03: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
SaltFish-T
ab6bffc6f8
Merge pull request #23936 from SaltFish-T:4.x
Update opencv dnn to support cann version >=6.3 #23936

1.modify the search path of "libopsproto.so" in OpenCVFindCANN.cmake
2.add the search path of "libgraph_base.so" in OpenCVFindCANN.cmake
3.automatic check Ascend socVersion,and test on Ascend310/Ascend310B/Ascend910B well
2023-07-27 14:21:30 +03:00