Commit Graph

34635 Commits

Author SHA1 Message Date
kallaballa
8ba7389b21 properly size the devices array 2024-10-10 06:32:22 +02:00
kallaballa
885bbc643f renaming 2024-10-10 06:30:33 +02:00
kallaballa
dceeb47cd3 rewrote clgl device discovery 2024-10-10 00:02:56 +02:00
Alexander Smorkalov
69803e7b99
Merge pull request #26216 from hanliutong:rvv-hal-merge
Add the HAL implementation for the merge function on RISC-V Vector.
2024-10-09 17:07:57 +03:00
quantizs
e1b06371ad Added buffer-based model loading to FaceRecognizerSF
- Implemented a new `create` method in `FaceRecognizerSF` to allow model and configuration loading from memory buffers (std::vector<uchar>), similar to the existing functionality in `FaceDetectorYN`.
- Updated `face_recognize.cpp` with a new constructor in `FaceRecognizerSFImpl` that supports buffer-based loading for both model weights and network configuration.
- Ensured compatibility with both file-based and buffer-based model loading by maintaining consistent backend and target settings across both constructors.
- This change improves flexibility, allowing FaceRecognizerSF to be instantiated from memory buffers, which is useful for dynamic model loading scenarios such as embedded systems or applications where models are loaded in-memory.
2024-10-09 15:13:47 +02:00
Suleyman TURKMEN
e72efd0d32
Merge pull request #26260 from sturkmen72:upd_doc_4_x
Update Documentation #26260

### 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
2024-10-09 09:09:51 +03:00
george
cefde84a76
Merge pull request #25909 from gblikas:patch-1
Update intrin_wasm.hpp #25909

See https://github.com/microsoft/vcpkg/issues/33443 for some build context when using 

```vcpkg install opencv4:wasm32-emscripten```

`__EMSCRIPTEN_major__`, `__EMSCRIPTEN_minor__` and `__EMSCRIPTEN_tiny__` in `emsdk` >= 3.1.4 are in a header, as opposed to command line. 

We could potentially be more aggressive with how I'm checking this property; let me know if I should make the change. 

It should also be suggested that `-msimd128` is auto-included in the associated portfile for opencv, but that's a separate issue. Someone let me know if I should also make that change as well. 

Special thanks to https://github.com/youar for supporting this work; please inform if applying a copyright-header is appropriate attribution.

### 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
2024-10-09 08:36:10 +03:00
Alexander Smorkalov
7d9014e09e
Merge pull request #26263 from mlourakis:4.x
inversion checks
2024-10-08 20:50:15 +03:00
Kumataro
40428d919d
Merge pull request #26259 from Kumataro:fix26258
core: C-API cleanup: RNG algorithms in core(4.x) #26259

- replace CV_RAND_UNI and NORMAL to cv::RNG::UNIFORM and cv::RNG::NORMAL.

### 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
2024-10-08 15:55:00 +03:00
Alexander Smorkalov
28efc21530
Merge pull request #26187 from inayd:26130-fixFillPolyBoundaries
Fix fillPoly drawing over boundaries
2024-10-07 17:13:03 +03:00
Alexander Smorkalov
cda9f4197e
Merge pull request #26266 from mshabunin:fix-rvv071-build
RISC-V: fix build with RVV 0.7.1
2024-10-07 16:14:01 +03:00
Maksim Shabunin
73d68f3f49 RISC-V: fix build with RVV 0.7.1 2024-10-07 12:53:23 +03:00
Manolis Lourakis
fa6d6520c7
inversion checks
Extra checks for corner cases in 3x3 matrix inversion
2024-10-06 17:24:15 +03:00
cudawarped
e375d5786b cuda - update npp calls to use the new NppStreamContext API if available 2024-10-03 15:13:04 +03:00
Alexander Smorkalov
3901426d85
Merge pull request #26241 from asmorkalov:as/kelidicv-0.2
Updated KleidiCV HAL to version 0.2. #26241

