1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

3355 Commits

Author SHA1 Message Date
Alexander Smorkalov 1aa69292b0 Backported some CALL_HAL improvements from 5.x #26946 2025-03-03 16:22:48 +03:00
天音あめ b6b5a10a8e Merge pull request #26946 from amane-ame:minmax_fix_hal_rvv
Fix HAL dispatch in cv::minMaxIdx #26946

Closes https://github.com/opencv/opencv/pull/26939#issuecomment-2669617834.
Closes https://github.com/opencv/opencv/issues/26947

### 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-03-03 16:13:40 +03:00
GenshinImpactStarts 33d632f85e impl hal_rvv norm_hamming
Co-authored-by: Liutong HAN <liutong2020@iscas.ac.cn>
2025-02-25 02:31:02 +00:00
Daniil Anufriev b5f5540e8a Merge pull request #26886 from sk1er52:feature/exp64f
Enable SIMD_SCALABLE for exp and sqrt #26886

### 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
```
CPU - Banana Pi k1, compiler - clang 18.1.4
```
```
Geometric mean (ms)

              Name of Test               baseline  hal     ui      hal         ui    
                                                                    vs         vs
                                                                 baseline   baseline
                                                                (x-factor) (x-factor)
Exp::ExpFixture::(127x61, 32FC1)          0.358     --   0.033      --       10.70   
Exp::ExpFixture::(640x480, 32FC1)         14.304    --   1.167      --       12.26   
Exp::ExpFixture::(1280x720, 32FC1)        42.785    --   3.538      --       12.09
Exp::ExpFixture::(1920x1080, 32FC1)       96.206    --   7.927      --       12.14   
Exp::ExpFixture::(127x61, 64FC1)          0.433   0.050  0.098     8.59       4.40   
Exp::ExpFixture::(640x480, 64FC1)         17.315  1.935  3.813     8.95       4.54   
Exp::ExpFixture::(1280x720, 64FC1)        52.181  5.877  11.519    8.88       4.53   
Exp::ExpFixture::(1920x1080, 64FC1)      117.082  13.157 25.854    8.90       4.53
```
Additionally, this PR brings Sqrt optimization with UI:
```
Geometric mean (ms)

              Name of Test                     baseline    ui       ui    
                                                                    vs
                                                                 baseline
                                                                (x-factor)
Sqrt::SqrtFixture::(127x61, 5, false)            0.111   0.027     4.11   
Sqrt::SqrtFixture::(127x61, 6, false)            0.149   0.053     2.82   
Sqrt::SqrtFixture::(640x480, 5, false)           4.374   0.967     4.52   
Sqrt::SqrtFixture::(640x480, 6, false)           5.885   2.046     2.88   
Sqrt::SqrtFixture::(1280x720, 5, false)          12.960  2.915     4.45   
Sqrt::SqrtFixture::(1280x720, 6, false)          17.648  6.107     2.89   
Sqrt::SqrtFixture::(1920x1080, 5, false)         29.178  6.524     4.47   
Sqrt::SqrtFixture::(1920x1080, 6, false)         39.709  13.670    2.90   
```

Reference
Muller, J.-M. Elementary Functions: Algorithms and Implementation. 2nd ed. Boston: Birkhäuser, 2006.
https://www.springer.com/gp/book/9780817643720
2025-02-21 17:36:54 +03:00
Yuantao Feng e2803bee5c Merge pull request #26885 from fengyuentau:4x/core/normalize_simd
core: vectorize cv::normalize / cv::norm #26885

Checklist:
|      | normInf | normL1 | normL2 |
| ---- | ------- | ------ | ------ |
| bool |    -    |   -    |   -    |
| 8u   |    √    |   √    |   √    |
| 8s   |    √    |   √    |   √    |
| 16u  |    √    |   √    |   √    |
| 16s  |    √    |   √    |   √    |
| 16f  |    -    |   -    |   -    |
| 16bf |    -    |   -    |   -    |
| 32u  |    -    |   -    |   -    |
| 32s  |    √    |   √    |   √    |
| 32f  |    √    |   √    |   √    |
| 64u  |    -    |   -    |   -    |
| 64s  |    -    |   -    |   -    |
| 64f  |    √    |   √    |   √    |

