Commit Graph

35188 Commits

Author SHA1 Message Date
shyama7004
a47f0f00cb replace deprecated np.fromstring() by np.frombuffer() 2025-02-21 10:37:11 +05:30
Benjamin Knecht
364eedb87e Undo multi dict functionality of refineDetectedMarkers method 2025-02-20 15:37:44 +01:00
Dmitry Kurtaev
7a2b048c92
Merge pull request #26923 from dkurt:merge_rvv_opt
Further optimization of cv::merge RVV HAL for 8U and 16S #26923

### Pull Request Readiness Checklist


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

```
Geometric mean (ms)

                     Name of Test                       baseline   pr       pr
                                                         merge              vs    
                                                                         baseline
                                                                          merge
                                                                        (x-factor)
merge::Size_SrcDepth_DstChannels::(127x61, 8UC1, 2)      0.013   0.003     3.76   
merge::Size_SrcDepth_DstChannels::(127x61, 8UC1, 3)      0.020   0.006     3.46   
merge::Size_SrcDepth_DstChannels::(127x61, 8UC1, 4)      0.026   0.010     2.61   
merge::Size_SrcDepth_DstChannels::(127x61, 8UC1, 5)      0.043   0.028     1.56   
merge::Size_SrcDepth_DstChannels::(127x61, 8UC1, 6)      0.054   0.035     1.53   
merge::Size_SrcDepth_DstChannels::(127x61, 8UC1, 7)      0.065   0.050     1.30   
merge::Size_SrcDepth_DstChannels::(127x61, 8UC1, 8)      0.070   0.036     1.95   
merge::Size_SrcDepth_DstChannels::(127x61, 16SC1, 2)     0.015   0.008     1.82   
merge::Size_SrcDepth_DstChannels::(127x61, 16SC1, 3)     0.022   0.015     1.48   
merge::Size_SrcDepth_DstChannels::(127x61, 16SC1, 4)     0.029   0.018     1.63   
merge::Size_SrcDepth_DstChannels::(127x61, 16SC1, 5)     0.067   0.044     1.54   
merge::Size_SrcDepth_DstChannels::(127x61, 16SC1, 6)     0.088   0.056     1.58   
merge::Size_SrcDepth_DstChannels::(127x61, 16SC1, 7)     0.104   0.076     1.38   
merge::Size_SrcDepth_DstChannels::(127x61, 16SC1, 8)     0.116   0.065     1.79   
merge::Size_SrcDepth_DstChannels::(640x480, 8UC1, 2)     0.421   0.176     2.39   
merge::Size_SrcDepth_DstChannels::(640x480, 8UC1, 3)     0.792   0.284     2.79   
merge::Size_SrcDepth_DstChannels::(640x480, 8UC1, 4)     1.090   0.370     2.95   
merge::Size_SrcDepth_DstChannels::(640x480, 8UC1, 5)     1.835   1.399     1.31   
merge::Size_SrcDepth_DstChannels::(640x480, 8UC1, 6)     2.389   1.776     1.35   
merge::Size_SrcDepth_DstChannels::(640x480, 8UC1, 7)     3.000   2.471     1.21   
merge::Size_SrcDepth_DstChannels::(640x480, 8UC1, 8)     3.178   2.104     1.51   
merge::Size_SrcDepth_DstChannels::(640x480, 16SC1, 2)    0.490   0.377     1.30   
merge::Size_SrcDepth_DstChannels::(640x480, 16SC1, 3)    1.348   0.602     2.24   
merge::Size_SrcDepth_DstChannels::(640x480, 16SC1, 4)    1.827   0.813     2.25   
merge::Size_SrcDepth_DstChannels::(640x480, 16SC1, 5)    3.283   2.692     1.22   
merge::Size_SrcDepth_DstChannels::(640x480, 16SC1, 6)    4.922   3.334     1.48   
merge::Size_SrcDepth_DstChannels::(640x480, 16SC1, 7)    5.725   4.399     1.30   
merge::Size_SrcDepth_DstChannels::(640x480, 16SC1, 8)    6.278   4.748     1.32   
merge::Size_SrcDepth_DstChannels::(1280x720, 8UC1, 2)    1.267   0.603     2.10   
merge::Size_SrcDepth_DstChannels::(1280x720, 8UC1, 3)    2.394   0.934     2.56   
merge::Size_SrcDepth_DstChannels::(1280x720, 8UC1, 4)    3.236   1.434     2.26   
merge::Size_SrcDepth_DstChannels::(1280x720, 8UC1, 5)    5.398   4.345     1.24   
merge::Size_SrcDepth_DstChannels::(1280x720, 8UC1, 6)    7.127   5.459     1.31   
merge::Size_SrcDepth_DstChannels::(1280x720, 8UC1, 7)    8.590   7.298     1.18   
merge::Size_SrcDepth_DstChannels::(1280x720, 8UC1, 8)    9.360   6.152     1.52   
merge::Size_SrcDepth_DstChannels::(1280x720, 16SC1, 2)   1.482   1.242     1.19   
merge::Size_SrcDepth_DstChannels::(1280x720, 16SC1, 3)   4.008   1.817     2.21   
merge::Size_SrcDepth_DstChannels::(1280x720, 16SC1, 4)   6.079   2.468     2.46   
merge::Size_SrcDepth_DstChannels::(1280x720, 16SC1, 5)   11.300  8.644     1.31   
merge::Size_SrcDepth_DstChannels::(1280x720, 16SC1, 6)   15.125  12.126    1.25   
merge::Size_SrcDepth_DstChannels::(1280x720, 16SC1, 7)   17.555  14.804    1.19   
merge::Size_SrcDepth_DstChannels::(1280x720, 16SC1, 8)   18.890  14.163    1.33   
merge::Size_SrcDepth_DstChannels::(1920x1080, 8UC1, 2)   2.910   1.326     2.19   
merge::Size_SrcDepth_DstChannels::(1920x1080, 8UC1, 3)   5.351   1.997     2.68   
merge::Size_SrcDepth_DstChannels::(1920x1080, 8UC1, 4)   7.290   2.629     2.77   
merge::Size_SrcDepth_DstChannels::(1920x1080, 8UC1, 5)   12.426  9.611     1.29   
merge::Size_SrcDepth_DstChannels::(1920x1080, 8UC1, 6)   16.453  12.162    1.35   
merge::Size_SrcDepth_DstChannels::(1920x1080, 8UC1, 7)   19.420  16.190    1.20   
merge::Size_SrcDepth_DstChannels::(1920x1080, 8UC1, 8)   20.588  13.699    1.50   
merge::Size_SrcDepth_DstChannels::(1920x1080, 16SC1, 2)  3.400   2.640     1.29   
merge::Size_SrcDepth_DstChannels::(1920x1080, 16SC1, 3)  8.986   3.952     2.27   
merge::Size_SrcDepth_DstChannels::(1920x1080, 16SC1, 4)  11.972  5.273     2.27   
merge::Size_SrcDepth_DstChannels::(1920x1080, 16SC1, 5)  20.544  17.996    1.14   
merge::Size_SrcDepth_DstChannels::(1920x1080, 16SC1, 6)  28.677  22.086    1.30   
merge::Size_SrcDepth_DstChannels::(1920x1080, 16SC1, 7)  32.958  27.713    1.19   
merge::Size_SrcDepth_DstChannels::(1920x1080, 16SC1, 8)  36.499  27.439    1.33
```

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-20 17:28:28 +03:00
Benjamin Knecht
1f9d6aa6cf Fixed warning on Windows, clarified refineDetectedMarkers method 2025-02-20 15:12:56 +01:00
Alexander Smorkalov
58b14294b5
Merge pull request #26942 from vrabaud:png_leak
Bump openjp2 to v2.5.3
2025-02-20 12:56:54 +03:00
Vincent Rabaud
a6bfd87943 Bump openjp2 to v2.5.3
This should quiet some fuzzer bugs
2025-02-20 10:46:33 +03: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
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
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
Alexander Smorkalov
6092499907
Merge pull request #26932 from shyama7004:deprecationFix
replace tostring() with tobytes()
2025-02-18 13:22:04 +03:00
Alexander Smorkalov
b5c3b706de
Merge pull request #26933 from asmorkalov:as/drop_android_test
Removed Android test as it's broken for now
2025-02-18 13:21:31 +03: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
f570852d20 Removed Android test as it's broken for now. 2025-02-18 12:52:24 +03:00
shyama7004
c5ad6d7904 replace tostring() with tobytes 2025-02-18 12:25:01 +05:30
Alexander Smorkalov
21402668a1
Merge pull request #26927 from asmorkalov:as/squeeze_windows
Squeeze several Windows pipelines into one with jobs
2025-02-17 15:08:43 +03:00
Alexander Smorkalov
680fd4d975
Merge pull request #26911 from asmorkalov:as/openvx_hal_imgproc
Migrate remaning OpenVX integrations to OpenVX HAL (imgproc)
2025-02-17 13:57:17 +03:00
Alexander Smorkalov
9a3fb556c4
Merge pull request #26928 from shyama7004:doxFix
fix minor issues in calib3d Docs
2025-02-17 13:54:31 +03:00
Alexander Smorkalov
7ac939c53a Squeeze several Windows pipelines into one with jobs. 2025-02-17 13:51:48 +03:00
shyama7004
18c0368840 fix minor issues in calib3d Docs 2025-02-17 12:38:00 +05:30
Alexander Smorkalov
8065f10521
Merge pull request #26921 from shyama7004:sampsonDistance
Fix assertion in cv2.sampsonDistance
2025-02-17 09:25:30 +03:00
Alexander Smorkalov
acc9084044 Move OpenVX integrations to imgproc to OpenVX HAL
Covered functions:
- medianBlur
- Sobel
- Canny
- pyrDown
- BoxFilter
- equalizeHist
- GaussianBlur
- remap
- threshold
2025-02-15 09:55:37 +03:00
Skreg
a9cb451199
Fix assertion in cv2.sampsonDistance 2025-02-15 04:47:01 +00:00
Alexander Smorkalov
36a5176a5f
Merge pull request #26907 from asmorkalov:as/openvx_hal_features2d
Migrate remaning OpenVX integrations to OpenVX HAL (features2d)
2025-02-14 19:39:58 +03:00
Alexander Smorkalov
1de6e20463 Move OpenVX implementation for FAST to HAL. 2025-02-14 17:47:48 +03: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
a8df0a06ac
Merge pull request #26902 from Kababey:patch-3
Update optical_flow.cpp
2025-02-14 15:22:04 +03:00
Alexander Smorkalov
b44b30b730
Merge pull request #26898 from mshabunin:fix-riscv-toolchain
RISC-V: error message in the toolchain file when compiler is not found
2025-02-14 13:24:25 +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
e4b23cf96a
Merge pull request #26920 from ConnorBaker:fix/cmake-matches-uses-regex
cmake/OpenCVDetectCUDAUtils.cmake: use IN_LIST to avoid regex matching valid capabilities
2025-02-14 11:54:05 +03:00
Connor Baker
5200419ba5 cmake/OpenCVDetectCUDAUtils.cmake: use IN_LIST to avoid regex matching valid capabilities 2025-02-13 23:47:00 +00:00
Alexander Smorkalov
def8619648
Merge pull request #26917 from asmorkalov:as/static_fastcv
Switch to static instance of FastCV
2025-02-13 21:26:42 +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
5921aae2b3 Switch to static instance of FastCV on Linux. 2025-02-13 15:58:25 +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
lve-gh
d8c2f0bcdf
Merge pull request #26884 from lve-gh:split8u_rvv_hal
[HAL] split8u RVV 1.0 #26884

