opencv/modules
GenshinImpactStarts e30697fd42
Merge pull request #27002 from GenshinImpactStarts:magnitude
[HAL RVV] impl magnitude | add perf test #27002

Implement through the existing `cv_hal_magnitude32f` and `cv_hal_magnitude64f` interfaces.

**UPDATE**: UI is enabled. The only difference between UI and HAL now is HAL use a approximate `sqrt`.

Perf test done on MUSE-PI.

```sh
$ opencv_test_core --gtest_filter="*Magnitude*"
$ opencv_perf_core --gtest_filter="*Magnitude*" --perf_min_samples=300 --perf_force_samples=300
```

Test result between enabled UI and HAL:
```
                 Name of Test                     ui    rvv      rvv    
                                                                  vs    
                                                                  ui    
                                                              (x-factor)
Magnitude::MagnitudeFixture::(127x61, 32FC1)    0.029  0.016     1.75   
Magnitude::MagnitudeFixture::(127x61, 64FC1)    0.057  0.036     1.57   
Magnitude::MagnitudeFixture::(640x480, 32FC1)   1.063  0.648     1.64   
Magnitude::MagnitudeFixture::(640x480, 64FC1)   2.261  1.530     1.48   
Magnitude::MagnitudeFixture::(1280x720, 32FC1)  3.261  2.118     1.54   
Magnitude::MagnitudeFixture::(1280x720, 64FC1)  6.802  4.682     1.45   
Magnitude::MagnitudeFixture::(1920x1080, 32FC1) 7.287  4.738     1.54   
Magnitude::MagnitudeFixture::(1920x1080, 64FC1) 15.226 10.334    1.47   
```

Test result before and after enabling UI:
```
                 Name of Test                    orig    pr       pr    
                                                                  vs    
                                                                 orig   
                                                              (x-factor)
Magnitude::MagnitudeFixture::(127x61, 32FC1)    0.032  0.029     1.11   
Magnitude::MagnitudeFixture::(127x61, 64FC1)    0.067  0.057     1.17   
Magnitude::MagnitudeFixture::(640x480, 32FC1)   1.228  1.063     1.16   
Magnitude::MagnitudeFixture::(640x480, 64FC1)   2.786  2.261     1.23   
Magnitude::MagnitudeFixture::(1280x720, 32FC1)  3.762  3.261     1.15   
Magnitude::MagnitudeFixture::(1280x720, 64FC1)  8.549  6.802     1.26   
Magnitude::MagnitudeFixture::(1920x1080, 32FC1) 8.408  7.287     1.15   
Magnitude::MagnitudeFixture::(1920x1080, 64FC1) 18.884 15.226    1.24   
```

### 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-13 08:34:11 +03:00
..
calib3d Merge pull request #27001 from DanBmh/opt_newoptcm 2025-03-11 12:47:35 +03:00
core Merge pull request #27002 from GenshinImpactStarts:magnitude 2025-03-13 08:34:11 +03:00
dnn Fixed Android build with Vulkan support. 2025-01-13 21:13:22 +03:00
features2d Move OpenVX implementation for FAST to HAL. 2025-02-14 17:47:48 +03:00
flann flann: remove unused hdf5 header 2024-11-14 19:44:10 +03:00
gapi Workaround for successfull append of OpenVINO Execution Provider: Moved creation of 'Ort::Env' before it 2025-02-26 16:55:48 +00:00
highgui Backported some C API cleanup from 5.x to 4.x to reduce conflicts in 4.x->5.x merge. 2025-02-26 17:11:31 +03:00
imgcodecs Merge pull request #27040 from vrabaud:png_leak 2025-03-12 21:06:01 +03:00
imgproc Merge pull request #26834 from chacha21:findContours_speedup 2025-03-12 18:00:01 +03:00
java Merge pull request #26875 from asmorkalov:as/in_memory_models 2025-02-14 15:35:38 +03:00
js Merge pull request #26147 from vrabaud:opencv_js 2024-12-19 17:35:16 +03:00
ml replace tostring() with tobytes 2025-02-18 12:25:01 +05:30
objc Merge pull request #26713 from homuler:fix/build-ios-framework 2025-01-10 14:48:56 +03:00
objdetect Merge pull request #26968 from MaximSmolskiy:fix-Aruco-marker-incorrect-detection-near-image-edge 2025-03-12 09:47:49 +03:00
photo Local decolor pipeline optimization. 2025-03-11 10:16:01 +03:00
python Merge pull request #26934 from BenjaminKnecht/new_4.x 2025-03-11 14:37:00 +03:00
stitching Merge pull request #26754 from s-trinh:add_bibtex_direct_pdf_links 2025-01-27 10:28:38 +03:00
ts fix: qnx7.0 build 2025-02-27 14:24:18 +08:00
video Merge pull request #26875 from asmorkalov:as/in_memory_models 2025-02-14 15:35:38 +03:00
videoio Merge pull request #26992 from Anshuprem:4.x 2025-03-01 14:54:26 +03:00
world cmake: use /INCREMENTAL:NO with MSVS 2015 2023-12-07 19:46:27 +00:00