Commit Graph

25022 Commits

Author SHA1 Message Date
Benjamin Knecht
1aa658fa75 Address more comments
Use map to manage unique marker size candidate trees.
Avoid code duplication.
Add a test to show double detection with overlapping dictionaries.
Generalize to marker sizes of not only predefined dictionaries.
2025-03-04 15:24:03 +01:00
Benjamin Knecht
3084f950cf Fix dictionary comparison in test 2025-02-27 10:52:27 +01:00
Benjamin Knecht
d869b12e89 Fixing warnings in tests 2025-02-25 11:50:13 +01:00
Benjamin Knecht
314f99f7a0 Remove add/removeDictionary and retain ABI of set/getDictionary
functions
2025-02-24 18:01:10 +01:00
Benjamin Knecht
6c3b195a57 Make sure serialization with single dict preserves old behavior 2025-02-24 17:33:09 +01:00
Benjamin Knecht
3c88a001a2 Add docs to Dictionary get/set/add/remove functions 2025-02-24 14:30:48 +01:00
Benjamin Knecht
364eedb87e Undo multi dict functionality of refineDetectedMarkers method 2025-02-20 15:37:44 +01:00
Benjamin Knecht
1f9d6aa6cf Fixed warning on Windows, clarified refineDetectedMarkers method 2025-02-20 15:12:56 +01:00
Benjamin Knecht
f212c163e3 have two detectMarkers functions for python backwards compatibility
using multiple dictionaries for refinement (function split not necessary
as it's backwards compatible)
2025-02-19 18:45:06 +01:00
Benjamin Knecht
9ae23a7f51 Fix index comparison warnings 2025-02-19 10:53:03 +01:00
Benjamin Knecht
bb07ce7454 Address comments, add Python test 2025-02-18 17:03:37 +01:00
Benjamin Knecht
379b5a2fdb Fix python bindings 2025-02-18 14:08:09 +01:00
Benjamin Knecht
c759a7cdde Extend ArUcoDetector to run multiple dictionaries in an efficient
manner.

* Add constructor for multiple dictionaries
* Add get/set/remove/add functions for multiple dictionaries
* Add unit tests

TESTED=unit tests
2025-02-18 11:04:05 +01:00
Alexander Smorkalov
ae25c3194f
Merge pull request #26875 from asmorkalov:as/in_memory_models
Added trackers factory with pre-loaded dnn models #26875

Replaces https://github.com/opencv/opencv/pull/26295

Allows to substitute custom models or initialize tracker from in-memory model.

### 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
2025-02-14 15:35:38 +03:00
Alexander Smorkalov
58e557d059
Merge pull request #26903 from asmorkalov:as/openvx_hal
Migrate remaning OpenVX integrations to OpenVX HAL (core) #26903

Tested with OpenVX 1.2 & 1.3 sample implementation.

Steps to build and test:
```
git clone git@github.com:KhronosGroup/OpenVX-sample-impl.git
cd OpenVX-sample-impl
python3 Build.py --os=Linux --conf=Release
cd ..
mkdir build
cmake -DWITH_OPENVX=ON -DOPENVX_ROOT=/mnt/Projects/Projects/OpenVX-sample-impl/install/Linux/x64/Release/ ../opencv
make -j8
```

### 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
2025-02-14 11:55:20 +03:00
Maksim Shabunin
45aa502549
Merge pull request #26915 from mshabunin:fix-png-be
Resolves #26913
Related(?): #25715 #26832
2025-02-13 16:58:15 +03:00
Alexander Smorkalov
8e65075c1e
Merge pull request #26895 from asmorkalov:as/mean_hal
Use HAL for cv::mean function too
2025-02-12 12:02:14 +03:00
Alexander Smorkalov
7aaada4175 Use HAL for cv::mean function too. 2025-02-12 08:51:20 +03:00
Alexander Smorkalov
62658fba24
Merge pull request #26908 from shyama7004:_DEBUG/NDEBUG
Fix _DEBUG/NDEBUG handling across modules
2025-02-12 08:18:16 +03:00
shyama7004
076bfa6431 Fix _DEBUG/NDEBUG handling across modules (#26151) 2025-02-11 22:00:44 +05:30
Alexander Smorkalov
7eaddb8aa4
Merge pull request #26897 from shyama7004:typos-fix
fix hal_replacement typos
2025-02-11 09:37:08 +03:00
shyama7004
a490623bf0 fix hal_replacement typos 2025-02-10 20:33:33 +05:30
Alexander Smorkalov
1e013a07c4
Merge pull request #26891 from MaximSmolskiy:refactor-test-for-filestorage-base64
Refactor test for FileStorage Base64
2025-02-10 13:31:29 +03:00
Kumataro
fbd8180cc1 imgcodecs: tiff: refactor reading scanlines test 2025-02-10 08:40:28 +09:00
MaximSmolskiy
4d23b56d98 Refactor test for FileStorage Base64 2025-02-09 01:38:14 +03:00
Alexander Smorkalov
0e17a879d7
Merge pull request #26890 from shyama7004:type-hint
fix wrong python type hints for imread
2025-02-08 11:19:36 +03:00
shyama7004
bbca50ecc5 fix wrong python type hints for imread 2025-02-08 11:17:34 +03:00
RoshniUG
b323780460
Merge pull request #26662 from RoshniUG:4.x
Update window_cocoa.mm #26662

### 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
- [x ] Added reference to the original bug report (#26661).
- [x]Updated the code as per the reviewer's suggestion to use a ternary operator.
- [x] Verified that the feature is properly documented and can be built with CMake.
2025-02-08 09:50:53 +03:00
Alexander Smorkalov
aeac913203
Merge pull request #26882 from shyama7004:nullptr-setidentity
replace null literals with nullptr and optimize setidentity with std::fill
2025-02-07 17:18:49 +03:00
Alexander Smorkalov
740388b3ce
Merge pull request #26867 from shyama7004:fix-meanStdDev
fix meanStdDev overflow for large images
2025-02-07 13:13:35 +03:00
shyama7004
987ba6504b fix meanStdDev overflow for large images 2025-02-07 10:17:48 +03:00
shyama7004
32d3d54ca1 replace null literals with nullptr; optimize setidentity with std::fill for cv_64fc1 2025-02-06 23:48:23 +05:30
天音あめ
2e909c38dc
Merge pull request #26804 from amane-ame:norm_hal_rvv
Add RISC-V HAL implementation for cv::norm and cv::normalize #26804

This patch implements `cv::norm` with norm types `NORM_INF/NORM_L1/NORM_L2/NORM_L2SQR` and `Mat::convertTo` function in RVV_HAL using native intrinsic, optimizing the performance for `cv::norm(src)`, `cv::norm(src1, src2)`, and `cv::normalize(src)` with data types `8UC1/8UC4/32FC1`.

`cv::normalize` also calls `minMaxIdx`, #26789 implements RVV_HAL for this.

Tested on MUSE-PI for both gcc 14.2 and clang 20.0.

```
$ opencv_test_core --gtest_filter="*Norm*"
$ opencv_perf_core --gtest_filter="*norm*" --perf_min_samples=300 --perf_force_samples=300
```

The head of the perf table is shown below since the table is too long.

View the full perf table here: [hal_rvv_norm.pdf](https://github.com/user-attachments/files/18468255/hal_rvv_norm.pdf)

<img width="1304" alt="Untitled" src="https://github.com/user-attachments/assets/3550b671-6d96-4db3-8b5b-d4cb241da650" />

### 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
2025-02-06 19:34:54 +03:00
Kumataro
01e3fe8791
Merge pull request #26859 from Kumataro:fix26858
imgcodecs:gif: support IMREAD_UNCHANGED and IMREAD_GRAYSCALE #26859

Close #26858 

### 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
2025-02-06 19:29:54 +03:00
Malacath-92
7563cebad5
Merge pull request #26879 from Malacath-92:4.x
Add missing include in gislandmodel.hpp #26879

Add `<exception>`, `<string>`, and `<cstddef>` includes to `gislandmodel.hpp` which are required due to the usage of `std::exception_ptr`, `std::string`, and `size_t` in this header.

Notably one of those causes a build error on recent versions of Xcode: #26780 

### 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
- [N/A] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [N/A] The feature is well documented and sample code can be built with the project CMake
2025-02-06 13:34:46 +03:00
Suleyman TURKMEN
e8e49ab7a8
Merge pull request #26872 from sturkmen72:ImageEncoders_revisions
Performance tests for image encoders and decoders and code cleanup #26872

### 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
2025-02-04 12:21:55 +03:00
Alexander Smorkalov
3356b36d72
Merge pull request #26863 from shyama7004:minor-change
minor change
2025-02-03 08:37:57 +03:00
shyama7004
0cfc2e8fd8 minor change 2025-01-31 21:12:36 +05:30
天音あめ
13b2caffe0
Merge pull request #26789 from amane-ame:minmax_hal_rvv
Add RISC-V HAL implementation for minMaxIdx #26789

On the RISC-V platform, `minMaxIdx` cannot benefit from Universal Intrinsics because the UI-optimized `minMaxIdx` only supports `CV_SIMD128` (and does not accept `CV_SIMD_SCALABLE` for RVV).

1d701d1690/modules/core/src/minmax.cpp (L209-L214)

This patch implements `minMaxIdx` function in RVV_HAL using native intrinsic, optimizing the performance for all data types with one channel.

Tested on MUSE-PI for both gcc 14.2 and clang 20.0.

```
$ opencv_test_core --gtest_filter="*MinMaxLoc*"
$ opencv_perf_core --gtest_filter="*minMaxLoc*"
```
<img width="1122" alt="Untitled" src="https://github.com/user-attachments/assets/6a246852-87af-42c5-a50b-c349c2765f3f" />

### 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
2025-01-31 14:26:49 +03:00
Vincent Rabaud
c21d0ad9d0
Merge pull request #26854 from vrabaud:png_leak
Fix oss-fuzz bugs 391934081 and 392318892 #26854

- fix a potential overflow in x0+w0
- use the proper function to deal with background color to deal with all cases of the spec
- use BGR layout for APNG background color

### 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
2025-01-31 11:00:23 +03:00
Maksim Shabunin
f6c9ca5602 RISC-V: increase DotProduct test threshold a bit 2025-01-30 15:09:32 +03:00
Alexander Smorkalov
d5f69305cb
Merge pull request #26851 from sturkmen72:fix-22551
fix related the issue 22551
2025-01-29 18:06:22 +03:00
Skreg
bb798d15e1
Merge pull request #26831 from shyama7004:fix-denoising.cpp
Added 16-bit support to fastNlMeansDenoising and updated tests #26831

Fixes : #26582

### 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
2025-01-29 15:45:40 +03:00
Suleyman TURKMEN
585226a5fd fix for large tEXt chunk 2025-01-28 16:54:00 +03:00
Maxim Smolskiy
08a24ba2cf
Merge pull request #26846 from MaximSmolskiy:fix_bug_with_int64_support_for_FileStorage
Fix bug with int64 support for FileStorage #26846

### Pull Request Readiness Checklist

Fix #26829, https://github.com/opencv/opencv-python/issues/1078

In current implementation of `int64` support raw size of recorded integer is variable (`4` or `8` bytes depending on value). But then we iterate over nodes we need to know it exact value
dfad11aae7/modules/core/src/persistence.cpp (L2596-L2609)

Bug is that `rawSize` method still return `4` for any integer. I haven't figured out a way how to get variable raw size for integer in this method. I made raw size for integer is constant and equal to `8`.

Yes, after this patch memory consumption for integers will increase, but I don't know a better way to do it yet. At least this fixes bug and implementation becomes more correct

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
2025-01-28 11:08:26 +03:00
Alexander Smorkalov
0049cde1f7
Merge pull request #26826 from devatbosch:4.x
Workaround solution for isuue #26818
2025-01-28 08:01:41 +03:00
Skreg
e62ab4ff71
Merge pull request #26850 from shyama7004:update-headers
Update includes in filter.hpp #26850

Fixes :
```
identifier "Mat" is undefinedC/C++(20)
namespace "std" has no member "vector"C/C++(135)
```

### 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
2025-01-28 07:26:40 +03:00
Kumataro
c840e24e94
Merge pull request #26844 from Kumataro:fix26843
imgcodecs: jpegxl: imdecode() directly read from memory #26844

Close #26843 

### 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
2025-01-27 17:18:28 +03:00
eplankin
ae57c54d83
Merge pull request #26463 from eplankin:icv_update_2022.0.0
Update IPP integration #26463

Please merge together with https://github.com/opencv/opencv_3rdparty/pull/88
Supported IPP version was updated to IPP 2022.0.0 for Linux and Windows. 32-bit binaries are dropped since this release.

Previous update: https://github.com/opencv/opencv/pull/25935
2025-01-27 17:02:36 +03:00
Alexander Smorkalov
f5c06f8b91
Merge pull request #26848 from vrabaud:png
Fix overlow pointers.
2025-01-27 16:54:10 +03:00