Commit Graph

24797 Commits

Author SHA1 Message Date
kallaballa
63b5dee274 fixed bug: variable shadowing 2024-10-10 06:35:42 +02:00
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
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
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
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
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
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
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
Javier Macias Sola
679931dcde Enhance cv::TickMeter to be able to get the last ellapsed time 2024-09-28 12:24:36 +02:00
Suleyman TURKMEN
48a48fe11c Enable PNG exif orientation test 2024-09-27 00:04:12 +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
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
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
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
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
Rostislav Vasilikhin
8725a7e21c Mixed arithmetics tests: multichannel 2024-09-09 13:54:00 +02:00
Alexander Smorkalov
209802c9f6 Leaky RELU support for TFLite. 2024-09-09 12:40:35 +03:00
pasbi
79faf857d9
Merge pull request #26042 from pasbi:add-PtrStepSz_size
Add size() to CUDA PtrStepSz #26042

According to [cppreference.com compiler support table](https://en.cppreference.com/w/cpp/compiler_support/17), `nvcc` supports `[[nodiscard]]` from version 11.

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

Related: https://github.com/opencv/opencv/pull/25659
2024-09-09 08:47:26 +03:00
Alexander Smorkalov
e5790c0241
Merge pull request #26116 from savuor:rv/warp_affine_perf_types
Added more data types for warpAffine() perf tests
2024-09-09 07:45:55 +03:00
Alexander Smorkalov
307dc2a298 Excluded nullptr leak to arithmetic HAL got from empty Mat. 2024-09-06 16:49:14 +03:00
Rostislav Vasilikhin
7590813b69
Merge pull request #26115 from savuor:rv/flip_ocl_dtypes
Added more data types to OCL flip() and rotate() perf tests #26115

Connected PR with updated sanity data: https://github.com/opencv/opencv_extra/pull/1206

### 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
- [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-06 08:26:00 +03:00
Maksim Shabunin
dbd53fe89a RISC-V: remove statically initialized global RVV variables 2024-09-05 19:50:43 +03:00
Rostislav Vasilikhin
c0a0852f05 added more data types for warpAffine() perf tests 2024-09-05 05:46:17 +02:00
Rostislav Vasilikhin
9ef574a213 added bit-exact tests for RGB2Gray 2024-09-05 03:34:35 +02:00
Vincent Rabaud
8561f45c2a
Merge pull request #26084 from vrabaud:avif_check
Avoid uninitialized value read in resize. #26084

When there is no point falling right, an hypothetical value is computed (but unused) using an uninitialized ofst. This triggers warnings in the sanitizers.

Including those values in the for loops is also possible but messy when SIMD is involved.

### 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
2024-09-03 15:16:22 +03:00
tingboliao
88f99edc65
Merge pull request #26071 from tingboliao:4.x
Remove the redundant codes of cv::convertMaps and mRGBA2RGBA<uchar> #26071

(1) cv::convertMaps: the branch [else if( m1type == CV_32FC2 && dstm1type == CV_16SC2 ) if( nninterpolate )] is unreachable,
    as the condition is satisfied in lines 1959 to 1961, calculated in advance and return directly.
(2) mRGBA2RGBA<uchar>: dst[0], dst[1], dst[2] and dst[3] is calculated repeatedly. Introduced in https://github.com/opencv/opencv/pull/13440

### 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
2024-09-03 07:56:37 +03:00
Suleyman TURKMEN
e2ba36bf9c
Merge pull request #26093 from sturkmen72:related_issue_22090
Update test_tiff.cpp #26093

related #22090

### 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.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-09-02 15:26:24 +03:00
catree
165bf25c46 Fix typo with cameramatrix command for documentation.
Fix link for "RANSAC for Dummies" tutorial.
2024-09-01 01:03:57 +02:00
Alexander Smorkalov
4d66541999
Merge pull request #26067 from CNClareChen:4.10
Resolve compilation bug on LoongArch platform
2024-08-30 14:01:53 +03:00
Alexander Smorkalov
5b4d1ce6a0
Merge pull request #26080 from asmorkalov:as/HAL_minMaxIdx_ND_offset
Added offset for HAL as ofs2idx expects 1-based index #26080

### 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-08-30 13:10:24 +03:00
Alexander Smorkalov
2829a6de85
Merge pull request #26030 from CNClareChen:4.x
Workaround for division by zero, issue #25795
2024-08-30 11:35:08 +03:00
Alexander Smorkalov
f156236d17
Merge pull request #26081 from mshabunin:fix-v4l-nv12
videoio: fix V4L backend with NV12 input format
2024-08-28 18:46:53 +03:00
Maksim Shabunin
61f6b6d773 videoio: fix V4L backend with NV12 input format 2024-08-28 16:43:27 +03:00
Vincent Rabaud
a17fafc3af Disable strict mode when reading avif files
This fixes https://github.com/opencv/opencv/issues/26011
2024-08-28 11:49:27 +02:00
alexlyulkov
766bad0035
Merge pull request #26053 from alexlyulkov:al/opencl-conformance-tests
DNN(ONNX): Enabled several OpenCL conformance tests #26053

The tests also work in 5.x

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-08-27 17:23:11 +03:00
Alexander Smorkalov
ea8c9dc2de
Merge pull request #26062 from asmorkalov:as/pow_ocl_duplicate
Removed duplicated code in Pow implementation that triggers wrong assert on Intel iGPU
2024-08-27 17:04:57 +03:00
Liutong HAN
2d5b0caa77 Enable CV_SIMD_SCALABLE in medianBlur. 2024-08-27 02:51:08 +00:00
Hao Chen
5638c38d53 Resolve compilation bug
Fixed a bug that occurred when compiling with the clang18 compiler.

Signed-off-by: Hao Chen <chenhao@loongson.cn>
2024-08-26 17:24:05 +08:00
Hao Chen
9c19a0cdba Reinitialize divider matrix in DivRCPerfTest and DivPerfTest Cases.
This patch reinitializes divider matrix without zero values in DivRCPerfTest
and DivPerfTest test cases.
2024-08-26 16:23:50 +08:00
Alexander Smorkalov
76bf17a248 Removed duplicated code in Pow implementation that triggers wrong assert on Intel iGPU. 2024-08-23 17:44:58 +03:00
penghuiho
f4c2e4f872
Merge pull request #26061 from penghuiho:fix-pow-bug
Fixed the simd bugs of iPow8u and iPow16u #26061

Add the following cases in opencv_perf_core:

* OCL_PowFixture_iPow.iPow/0, where GetParam() = (640x480, 8UC1)
* OCL_PowFixture_iPow.iPow/2, where GetParam() = (640x480, 16UC1)

iPow8u and iPow16u failed to call to simd accelerating while executing.

Fix the bug by changing the input type of iPow_SIMD function.

### 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-08-23 17:12:19 +03:00
Abduragim Shtanchaev
e5b871fa7e
Merge pull request #26059 from Abdurrahheem:ash/fix-einsum-allocation
Einsum buffer allocation fix #26059

This PR fixed buffer allocation issue in Einsum layer that causes segmentation fault on 32bit platforms. Related issue #26008 

### 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-08-23 15:25:48 +03:00
Kumataro
a3bdbf5553
Merge pull request #26022 from Kumataro:fix26016
Imgproc: use double to determine whether the corners points are within src #26022

close #26016
Related https://github.com/opencv/opencv_contrib/pull/3778

### 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-08-23 12:35:13 +03:00
Alexander Smorkalov
916724e2a0
Merge pull request #26054 from asmorkalov:as/warping_perf
Extended perf tests for warpPerspective to cover channels too
2024-08-23 11:58:20 +03:00
Alexander Smorkalov
6c6d5cd7b2
Merge pull request #25986 from asmorkalov:as/js_for_contrib
Split Javascript white-list to support contrib modules #25986

Single whitelist converted to several per-module json files. They are concatenated automatically and can be overriden by user config.

Related to https://github.com/opencv/opencv/pull/25656

### 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-08-23 10:49:08 +03:00
Maxim Smolskiy
697512bb9f
Merge pull request #26014 from MaximSmolskiy:increase-search-radius-for-corners-neighbors-in-ChessBoardDetector-findQuadNeighbors
Increase neighbors search radius for corners in ChessBoardDetector:findQuadNeighbors #26014

I didn't do everything right the way I wanted at #25991. I forgot that `edge_len` is edge **squared** length as well as `thresh_scale` is threshold for **squared** scale. So, I wanted to increase scale by `sqrt(2)` times (idea is to use quad diagonal instead of quad side) and therefore `thresh_scale` should be equal to `sqrt(2)^2 = 2`.

And refactor variables names to explicitly indicate that they are squared, so that no one else falls into this trap

I tested this PR with benchmark
```
python3 objdetect_benchmark.py --configuration=generate_run --board_x=7 --path=res_chessboard --synthetic_object=chessboard
```
PR increases detected chessboards number by `1/2%`:
```
cell_img_size = 100 (default)

before
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.941667                      13560             14400                           0.596726
Total detected time:  136.68963200000007 sec

after
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.952083                      13710             14400                           0.595984
Total detected time:  136.55770600000014 sec

----------------------------------------------------------------------------------------------------------------------------------------------

cell_img_size = 10

before
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.579167                       8340             14400                           4.198448
Total detected time:  2.535998999999999 sec

after
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error 
                                      all             0.591389                       8516             14400                           4.155250
Total detected time:  2.700832999999997 sec
```

### 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
2024-08-22 15:06:02 +03:00
Alexander Smorkalov
55d1bf3da9 Extended perf tests for warpPerspective to cover channels too. 2024-08-21 17:31:28 +03:00
Yuantao Feng
347d673a87
Merge pull request #23279 from fengyuentau:add_topk
dnn: add ONNX TopK #23279

Merge with https://github.com/opencv/opencv_extra/pull/1200

Partially fixes #22890 and #20258

To-do:

- [x] TopK forward impl
- [x] add tests
- [x] support Opset 1 & 10 if possible
- [ ] ~Support other backends~ (TopK has two outputs, which is not supported by other backends, such as openvino)


Perf:

M1 (time in millisecond)

| input shape     | axis | dnn  | ort  |
| --------------- | ---- | ---- | ---- |
| (1000, 100)     | 0    | 1.68 | 4.07 |
| (1000, 100) K5  | 0    | 1.13 | 0.12 |
| (1000, 100)     | 1    | 0.96 | 0.77 |
| (100, 100, 100) | 0    | 10.00 | 31.13 |
| (100, 100, 100) | 1    | 7.33 | 9.17 |
| (100, 100, 100) | 2    | 7.52 | 9.48 |

M2 (time in milisecond)

| input shape     | axis | dnn  | ort  |
| --------------- | ---- | ---- | ---- |
| (1000, 100)     | 0    | 0.76 | 2.44 |
| (1000, 100) K5 | 0 | 0.68 | 0.07 |
| (1000, 100)     | 1    | 0.41 | 0.50 |
| (100, 100, 100) | 0    | 4.83 | 17.52|
| (100, 100, 100) | 1    | 3.60 | 5.08 |
| (100, 100, 100) | 2    | 3.73 | 5.10 |

ONNXRuntime performance testing script: https://gist.github.com/fengyuentau/a119f94fd16721ec9974b8c7b0a45d4c

### 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-08-21 17:03:24 +03:00
FantasqueX
7cf075c392
Merge pull request #25968 from FantasqueX:correct-bayer2gray-simd-1
Correct Bayer2Gray u8 SIMD #25968

SIMD version of CV_DESCALE is not correct. It should be implemented using v_dotprod.

What's more, the stop condition of vector operation should be `bayer < bayer_end - 14` because we just need to make sure result is safely stored into `dst`.

Closes: https://github.com/opencv/opencv/issues/25823

### 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.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-08-21 11:33:07 +03:00
Alexander Smorkalov
7e3b69e02b
Merge pull request #26052 from savuor:rv/rounding_lock
Fix rounding mode for test
2024-08-21 10:26:34 +03:00
alexlyulkov
8715229e49
Merge pull request #26009 from alexlyulkov:al/unify-build-gradle
Unified build.gradle files into one template #26009

Issue #24686

### 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
2024-08-21 09:24:28 +03:00
Rostislav Vasilikhin
7fe36a3cb2 lock rounding mode for parallel test run 2024-08-21 09:02:02 +03:00
Alexander Smorkalov
a087a9c47a
Merge pull request #26045 from asmorkalov:as/variant-free
Free Variant variable after usage in DShow back-end
2024-08-20 14:19:39 +03:00
Ivan Afanasyev
7d3d2101f9 speedup random forest getVotes method. 2024-08-20 15:35:59 +07:00
Alexander Smorkalov
24fde08712 Free Variant variable after usage in DShow back-end 2024-08-19 21:40:52 +03:00
Alexander Smorkalov
ae4a11b0c0
Merge pull request #26034 from Octopus136:issue-26033
Fix: reduce redundant code by optimizing device name retrieval
2024-08-19 19:06:16 +03:00
ShengYu
aa133cd899
Merge pull request #26038 from shengyu7697:fix-typo
Fix typos #26038

Fix typos

### 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-08-19 13:00:07 +03:00
Octopus136
61d719d2aa fix: reduce redundant code by optimizing device name retrieval 2024-08-16 15:31:35 +08:00
Alexander Alekhin
78630ddc67 Merge pull request #26029 from fengyuentau:dnn/fix_cuda_matmul_crash 2024-08-16 01:08:34 +00:00
Letu Ren
a8a088d28c Fix typo in MorphShapes document 2024-08-15 18:20:57 +08:00
Yuantao Feng
93e0c7e53f fix matmul crash 2024-08-15 16:10:40 +08:00
Kumataro
da3debda6d
Merge pull request #25981 from Kumataro:fix25971
imgproc: add specific error code when cvtColor is used on an image with an invalid number of channels #25981

close #25971

### 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.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-08-09 14:22:02 +03:00
Alexander Smorkalov
67d0338c9c
Merge pull request #26004 from ericmariasis:eric-mariasis-issue-26000
got rid of std prefix
2024-08-07 10:26:24 +03:00
ericmariasis
3f92884520 got rid of std prefix 2024-08-07 00:17:04 -04:00
James Choi
582a7f32d5
Merge pull request #25832 from chachoi-world:4.x
Add support for QNX #25832

Build and test instruction for QNX:
https://github.com/chachoi-world/qnx-ports/blob/main/opencv/README.md

### 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-08-06 20:25:39 +03:00
Alexander Smorkalov
d8bcc2c85d
Merge pull request #25996 from asmorkalov:as/fillPoly_check
Fixed asserts in fillPoly
2024-08-06 17:56:22 +03:00
Rostislav Vasilikhin
1acf722e24
Merge pull request #25970 from savuor:rv/hal_pyrdown
pyrDown: offset HAL added, IPP removed #25970

Resolves #25976

### Changes
* HAL added for offset support so that border pixels can be fetched from outside of the image ROI (see `BORDER_ISOLATED` parameter)
* IPP removed since there is `pyrUp` instead of `pyrDown` and there's no easy way to fix this other than rewriting it from scratch
* replaced old C call by modern `cv::pyrDown`

### 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
- [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-08-06 15:04:53 +03:00
Alexander Smorkalov
9dee2c6e67 Fixed asserts in fillPoly. 2024-08-06 12:02:01 +03:00
Alexander Smorkalov
49459d46e2
Merge pull request #25932 from asmorkalov:as/HAL_cvtColor_aprox
Added xxxApprox overloads for YUV color conversions in HAL and AlgorithmHint to cvtColor #25932

The xxxApprox to implement HAL functions with less bits for arithmetic of FP.

The hint was introduced in #25792 and #25911

### 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-08-06 11:40:58 +03:00
Alexander Smorkalov
333054e05e
Merge pull request #25943 from asmorkalov:as/fisheye_distrort_newk
Added fisheye::distortPoints with non-identity projection matrix
2024-08-05 19:33:18 +03:00
Alexander Smorkalov
ea2a3cb264
Merge pull request #25643 from cpoerschke:issue-25635-find-existing-file-tests
replace lena.jpg in find-existing-file tests
2024-08-05 15:28:16 +03:00
Alexander Smorkalov
ecbff5a20c
Merge pull request #25786 from plctlab:rvp_3rdparty
3rdparty: NDSRVP - Part 1.5: New Interfaces
2024-08-05 15:26:31 +03:00
Alexander Smorkalov
75fca7d9d0 Added fisheye::distort with non-identity projection matrix. 2024-08-05 15:22:00 +03:00
Maxim Smolskiy
6ed603e917
Merge pull request #25991 from MaximSmolskiy:improve-corners-matching-in-ChessBoardDetector-NeighborsFinder-findCornerNeighbor
Improve corners matching in ChessBoardDetector::NeighborsFinder::findCornerNeighbor #25991

### Pull Request Readiness Checklist

Idea was mentioned in `Section III-B. New Heuristic for Quadrangle Linking` of `Rufli, Martin & Scaramuzza, Davide & Siegwart, Roland. (2008). Automatic Detection of Checkerboards on Blurred and Distorted Images. 2008 IEEE/RSJ International Conference on Intelligent Robots and Systems, IROS. 3121-3126. 10.1109/IROS.2008.4650703` (https://rpg.ifi.uzh.ch/docs/IROS08_scaramuzza_b.pdf):
![Снимок экрана от 2024-08-05 09-51-27](https://github.com/user-attachments/assets/7a090ccc-c24c-4dfb-b0dd-259c8709eb72)
```
* For each candidate pair, focus on the quadrangles they belong to and draw two straight lines passing through the midsections of the respective quadrangle edges (see Fig. 6).
* If the candidate corner and the source corner are on the same side of every of the four straight lines drawn this way (this corresponds to the yellow shaded area in Fig. 6), then the corners are successfully matched.
```

By improving corners matching, we can increase the search radius (`thresh_scale`).

I tested this PR with benchmark
```
python3 objdetect_benchmark.py --configuration=generate_run --board_x=7 --path=res_chessboard --synthetic_object=chessboard
```
PR increases detected chessboards number by `3/7%`:
```
cell_img_size = 100 (default)

before
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.910417                      13110             14400                           0.599746
Total detected time:  147.50906700000002 sec

after
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.941667                      13560             14400                           0.596726
Total detected time:  136.68963200000007 sec

----------------------------------------------------------------------------------------------------------------------------------------------

cell_img_size = 10

before
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.539792                       7773             14400                           4.208237
Total detected time:  2.668964 sec

after
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.579167                       8340             14400                           4.198448
Total detected time:  2.535998999999999 sec
```

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
2024-08-05 13:28:07 +03:00
Alexander Smorkalov
ab99f87b6a
Merge pull request #25979 from asmorkalov:as/custom_allocator
Set and check allocator pointer for all cv::Mat instances
2024-08-05 11:52:00 +03:00
Alexander Smorkalov
9de2ebbec1
Merge pull request #25978 from chacha21:cuda_stdallocator
Adding getStdAllocator() to cv::cuda::GpuMat
2024-08-05 10:58:33 +03:00
Alexander Smorkalov
a15cd4b63d Set and check allocator pointer for all cv::Mat instances. 2024-08-05 10:07:14 +03:00
Aven
796974cccc fix compilation errors caused by namespace
related: #25199
2024-08-04 05:04:03 +08:00
stepkamipt
340a390ea2 Fix path to 3rdparty cmake.
Current code using CMAKE_SOURCE_DIR and it works well if opencv is standalone CMake project,
but in case of building OpenCV as part of a larger CMake project (e.g. one that includes
opencv and opencv_contrib) this path is incorrect, unlike OpenCV_SOURCE_DIR
2024-08-02 10:07:36 +02:00
Junyan721113
35463e079c feat: Part 1.5 - New Interfaces 2024-08-02 13:47:45 +08:00