*: Vectorization of data type bool, 16f, 16bf, 32u, 64u and 64s needs to be done on 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
- [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-02-21 13:49:11 +03:00
Alexander Smorkalov 1483504702 Merge branch 4.x 2025-02-20 13:58:04 +03:00
kyler1cartesis d32d4da9a3 Merge pull request #26887 from kyler1cartesis:4.x
invSqrt SIMD_SCALABLE implementation & HAL tests refactoring #26887

Enable CV_SIMD_SCALABLE for invSqrt.

* Banana Pi BF3 (SpacemiT K1) RISC-V
* Compiler: Syntacore Clang 18.1.4 (build 2024.12)

```
Geometric mean (ms)

                Name of Test                  baseline   simd      simd   
                                                       scalable  scalable
                                                                    vs
                                                                 baseline
                                                                (x-factor)
InvSqrtf::InvSqrtfFixture::(127x61, 32FC1)     0.163    0.051      3.23   
InvSqrtf::InvSqrtfFixture::(127x61, 64FC1)     0.241    0.103      2.35   
InvSqrtf::InvSqrtfFixture::(640x480, 32FC1)    6.460    1.893      3.41   
InvSqrtf::InvSqrtfFixture::(640x480, 64FC1)    9.687    3.999      2.42   
InvSqrtf::InvSqrtfFixture::(1280x720, 32FC1)   19.292   5.701      3.38   
InvSqrtf::InvSqrtfFixture::(1280x720, 64FC1)   29.452   11.963     2.46   
InvSqrtf::InvSqrtfFixture::(1920x1080, 32FC1)  43.326   12.805     3.38   
InvSqrtf::InvSqrtfFixture::(1920x1080, 64FC1)  65.566   26.881     2.44
```
2025-02-19 12:13:48 +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
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 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 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
MaximSmolskiy 1623576a88 Support 32-bit unsigned type for FileStorage Base64 2025-02-06 21:13:34 +03:00
天音あめ 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
Maxim Smolskiy 8badff598e Merge pull request #26871 from MaximSmolskiy:fix-filestorage_io_test-test_base64-for-64-bit-integer-types
Support 64-bit integer types for FileStorage Base64 #26871

### Pull Request Readiness Checklist

Related to https://github.com/opencv/opencv/pull/26846#issuecomment-2618159277
OpenCV extra: https://github.com/opencv/opencv_extra/pull/1232

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 18:47:07 +03:00
Yuantao Feng 603b1cafdf Merge pull request #26821 from fengyuentau:core/transform_simd
Core: vectorize cv::transform in terms of all data types #26821

## Performance

### i7-12700K

```
Geometric mean (ms)

                      Name of Test                       base  patch   patch
                                                                         vs
                                                                        base
                                                                     (x-factor)
Mat_Transform::Size_MatType::(127x61, 8SC3)              0.017 0.004    4.64
Mat_Transform::Size_MatType::(127x61, 16SC3)             0.015 0.004    3.78
Mat_Transform::Size_MatType::(127x61, 32SC3)             0.015 0.007    2.03
Mat_Transform::Size_MatType::(127x61, 64FC3)             0.007 0.004    1.78
Mat_Transform::Size_MatType::(640x480, 8SC3)             0.673 0.140    4.80
Mat_Transform::Size_MatType::(640x480, 16SC3)            0.618 0.158    3.90
Mat_Transform::Size_MatType::(640x480, 32SC3)            0.579 0.278    2.08
Mat_Transform::Size_MatType::(640x480, 64FC3)            0.290 0.266    1.09
Mat_Transform::Size_MatType::(1280x720, 8SC3)            1.919 0.414    4.63
Mat_Transform::Size_MatType::(1280x720, 16SC3)           1.811 0.488    3.71
Mat_Transform::Size_MatType::(1280x720, 32SC3)           1.736 0.917    1.89
Mat_Transform::Size_MatType::(1280x720, 64FC3)           2.310 2.030    1.14
Mat_Transform::Size_MatType::(1920x1080, 8SC3)           4.339 0.924    4.70
Mat_Transform::Size_MatType::(1920x1080, 16SC3)          4.095 1.288    3.18
Mat_Transform::Size_MatType::(1920x1080, 32SC3)          4.267 3.191    1.34
Mat_Transform::Size_MatType::(1920x1080, 64FC3)          6.641 5.481    1.21
Mat_Transform_Diagonal::Size_MatType::(640x480, 8SC3)    0.415 0.104    3.98
Mat_Transform_Diagonal::Size_MatType::(640x480, 16SC3)   0.385 0.128    3.00
Mat_Transform_Diagonal::Size_MatType::(640x480, 32SC3)   0.389 0.225    1.72
Mat_Transform_Diagonal::Size_MatType::(640x480, 64FC3)   0.279 0.275    1.01
Mat_Transform_Diagonal::Size_MatType::(1280x720, 8SC3)   1.223 0.313    3.91
Mat_Transform_Diagonal::Size_MatType::(1280x720, 16SC3)  1.118 0.387    2.89
Mat_Transform_Diagonal::Size_MatType::(1280x720, 32SC3)  1.215 0.801    1.52
Mat_Transform_Diagonal::Size_MatType::(1280x720, 64FC3)  2.198 1.900    1.16
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 8SC3)  2.772 0.705    3.93
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 16SC3) 2.572 1.134    2.27
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 32SC3) 3.477 3.276    1.06
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 64FC3) 5.984 5.186    1.15
```

### A311D

```
Geometric mean (ms)

                      Name of Test                        base  patch    patch
                                                                           vs
                                                                          base
                                                                       (x-factor)
Mat_Transform::Size_MatType::(127x61, 8SC3)              0.143  0.035     4.05
Mat_Transform::Size_MatType::(127x61, 16SC3)             0.135  0.037     3.67
Mat_Transform::Size_MatType::(127x61, 32SC3)             0.110  0.062     1.77
Mat_Transform::Size_MatType::(127x61, 64FC3)             0.034  0.039     0.89
Mat_Transform::Size_MatType::(640x480, 8SC3)             5.673  1.395     4.07
Mat_Transform::Size_MatType::(640x480, 16SC3)            5.331  1.439     3.70
Mat_Transform::Size_MatType::(640x480, 32SC3)            4.329  2.472     1.75
Mat_Transform::Size_MatType::(640x480, 64FC3)            1.560  2.316     0.67
Mat_Transform::Size_MatType::(1280x720, 8SC3)            17.002 4.139     4.11
Mat_Transform::Size_MatType::(1280x720, 16SC3)           15.996 4.308     3.71
Mat_Transform::Size_MatType::(1280x720, 32SC3)           12.948 7.241     1.79
Mat_Transform::Size_MatType::(1280x720, 64FC3)           4.742  7.376     0.64
Mat_Transform::Size_MatType::(1920x1080, 8SC3)           38.253 9.384     4.08
Mat_Transform::Size_MatType::(1920x1080, 16SC3)          35.913 9.750     3.68
Mat_Transform::Size_MatType::(1920x1080, 32SC3)          29.145 16.528    1.76
Mat_Transform::Size_MatType::(1920x1080, 64FC3)          10.606 20.968    0.51
Mat_Transform_Diagonal::Size_MatType::(640x480, 8SC3)    4.439  1.086     4.09
Mat_Transform_Diagonal::Size_MatType::(640x480, 16SC3)   4.251  1.136     3.74
Mat_Transform_Diagonal::Size_MatType::(640x480, 32SC3)   3.786  1.999     1.89
Mat_Transform_Diagonal::Size_MatType::(640x480, 64FC3)   1.555  1.551     1.00
Mat_Transform_Diagonal::Size_MatType::(1280x720, 8SC3)   13.319 3.243     4.11
Mat_Transform_Diagonal::Size_MatType::(1280x720, 16SC3)  12.828 3.398     3.78
Mat_Transform_Diagonal::Size_MatType::(1280x720, 32SC3)  11.336 5.989     1.89
Mat_Transform_Diagonal::Size_MatType::(1280x720, 64FC3)  4.707  4.690     1.00
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 8SC3)  29.952 7.293     4.11
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 16SC3) 28.817 7.656     3.76
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 32SC3) 25.476 13.388    1.90
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 64FC3) 10.533 10.509    1.00
```

### M2

```
Geometric mean (ms)

                      Name of Test                       base  patch   patch
                                                                         vs
                                                                        base
                                                                     (x-factor)
Mat_Transform::Size_MatType::(127x61, 8SC3)              0.020 0.004    4.45
Mat_Transform::Size_MatType::(127x61, 16SC3)             0.016 0.004    4.48
Mat_Transform::Size_MatType::(127x61, 32SC3)             0.016 0.007    2.23
Mat_Transform::Size_MatType::(127x61, 64FC3)             0.007 0.006    1.20
Mat_Transform::Size_MatType::(640x480, 8SC3)             0.793 0.197    4.03
Mat_Transform::Size_MatType::(640x480, 16SC3)            0.626 0.154    4.08
Mat_Transform::Size_MatType::(640x480, 32SC3)            0.627 0.306    2.05
Mat_Transform::Size_MatType::(640x480, 64FC3)            0.273 0.253    1.08
Mat_Transform::Size_MatType::(1280x720, 8SC3)            2.350 0.540    4.35
Mat_Transform::Size_MatType::(1280x720, 16SC3)           1.875 0.415    4.52
Mat_Transform::Size_MatType::(1280x720, 32SC3)           1.893 0.844    2.24
Mat_Transform::Size_MatType::(1280x720, 64FC3)           0.830 0.808    1.03
Mat_Transform::Size_MatType::(1920x1080, 8SC3)           5.302 1.178    4.50
Mat_Transform::Size_MatType::(1920x1080, 16SC3)          4.475 0.946    4.73
Mat_Transform::Size_MatType::(1920x1080, 32SC3)          4.409 1.864    2.37
Mat_Transform::Size_MatType::(1920x1080, 64FC3)          1.853 1.512    1.23
Mat_Transform_Diagonal::Size_MatType::(640x480, 8SC3)    0.586 0.110    5.32
Mat_Transform_Diagonal::Size_MatType::(640x480, 16SC3)   0.518 0.110    4.69
Mat_Transform_Diagonal::Size_MatType::(640x480, 32SC3)   0.430 0.220    1.95
Mat_Transform_Diagonal::Size_MatType::(640x480, 64FC3)   0.228 0.178    1.28
Mat_Transform_Diagonal::Size_MatType::(1280x720, 8SC3)   1.768 0.336    5.26
Mat_Transform_Diagonal::Size_MatType::(1280x720, 16SC3)  1.514 0.335    4.52
Mat_Transform_Diagonal::Size_MatType::(1280x720, 32SC3)  1.292 0.670    1.93
Mat_Transform_Diagonal::Size_MatType::(1280x720, 64FC3)  0.681 0.579    1.18
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 8SC3)  3.998 0.747    5.35
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 16SC3) 3.392 0.757    4.48
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 32SC3) 2.956 1.491    1.98
Mat_Transform_Diagonal::Size_MatType::(1920x1080, 64FC3) 1.546 1.476    1.05
```


### 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.
- [ ] The feature is well documented and sample code can be built with the project CMake
2025-02-06 13:38:16 +03:00
Alexander Smorkalov 28deafcbd4 Merge pull request #26852 from MaximSmolskiy:fix_bug_with_int64_support_for_FileStorage_5x
Fix bug with int64 support for FileStorage
2025-02-05 10:15:36 +03:00
Alexander Smorkalov 55a2ca58f0 Merge branch 4.x 2025-02-05 09:28:27 +03:00
天音あめ 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).