### 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
- [ ] 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
2024-10-03 15:04:25 +03:00
Alexander Smorkalov
ae1fb8c033
Merge pull request #26224 from mshabunin:cpp-videoio-backport
C-API cleanup: backport videoio changes from 5.x
2024-10-03 14:41:20 +03:00
Wanli
783fe72756
Resolve Compilation Error for v_func Function in SIMD Emulator (#25891)
* use 2 parms for now to identify the error

* Revert "use 2 parms for now to identify the error"

This reverts commit 86faf993a7.

* replace += with =

* add v_log ref

* refactor intrin_math code

* Add include guard to `intrin_math.hpp` to prevent multiple inclusions

* rename VX to V; make fp64 impl in neon be optional

* add v_setall, v_setzero for all backends; rewrite the intrin_math

* fix error on rvv_scalable

* let v_erf use v_exp_default_32f function

* 1. replaced 'v_setzero(VecType dummy)' with 'v_setzero_<VecType>()'
2. replaced 'v_setall(LaneType x, VecType dummy)' with 'v_setall_<VecType>(LaneType x)'
3. added tests for the new v_setzero_<> and v_setall_<>.

* gcc does not seem to like static_assert in functions even when they are not used

* trying to fix compile errors in Debug mode on Linux

---------

Co-authored-by: Vadim Pisarevsky <vadim.pisarevsky@gmail.com>
2024-10-02 21:28:48 +03:00
Alexander Smorkalov
73b3b24c56
Merge pull request #26236 from asmorkalov:as/HAL_pyrlk_hack_documentation
Added HAL documentation note for out-of-bound hack in optical flow LK.
2024-10-02 17:49:09 +03:00
Alexander Smorkalov
1aa325a460 Added HAL documentation note for out-of-bound hack in optical flow LK. 2024-10-02 12:38:25 +03:00
Alexander Smorkalov
292ee28913
Merge pull request #26230 from mshabunin:cpp-photo-4x
C-API cleanup: inpaint algorithms in photo (4.x)
2024-10-02 08:13:39 +03:00
Alexander Smorkalov
b8eed54ced
Merge pull request #26228 from mshabunin:cpp-features2d-4x
C-API cleanup: use AutoBuffer in MSER (4.x)
2024-10-02 08:11:28 +03:00
inayd
93a882d2e2 Fix fillPoly drawing over boundaries 2024-10-01 21:17:42 +02:00
Maksim Shabunin
807170d5c9 C-API cleanup: inpaint algorithms in photo 2024-10-01 20:10:35 +03:00
Maksim Shabunin
72023951ea C-API cleanup: use AutoBuffer in MSER 2024-10-01 18:44:22 +03:00
Maksim Shabunin
305b57e622 C-API cleanup: backport videoio changes from 5.x 2024-10-01 17:06:08 +03:00
Alexander Smorkalov
658336b366
Merge pull request #26219 from mlourakis:4.x
SQPnP solver updates
2024-10-01 14:53:20 +03:00
Manolis Lourakis
086b999013
SQPnP solver updates
Mirror most recent changes from https://github.com/terzakig/sqpnp/pull/24
  - rank revealing QR in nullspace computation
  - sqrt-free Cholesky (i.e., L*D*Lt) in the SQP solution
  - replaced divisions with multiplications by inverses
  - simplified checks in computeRowAndNullspace()
  - removed unnecessary negations
  - broke some dependency chains with parentheses
  - minor other changes
2024-09-30 16:17:22 +03:00
Liutong HAN
8a36f119ce Add the HAL implementation for the merge function on RISC-V Vector 2024-09-29 13:39:53 +00:00
Javier Macias Sola
679931dcde Enhance cv::TickMeter to be able to get the last ellapsed time 2024-09-28 12:24:36 +02:00
Alexander Smorkalov
450e741f8d
Merge pull request #26176 from najasnake12:fixed_minor_typos_in_js_tutorials
Fixed minor typos in JS tutorials
2024-09-23 08:51:44 +03:00
Alexander Smorkalov
a6ec12f58b
Merge pull request #26163 from asmorkalov:as/HAL_schaar_deriv
HAL interface for Sharr derivatives needed for Lukas-Kanade algorithm #26163

### 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
- [ ] 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
2024-09-23 08:44:22 +03:00
Scott
50eebbd21f Fixed minor typos in js tutorials 2024-09-22 11:40:06 +02:00
Alexander Smorkalov
b2e118ea94
Merge pull request #26166 from mshabunin:fix-intrin-ops
build: fix AVX2/AVX512 builds failed due to intrinsics operator usage
2024-09-20 19:09:45 +03:00
Maksim Shabunin
6ef357fd54 build: fix AVX2/AVX512 builds failed due to intrinsics operator usage 2024-09-20 13:38:59 +03:00
Suleyman TURKMEN
f503890c2b
Merge pull request #26152 from sturkmen72:m_buf_supported
Documentation update for imagecodecs #26152

### 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
2024-09-17 09:34:38 +03:00
Alessandro de Oliveira Faria (A.K.A.CABELO)
e043d5d9d6
Merge pull request #26154 from cabelo:yolov5l
Added and tested yolov5l model. #26154

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

Below is evidence of the test:

![v5l](https://github.com/user-attachments/assets/f31eff0b-11fc-44de-bdaf-640e67d1d924)
2024-09-17 08:58:22 +03:00
Alexander Smorkalov
881440c6c6
Merge pull request #26143 from asmorkalov:as/HAL_opticalFlowLK
Added HAL interface for Lukas-Kanade optical flow #26143

### 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
- [ ] 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
2024-09-16 17:07:06 +03:00
Alexander Smorkalov
ee685017c3
Merge pull request #26153 from onurcankaraman:sample/trackerUpdate
sample: tracker parameters updated
2024-09-16 10:31:01 +03:00
Onur Can KARAMAN
aa11a898a4 sample: tracker parameters updated
Signed-off-by: Onur Can KARAMAN <onurcankaraman340@gmail.com>
2024-09-14 23:36:57 +03:00
Alexander Smorkalov
e1fec15627
Merge pull request #26148 from mshabunin:fix-sift-corruption
features2d: fixed out of bounds access in SIFT
2024-09-13 15:46:00 +03:00
Maksim Shabunin
6308739638 features2d: fixed out of bounds access in SIFT 2024-09-13 14:30:27 +03:00
Alexander Smorkalov
bf998429f6
Merge pull request #26146 from mshabunin:fix-test-overrides
ts: add some missing override markers
2024-09-13 13:33:54 +03:00
Maksim Shabunin
9663245459 ts: add some missing override markers 2024-09-13 12:48:05 +03:00
Robert Mitchell
f143f45fa2
Merge pull request #25785 from refmitchell:issue_25784
Documentation update for minMaxLoc #25785

Fixes #25784

Update documentation for minMaxLoc to be more specific about when multi-channel images are and are not supported.

Testing:
Built documentation locally to check that updates were incorporated correctly.

### 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
2024-09-13 12:34:01 +03:00
Wanli
c8080aa415
Merge pull request #26109 from WanliZhong:univ_intrin_operator2warpper
Replace operators with wrapper functions on universal intrinsics backends #26109

This PR aims to replace the operators(logic, arithmetic, bit) with wrapper functions(v_add, v_eq, v_and...)

### 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
2024-09-13 10:56:48 +03:00
Maksim Shabunin
4c81e174bf
Merge pull request #25901 from mshabunin:fix-riscv-aarch-baseline
RISC-V/AArch64: disable CPU features detection #25901

This PR is the first step in fixing current issues with NEON/RVV, FP16, BF16 and other CPU features on AArch64 and RISC-V platforms.

On AArch64 and RISC-V platforms we usually have the platform set by default in the toolchain when we compile it or in the cmake toolchain file or in CMAKE_CXX_FLAGS by user. Then, there are two ways to set platform options: a) "-mcpu=<some_cpu>" ; b) "-march=<arch description>" (e.g. "rv64gcv"). Furthermore, there are no similar "levels" of optimizations as for x86_64, instead we have features (RVV, FP16,...) which can be enabled or disabled. So, for example, if a user has "rv64gc" set by the toolchain and we want to enable RVV. Then we need to somehow parse their current feature set and append "v" (vector optimizations) to this string. This task is quite hard and the whole procedure is prone to errors.