### Pull Request Readiness Checklist
* Banana Pi BF3 (SpacemiT K1)
* Compiler: Syntacore Clang 18.1.4 (build 2024.12)
```
Geometric mean (ms)

                  Name of Test                   baseline  hal      hal
                                                    ui               vs
                                                                  baseline 
                                                                     ui
                                                                 (x-factor)
split::Size_Depth_Channels::(127x61, 8UC1, 2)     0.012   0.004     3.12   
split::Size_Depth_Channels::(127x61, 8UC1, 3)     0.019   0.006     2.91   
split::Size_Depth_Channels::(127x61, 8UC1, 4)     0.028   0.011     2.64   
split::Size_Depth_Channels::(127x61, 8UC1, 5)     0.067   0.033     2.02   
split::Size_Depth_Channels::(127x61, 8UC1, 6)     0.084   0.040     2.11   
split::Size_Depth_Channels::(127x61, 8UC1, 7)     0.103   0.055     1.88   
split::Size_Depth_Channels::(127x61, 8UC1, 8)     0.113   0.032     3.50   
split::Size_Depth_Channels::(640x480, 8UC1, 2)    0.454   0.179     2.54   
split::Size_Depth_Channels::(640x480, 8UC1, 3)    0.677   0.298     2.27   
split::Size_Depth_Channels::(640x480, 8UC1, 4)    0.901   0.410     2.20   
split::Size_Depth_Channels::(640x480, 8UC1, 5)    3.781   3.010     1.26   
split::Size_Depth_Channels::(640x480, 8UC1, 6)    4.886   4.009     1.22   
split::Size_Depth_Channels::(640x480, 8UC1, 7)    5.777   4.770     1.21   
split::Size_Depth_Channels::(640x480, 8UC1, 8)    4.596   1.330     3.46   
split::Size_Depth_Channels::(1280x720, 8UC1, 2)   1.377   0.709     1.94   
split::Size_Depth_Channels::(1280x720, 8UC1, 3)   2.091   1.034     2.02   
split::Size_Depth_Channels::(1280x720, 8UC1, 4)   2.744   1.573     1.74   
split::Size_Depth_Channels::(1280x720, 8UC1, 5)   9.542   6.284     1.52   
split::Size_Depth_Channels::(1280x720, 8UC1, 6)   11.114  7.850     1.42   
split::Size_Depth_Channels::(1280x720, 8UC1, 7)   14.083  11.879    1.19   
split::Size_Depth_Channels::(1280x720, 8UC1, 8)   13.524  3.865     3.50   
split::Size_Depth_Channels::(1920x1080, 8UC1, 2)  3.108   1.395     2.23   
split::Size_Depth_Channels::(1920x1080, 8UC1, 3)  4.659   2.128     2.19   
split::Size_Depth_Channels::(1920x1080, 8UC1, 4)  6.127   2.818     2.17   
split::Size_Depth_Channels::(1920x1080, 8UC1, 5)  26.733  16.625    1.61   
split::Size_Depth_Channels::(1920x1080, 8UC1, 6)  31.242  22.414    1.39   
split::Size_Depth_Channels::(1920x1080, 8UC1, 7)  35.968  27.658    1.30   
split::Size_Depth_Channels::(1920x1080, 8UC1, 8)  29.997  8.655     3.47
```
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-11 17:57:05 +03:00
Kababey
2364f4b0b9
Update optical_flow.cpp
ref: push_back is changed to emplace_back in order to avoid unnecessary conversions [Scalar(r, g, b))] .
2025-02-11 13:30:48 +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
Maksim Shabunin
284660fb6c RISC-V: error message in the toolchain file when compiler is not found 2025-02-10 18:47:26 +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
Alexander Smorkalov
ce51023ad4
Merge pull request #26894 from Kumataro:fix26893
imgcodecs: tiff: refactor Imgcodecs_Tiff_decode_Huge test
2025-02-10 10:46:31 +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