https://github.com/opencv/opencv/blob/1d701d1690b8cc9aa6b86744bffd5d9841ac6fd3/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
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
https://github.com/opencv/opencv/blob/dfad11aae7ef3b3a0643379266bc363b1a9c3d40/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
MaximSmolskiy c99c7c3bfe Fix bug with int64 support for FileStorage 2025-01-28 02:06:58 +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 6f24d755f2 Merge pull request #26798 from brad0:opencv_powerpc_elf_aux_info
Add CMake checks for getauxval and elf_aux_info for POWER
2025-01-20 13:33:46 +03:00
Brad Smith 918196ec1b Add CMake checks for getauxval and elf_aux_info for POWER
- Change __unix__ check for feature detection. NetBSD does not
have either API.
- Adds support for OpenBSD/powerpc64.
2025-01-19 13:27:20 -05:00
Brad Smith 93023e1a68 OpenCL: OpenBSD build fix 2025-01-19 02:46:25 -05:00
Vincent Rabaud bfb54aa691 Remove useless C headers 2025-01-13 16:34:28 +01:00
Skreg f00814e38d Merge pull request #26602 from shyama7004:minor-fix
Improved dumpVector, cv::Rect operator<< and exceptions #26602

- Applied format for vector element formatting to ensure consistent and clear output representation.  
- Moved `operator<<` to the `cv` namespace to align with OpenCV's coding standards and improve maintainability.  
- Enhanced error handling by including detailed exception messages using `e.what()` for better debugging.  