I propose to use "CPU_BASELINE=DETECT" by default on AArch64 and RISC-V platforms. And somehow remove other features or make them read-only/detect-only, so that OpenCV wouldn't add any extra "-march" flags to the default configuration. We would rely only on the flags provided by the compiler and cmake toolchain file. We can have some predefined configurations in our cmake toolchain files.

Changes made by this PR:
- `CMakeLists.txt`: 
  - use `CMAKE_CROSSCOMPILING` instead of `CMAKE_TOOLCHAIN_FILE` to detect cross-compilation. This might be useful in cases of native compilation with a toolchain file
  - removed obsolete variables `ENABLE_NEON` and `ENABLE_VFPV3`, the first one have been turned ON by default on AArch64 platform which caused setting `CPU_BASELINE=NEON`
  - raise minimum cmake version allowed to 3.7 to allow using `CMAKE_CXX_FLAGS_INIT` in toolchain files
- added separate files with arch flags for native compilation on AArch64 and RISC-V, these files will be used in our toolchain files and in regular cmake
- use `DETECT` as default value for `CPU_BASELINE` also allow `NATIVE`, warn user if other values were used (only for AArch64 and RISC-V)
- for each feature listed in `CPU_DISPATCH` check if corresponding `CPU_${opt}_FLAGS_ON` has been provided, warn user if it is empty (only for AArch64 and RISC-V)
- use `CPU_BASELINE_DISABLE` variable to actually turn off macros responsible for corresponding features even if they are enabled by compiler
- removed Aarch64 feature merge procedure (it didn't support `-mcpu` and built-in `-march`)
- reworked AArch64 and two RISC-V cmake toolchain files (does not affect Android/OSX/iOS/Win):
  - use `CMAKE_CXX_FLAGS_INIT` to set compiler flags
  - use variables `ENABLE_BF16`, `ENABLE_DOTPROD`, `ENABLE_RVV`, `ENABLE_FP16` to control `-march`
  - AArch64: removed other compiler and linker flags
    - `-fdata-sections`, `-fsigned-char`, `-Wl,--no-undefined`, `-Wl,--gc-sections`   - already set by OpenCV
    - `-Wa,--noexecstack`, `-Wl,-z,noexecstack`, `-Wl,-z,relro`, `-Wl,-z,now` - can be enabled by OpenCV via `ENABLE_HARDENING`
    - `-Wno-psabi` - this option used to disable some warnings on older ARM platforms, shouldn't harm
  - ARM: removed same common flags as for AArch64, but left `-mthumb` and `--fix-cortex-a8`, `-z nocopyreloc`
2024-09-12 18:07:24 +03:00
FantasqueX
85923c8f30
Merge pull request #26113 from FantasqueX:zlib-ng-2-2-1
Update zlib-ng to 2.2.1 #26113

Release: https://github.com/zlib-ng/zlib-ng/releases/tag/2.2.1
ARM diagnostics patch: https://github.com/zlib-ng/zlib-ng/pull/1774

### 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
2024-09-12 16:05:24 +03:00
Alexander Smorkalov
7de3a8e960
Merge pull request #26088 from plctlab:rvp_pt2
3rdparty: NDSRVP - Part 2: Filter
2024-09-11 12:18:42 +03:00
Alexander Smorkalov
fcfdd311ab
Merge pull request #26134 from savuor:rv/mixed_arithm_channels
Mixed arithmetics tests: multichannel support
2024-09-10 13:20:04 +03:00
Alexander Smorkalov
976fb3e8d6
Merge pull request #26132 from asmorkalov:as/tlile_leakyRelu
Leaky RELU support for TFLite.
2024-09-10 10:28:35 +03:00