### 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-01-10 15:02:18 +03:00
FantasqueX d229ac9c76 Merge pull request #26676 from FantasqueX:clean-up-sse-utils-1
Clean up sse_utils.hpp #26676

Remove unused functions in sse_utils.hpp. If they are still needed, I believe universal intrinsics should be more appropriate.

Related: https://github.com/opencv/opencv/issues/25002

### 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-10 14:35:42 +03:00
Maksim Shabunin 0756dbfe3d RISC-V: enabled intrinsics in dotProd, relaxed test thresholds 2024-12-24 00:58:54 +03:00
Pierre Chatelier d77abeddd0 Merge pull request #26472 from chacha21:gpumatnd_step
More convenient GpuMatND constructor #26472

Closes #26471

For convenience, GpuMatND can now accept a step.size() equal to size.size(), as long as the last step is equal to elemSize()

- [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-12-17 17:26:14 +03:00
Kumataro 260f511dfb Merge pull request #26590 from Kumataro:fix26589
Support C++20 standard #26590

Close https://github.com/opencv/opencv/issues/26589
Related https://github.com/opencv/opencv_contrib/pull/3842
Related: https://github.com/opencv/opencv/issues/20269

- do not arithmetic enums and ( different enums or floating numeric) 
- remove unused variable

### 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-12-17 07:40:27 +03:00
Vadim Pisarevsky 446787ab48 Merge pull request #26571 from vpisarev:fix_26497
Fixed issue when std::vector<T> is wrapped into Mat with explicit step. #26571

Hopefully, fixes #26497

- [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-12-05 09:03:51 +03:00
Maksim Shabunin c58b6bf11f Fixed several cases of unaligned pointer cast 2024-12-02 16:15:23 +03:00
Alexander Alekhin 7808d50412 Merge branch 4.x 2024-11-22 02:32:17 +00:00
Rostislav Vasilikhin 64d3111377 Merge pull request #26459 from savuor:rv/hal_absdiff_scalar
HAL added for absdiff(array, scalar) + related fixes #26459

### This PR changes
* HAL for `absdiff` when one of arguments is a scalar, including multichannel arrays and scalars
* several channels support for HAL `addScalar`
* proper data type check for `addScalar` when one of arguments is a scalar

### 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-11-19 10:35:49 +03:00
Alexander Smorkalov 77b45145d1 Merge pull request #26458 from asmorkalov:as/drop_c_core
Drop C API in core
2024-11-14 17:27:36 +03:00
Alexander Smorkalov 1ff16cb551 Backport some of C API removal in core module implementation. 2024-11-14 11:24:00 +03:00
Alexander Smorkalov 0310b081f9 Dropped C API in core module. 2024-11-14 08:33:22 +03:00
Alexander Smorkalov 3cc130db5d Merge branch 4.x 2024-11-13 09:02:39 +03:00
Rostislav Vasilikhin 67f07b16cb Merge pull request #25624 from savuor:rv/hal_addscalar
HAL added for add(array, scalar) #25624

### 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-11-13 08:33:19 +03:00
Alexander Smorkalov ff639d11d4 Merge pull request #26451 from savuor:rv/fix_get_handle
Build fix for opencl_core.cpp
2024-11-12 20:50:48 +03:00
Rostislav Vasilikhin 641f43dd48 build fix 2024-11-12 17:04:42 +01:00
Dmitry Kurtaev c230841105 Merge pull request #26446 from dkurt:file_storage_empty_and_1d_mat
* Change style of empty and 1d Mat in FileStorage

* Remove misleading 1d Mat test
2024-11-12 17:51:10 +03:00
Dmitry Kurtaev c7a21dc5bf Merge pull request #26444 from dkurt:fix_empty_mat_assert
Fix empty mat debug assertion #26444

### 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-11-11 22:54:57 +03:00
Dmitry Kurtaev 37c2af63f0 Merge pull request #26434 from dkurt:dk/int64_file_storage_4.x
int64 data type support for FileStorage. 1d and empty Mat with exact dimensions #26434

### Pull Request Readiness Checklist

Port of https://github.com/opencv/opencv/pull/26399 to 4.x branch

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-11-11 14:13:33 +03:00
Dmitry Kurtaev a7bb17b092 Merge pull request #26399 from dkurt:dk/file_storage_new_data
int64 data type in FileStorage #26399

### Pull Request Readiness Checklist

resolves #23333

Proposed approach is not perfect in terms of complexity and potential bugs. Instead of changing `INT` raw size from `4` to `8`, we check int64 value can be fitted to int32 or not.

Collections such as cv::Mat rely on data type symbol.

This PR is addressed to 5.x branch first to cover `CV_64S` Mat. Later, it can be backported to 4.x

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-11-08 08:27:59 +03:00