Commit Graph

5509 Commits

Author SHA1 Message Date
HAN Liutong
b5ea32158a
Merge pull request #25883 from hanliutong:rvv-intrin-upgrade
Upgrade RISC-V Vector intrinsic and cleanup the obsolete RVV backend. #25883

This patch upgrade RISC-V Vector intrinsic from `v0.10` to `v0.12`/`v1.0`:
- Update cmake check and options;
- Upgrade RVV implement for Universal Intrinsic;
- Upgrade RVV optimized DNN kernel.
- Cleanup the obsolete RVV backend (`intrin_rvv.hpp`) and compatable header file.

With this patch, RVV backend require Clang 17+ or GCC 14+ (which means `__riscv_v_intrinsic >= 12000`, see https://godbolt.org/z/es7ncETE3)

This patch is test with Clang 17.0.6 (require extra `-DWITH_PNG=OFF` due to ICE), Clang 18.1.8 and GCC 14.1.0 on QEMU and k230 (with `--gtest_filter="*hal_*"`).

### 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-07-19 11:41:42 +03:00
Richard Barnes
d1505693dd throw() -> noexcept 2024-07-16 06:36:52 -07:00
Alexander Smorkalov
7b176d898b
Merge pull request #25912 from asmorkalov:as/round_pair_f64_restore
Restored removed test_round_pair_f64 test after PR 24941
2024-07-15 20:30:49 +03:00
Alexander Smorkalov
9ebf387850
Merge pull request #25911 from asmorkalov:as/HAL_fast_GaussianBlur
Post-merge fixes for algorithm hint API
2024-07-15 20:30:24 +03:00
Yoshiki Obinata
4842043c6a
Merge pull request #25822 from mqcmd196:gtk3-gl-support
Support OpenGL GTK3 New API #25822

Fixes #20001

GSoC2024 Project

### 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-07-15 17:06:30 +03:00
Alexander Smorkalov
a6b8ea892b Post-merge fixes for algorithm hint API. 2024-07-15 14:44:03 +03:00
Alexander Smorkalov
04f9e3cd4f Restored removed test_round_pair_f64 test afetr PR 24941. 2024-07-15 12:59:12 +03:00
Kumataro
e906f0f3b3 core: hal: disable _tzcnt_u32 for ARM64EC 2024-07-13 11:16:45 +09:00
Alexander Smorkalov
15783d6598
Merge pull request #25792 from asmorkalov:as/HAL_fast_GaussianBlur
Added flag to GaussianBlur for faster but not bit-exact implementation #25792

Rationale:
Current implementation of GaussianBlur is almost always bit-exact. It helps to get predictable results according platforms, but prohibits most of approximations and optimization tricks.

The patch converts `borderType` parameter to more generic `flags` and introduces `GAUSS_ALLOW_APPROXIMATIONS` flag to allow not bit-exact implementation. With the flag IPP and generic HAL implementation are called first. The flag naming and location is a subject for discussion.

Replaces https://github.com/opencv/opencv/pull/22073
Possibly related issue: https://github.com/opencv/opencv/issues/24135

### 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
2024-07-12 15:03:33 +03:00
Vincent Rabaud
3ff97c5580
Merge pull request #25899 from vrabaud:move_no_except
Mark cv::Mat(Mat&&) as noexcept #25899

This fixes https://github.com/opencv/opencv/issues/25065

### 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-07-12 14:41:17 +03:00
fengyuentau
11fde3bb89 fix 2024-07-10 14:48:45 +08:00
Yuantao Feng
d30b9450c1
Merge pull request #25872 from fengyuentau:core/v_erf
core: add v_erf #25872

This patch adds v_erf, which is needed by https://github.com/opencv/opencv/pull/25147.

### 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-07-05 15:46:01 +03:00
Yuantao Feng
5510718381
Merge pull request #25810 from fengyuentau:python/fix_parsing_3d_mat_in_dnn
python: attempts to fix 3d mat parsing problem for dnn #25810

Fixes https://github.com/opencv/opencv/issues/25762 https://github.com/opencv/opencv/issues/23242
Relates https://github.com/opencv/opencv/issues/25763 https://github.com/opencv/opencv/issues/19091

Although `cv.Mat` has already been introduced to workaround this problem, people do not know it and it kind of leads to confusion with `numpy.array`. This patch adds a "switch" to turn off the auto multichannel feature when the API is from cv::dnn::Net (more specifically, `setInput`) and the parameter is of type `Mat`. This patch only leads to changes of three places in `pyopencv_generated_types_content.h`:

```.diff
static PyObject* pyopencv_cv_dnn_dnn_Net_setInput(PyObject* self, PyObject* py_args, PyObject* kw)
{
...
- pyopencv_to_safe(pyobj_blob, blob, ArgInfo("blob", 0)) &&
+ pyopencv_to_safe(pyobj_blob, blob, ArgInfo("blob", 8)) &&
...
}

// I guess we also need to change this as one-channel blob is expected for param
static PyObject* pyopencv_cv_dnn_dnn_Net_setParam(PyObject* self, PyObject* py_args, PyObject* kw)
{
...
- pyopencv_to_safe(pyobj_blob, blob, ArgInfo("blob", 0)) )
+ pyopencv_to_safe(pyobj_blob, blob, ArgInfo("blob", 8)) )
...
- pyopencv_to_safe(pyobj_blob, blob, ArgInfo("blob", 0)) )
+ pyopencv_to_safe(pyobj_blob, blob, ArgInfo("blob", 8)) )
...
}
```

Others are unchanged, e.g. `dnn_SegmentationModel` and stuff like that.

### 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-07-04 08:33:20 +03:00
Wanli
bef6c110a4
Merge pull request #25781 from WanliZhong:v_log
Add support for v_log (Natural Logarithm) #25781

This PR aims to implement `v_log(v_float16 x)`, `v_log(v_float32 x)` and `v_log(v_float64 x)`. 
Merged after https://github.com/opencv/opencv/pull/24941

TODO:
- [x] double and half float precision
- [x] tests for them
- [x] doc to explain the implementation

### 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-07-03 10:59:44 +03:00
Wanli
6e1864e3fc
Merge pull request #24941 from WanliZhong:v_exp
Add support for v_exp (exponential) #24941

This PR aims to implement `v_exp(v_float16 x)`, `v_exp(v_float32 x)` and `v_exp(v_float64 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.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-07-02 12:32:49 +03:00
Alexander Smorkalov
445022682e
Merge pull request #25789 from asmorkalov:as/HAL_meanStdDev_tails
Fill mean and stdDev tails with zeros for HAL branch in meanStdDev #25789

as it's done for other branches.

### 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-06-27 19:11:05 +03:00
Simon Kämpe
7ef42d7706
Merge pull request #25751 from simonkampe:fix-eigen-rowmajor
Add missing cv2eigen overload #25751

Fixes #16606

Add overloads to cv2eigen to handle eigen matrices of type
Eigen::Matrix<Tp_, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>

### 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-06-20 20:05:06 +03:00
Alexander Smorkalov
a102b24285 Added LUT for FP16 and accuracy test. 2024-06-19 16:16:11 +03:00
Maksim Shabunin
ef3303716e test: use cv::theRNG instead of own generator 2024-06-07 13:36:11 +03:00
Alexander Alekhin
337c183b9d Merge tag '4.10.0' 2024-06-02 18:24:06 +00:00
Alexander Smorkalov
71d3237a09 Release 4.10.0 2024-06-02 14:41:07 +03:00
Rostislav Vasilikhin
a7e53aa184
Merge pull request #25671 from savuor:rv/arithm_extend_tests
Tests added for mixed type arithmetic operations #25671

### Changes
* added accuracy tests for mixed type arithmetic operations
    _Note: div-by-zero values are removed from checking since the result is implementation-defined in common case_
* added perf tests for the same cases
* fixed a typo in `getMulExtTab()` function that lead to dead code

### 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-06-02 14:28:06 +03:00
Kumataro
1bd5ca1ebe
Merge pull request #25686 from Kumataro:fix25674
Suppress build warnings for GCC14 #25686

Close #25674

### 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-06-02 14:14:04 +03:00
Alexander Smorkalov
9ed1d6730f Fixed offset computation for ND case in MinMaxIdx HAL. 2024-05-31 10:09:34 +03:00
Alexander Smorkalov
1668203a1c Added branch with variadic version of Trust tuple 2024-05-28 11:31:13 +03:00
Rostislav Vasilikhin
b267f1791c
Merge pull request #25633 from savuor:rv/rotate_tests
Tests for cv::rotate() added #25633

fixes #25449

### 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-05-25 11:23:31 +03:00
Christine Poerschke
8b2783e9ff replace lena.jpg in find-existing-file tests 2024-05-25 08:53:33 +01:00
Alexander Smorkalov
f85014534f Fixed width and height order in HAL call for LUT. 2024-05-23 10:30:33 +03:00
lackhole
28d029c158 Replace non-ascii character 2024-05-22 20:01:54 +09:00
Alexander Smorkalov
8393885a39
Merge pull request #25615 from asmorkalov:update_version_4.10.0-pre
pre: OpenCV 4.10.0 (version++)
2024-05-21 16:58:41 +03:00
Yuantao Feng
49f80cb3c4
Merge pull request #24804 from fengyuentau:fix_lapack_warnings
core: try to solve warnings caused by Apple's new LAPACK interface #24804

Resolves https://github.com/opencv/opencv/issues/24660

Apple's BLAS documentation: https://developer.apple.com/documentation/accelerate/blas?language=objc

New interface since macOS >= 13.3, iOS >= 16.4.

Todo:

- [x] Detect macOS version.
- [x] ~Detect iOS versions (major and minor version).~ No calling of Accelerate New LAPACK on iOS.
- [x] Solve calling `cblas_cgemm` and `cblas_zgemm`.

### 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-05-21 16:58:16 +03:00
HAN Liutong
e52540162f
Merge pull request #25586 from hanliutong:rvv-64f
Fix v_round and enable unit tests for scalable universal intrinsic 64F type. #25586

This may be a legacy issue from the previous PR #24325. I don't quite remember why the float 64 part of the unit test was not enabled at that time.

Whatever, this patch enables the unit tests for scalable 64F type , and makes the necessary modifications to the RVV backend to make the tests pass.

This patch is compiled by GCC 14 and LLVM 17 &18, and tested on QEMU and k230.

### 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-05-21 14:10:19 +03:00
Alexander Smorkalov
0b39a51be8 pre: OpenCV 4.10.0 (version++). 2024-05-21 11:37:05 +03:00
Rostislav Vasilikhin
d95ff3ac04 HAL for sub8x32f added 2024-05-20 10:48:56 +03:00
Rostislav Vasilikhin
69af621ef6
Merge pull request #25506 from savuor:rv/hal_mul16
HAL mul8x8to16 added #25506

Fixes #25034

### 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-05-20 10:43:18 +03:00
Maksim Shabunin
6350bfbf79
Merge pull request #25564 from mshabunin:cleanup-imgproc-2
imgproc: C-API cleanup, drawContours refactor #25564

Changes:
* moved several macros from types_c.h to cvdef.h (assuming we will continue using them)
* removed some cases of C-API usage in _imgproc_ module (`CV_TERMCRIT_*` and `CV_CMP_*`)
* refactored `drawContours` to use C++ API instead of calling `cvDrawContours` + test for filled contours with holes (case with non-filled contours is simpler and is covered in some other tests)

#### Note:
There is one case where old drawContours behavior doesn't match the new one - when `contourIdx == -1` (means "draw all contours") and `maxLevel == 0` (means draw only selected contours, but not what is inside).

From the docs:
> **contourIdx**	Parameter indicating a contour to draw. If it is negative, all the contours are drawn.

> **maxLevel**	Maximal level for drawn contours. If it is 0, only the specified contour is drawn. If it is 1, the function draws the contour(s) and all the nested contours. If it is 2, the function draws the contours, all the nested contours, all the nested-to-nested contours, and so on. This parameter is only taken into account when there is hierarchy available.


Old behavior - only one first contour is drawn:
![actual_screenshot_08 05 2024](https://github.com/opencv/opencv/assets/3304494/d0ae1d64-ddad-46bb-8acc-6f696874f71b)
a
New behavior (also expected by the test) - all contours are drawn:
![expected_screenshot_08 05 2024](https://github.com/opencv/opencv/assets/3304494/57ccd980-9dde-4006-90ee-19d6ce76912a)
2024-05-17 15:01:05 +03:00
Alexander Smorkalov
0044047782
Merge pull request #25598 from asmorkalov:as/tables_range_check_core
Check range for type-dependant function tables #25598

Address https://github.com/opencv/opencv/issues/24703

### 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-05-17 10:48:40 +03:00
Alexander Smorkalov
1f1ba7e402
Merge pull request #25563 from asmorkalov:as/HAL_min_max_idx
Transform offset to indeces for MatND in minMaxIdx HAL #25563

Address comments in https://github.com/opencv/opencv/pull/25553

### 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-05-08 18:57:02 +03:00
Rostislav Vasilikhin
5bd64e09a3
Merge pull request #25554 from savuor:rv/hal_lut
Merge pull request #25554 from savuor:rv/hal_lut

HAL for LUT added #25554

### 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-05-08 17:45:08 +03:00
Alexander Smorkalov
faa259ab34
Merge pull request #25553 from asmorkalov:as/HAL_min_max_idx
Fix HAL interface for hal_ni_minMaxIdx #25553

Fixes https://github.com/opencv/opencv/issues/25540

The original implementation call HAL with the same parameters independently from amount of channels. The patch uses HAL correctly for the case cn > 1.

### 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-05-07 20:46:17 +03:00
Alexander Smorkalov
b94cb5bc68 HAL interface for meanStdDev. 2024-05-03 16:36:43 +03:00
Rostislav Vasilikhin
12e2cc9502
Merge pull request #25491 from savuor:rv/hal_norm_hamming
HAL for Hamming norm added #25491

fixes #25474

### 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-04-27 14:38:44 +03:00
Rostislav Vasilikhin
357b9abaef
Merge pull request #25450 from savuor:rv/svd_perf
Perf tests for SVD and solve() created #25450

fixes #25336

### 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-04-27 14:33:13 +03:00
Vincent Rabaud
8f7e55a60b Replace static numpy allocator by function containing static.
That enables the numpy code to be its own library, in case
some users want to (e.g. CLIF library).
2024-04-26 14:38:18 +02:00
Alexander Smorkalov
5da17a4b03
Merge pull request #25454 from fengyuentau:fix_core_gemm_acc
core: fix `Core_GEMM.accuracy` failure on recent macOS
2024-04-19 11:36:31 +03:00
fengyuentau
4ef5986d4d remove manual unrolling that causes problem 2024-04-19 14:24:26 +08:00
Vadim Levin
caa09aca36 feat: use numeric dtype for MatLike instead of generic 2024-04-12 15:10:59 +03:00
Yuantao Feng
197626a5bf
Merge pull request #25387 from fengyuentau:complete-float16_t-renaming
Rename remaining float16_t for future proof #25387

Resolves comment: https://github.com/opencv/opencv/pull/25217#discussion_r1547733187.

`std::float16_t` and `std::bfloat16_t` are introduced since c++23: https://en.cppreference.com/w/cpp/types/floating-point.

### 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-04-11 14:02:44 +03:00
Kumataro
d22d0bd49c core: persistence: use hfloat instead of float16_t 2024-04-11 05:18:25 +09:00
Alexander Smorkalov
9813ea2b7a
Merge pull request #25306 from utibenkei:fix_build_of_dynamic_framework_for_visionos
fix build of dynamic framework for visionos
2024-04-10 16:50:38 +03:00
Kumataro
b14ea19466
Merge pull request #25351 from Kumataro:fix25073_format_g
core: persistence: output reals as human-friendly expression. #25351

Close #25073
Related https://github.com/opencv/opencv/pull/25087

This patch is need to merge same time with https://github.com/opencv/opencv_contrib/pull/3714

### 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-04-10 15:17:15 +03:00
Alexander Smorkalov
e5d530abae
Merge pull request #25342 from asmorkalov:as/HAL_transpose
HAL interface for transpose2d.
2024-04-09 09:03:13 +03:00
Kumataro
8ed52cb564
Merge pull request #25356 from Kumataro:fix25345
core: doc: add note for countNonZero, hasNonZero and findNonZero #25356

Close #25345 

### 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-04-08 18:47:58 +03:00
Alexander Smorkalov
e1ed422bdb HALL interface for transpose2d. 2024-04-05 14:12:36 +03:00
utibenkei
fdc7cb6dc1 fix build of dynamic framework for visionos 2024-04-01 22:19:47 +09:00
Alexander Smorkalov
9f123f8d74
Merge pull request #25285 from johnteslade:cgroupsv2-support
core: Add cgroupsv2 support to parallel.cpp
2024-03-30 11:26:23 +03:00
Alexander Smorkalov
7945f2cf40 Fixed HAL invocation for DCT. 2024-03-29 11:01:42 +03:00
John Slade
7f1140b48b core: Add cgroupsv2 support to parallel.cpp
The parallel code works out how many CPUs are on the system by checking
the quota it has been assigned in the Linux cgroup. The existing code
works under cgroups v1 but the file structure changed in cgroups v2.
From [1]:

    "cpu.cfs_quota_us" and "cpu.cfs_period_us" are replaced by "cpu.max"
  which contains both quota and period.

This commit add support to parallel so it will read from the cgroups v2
location. v1 support is still retained.

Resolves #25284

[1] 0d5936344f
2024-03-28 11:52:47 +00:00
Pierre Chatelier
1a537ab98f
Merge pull request #24893 from chacha21:cart_polar_inplace
Added in-place support for cartToPolar and polarToCart #24893

- a fused hal::cartToPolar[32|64]f() is used instead of sequential hal::magnitude[32|64]f/hal::fastAtan[32|64]f
- ipp_polarToCart is skipped for in-place processing (it seems not to support it correctly)

relates to #24891
### 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-03-26 15:38:17 +03:00
Yusuke Kameda
6e9dcb87c1
Merge pull request #25237 from YusukeKameda:4.x
doc: add note on handling of spaces in CommandLineParser #25237

### 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
Added note that this class will not work properly if tabs and other whitespace characters are included in the key.
The support of whitespace characters by istringstream, etc. is on hold because the future of this class is not clear compared to implementations in Python and other languages.
2024-03-26 14:20:17 +03:00
Yuantao Feng
3afe8ddaf8
core: Rename cv::float16_t to cv::hfloat (#25217)
* rename cv::float16_t to cv::fp16_t

* add typedef fp16_t float16_t

* remove zero(), bits() from fp16_t class

* fp16_t -> hfloat

* remove cv::float16_t::fromBits; add hfloatFromBits

* undo changes in conv_winograd_f63.simd.hpp and conv_block.simd.hpp

* undo some changes in dnn
2024-03-21 23:44:19 +03:00
Alexander Alekhin
625eebad54 Merge pull request #25203 from mshabunin:fix-scalable-intrin-test 2024-03-14 09:37:13 +00:00
Maksim Shabunin
6fc926ea4d Updated RVV intrinsics and test to remove initializer_list 2024-03-13 21:16:58 +03:00
Maksim Shabunin
01a4abb2c2 RISC-V: fixed comparison of float32 vectors 2024-03-12 22:05:38 +03:00
Maksim Shabunin
bf06e3d09f
Merge pull request #25042 from mshabunin:doc-upgrade
Documentation transition to fresh Doxygen #25042

* current Doxygen version is 1.10, but we will use 1.9.8 for now due to issue with snippets (https://github.com/doxygen/doxygen/pull/10584)
* Doxyfile adapted to new version
* MathJax updated to 3.x
* `@relates` instructions removed temporarily due to issue in Doxygen (to avoid warnings)
* refactored matx.hpp - extracted matx.inl.hpp
* opencv_contrib - https://github.com/opencv/opencv_contrib/pull/3638
2024-03-05 16:19:45 +03:00
Alexander Smorkalov
daa8f7dfc6 Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
Alexander Smorkalov
2d0f928934
Merge pull request #24724 from tomoaki0705:carotene_warnings
build: suppress warning ARM64 + Visual Studio build
2024-03-04 09:55:13 +03:00
Tomoaki Teshima
52e280e94b suppress warning ARM64 + Visual Studio build
* follow the message
2024-03-02 19:08:20 +09:00
Alexander Smorkalov
a2e23fa988
Merge pull request #25059 from opencv-pushbot:gitee/alalek/core_fix_float16
core: fix float16_t optimization condition
2024-02-24 13:28:05 +03:00
Alexander Alekhin
02504e2bdb core: fix float16_t optimization condition
- resolves issue on Windows ARM64
2024-02-21 08:11:32 +00:00
Vincent Rabaud
f8aa2896a1
Merge pull request #25024 from vrabaud:neon
Replace legacy __ARM_NEON__ by __ARM_NEON #25024

Even ACLE 1.1 referes to __ARM_NEON
https://developer.arm.com/documentation/ihi0053/b/?lang=en

### 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-02-20 11:29:23 +03:00
Adrian Kretz
3473b8a653 Generate invertible covariance matrix 2024-02-18 20:09:53 +01:00
ryanking13
422d519703 Enable file system on Emscripten 2024-01-31 11:28:59 -08:00
Alexander Smorkalov
73acf08844
Merge pull request #24919 from asmorkalov:as/python_Rect2f_Point3i
Add python bindings for Rect2f and Point3i
2024-01-29 17:36:30 +03:00
Alexander Smorkalov
54b7cafd2a
Merge pull request #24936 from mshabunin:fix-rvv07-scale64f
RISC-V: fix scale64f performance for RVV 0.7
2024-01-29 17:32:51 +03:00
Maksim Shabunin
65784dddeb RISC-V: fix scale64f for RVV 0.7 2024-01-29 01:24:44 +03:00
Maksim Shabunin
2ea2483bec RISC-V: fix mul 8/16 bit for RVV 0.7 2024-01-27 22:41:26 +03:00
Yuantao Feng
37156a4719
Merge pull request #24925 from fengyuentau:loongarch_handle_warnings
Handle warnings in loongson-related code #24925

See https://github.com/fengyuentau/opencv/actions/runs/7665377694/job/20891162958#step:14:16

Warnings needs to be handled before we add the loongson server to our CI.

### 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-01-26 13:38:00 +03:00
Alexander Alekhin
40533dbf69
Merge pull request #24918 from opencv-pushbot:gitee/alalek/core_convertfp16_replacement
core(OpenCL): optimize convertTo() with CV_16F (convertFp16() replacement) #24918

relates #24909
relates #24917
relates #24892

Performance changes:

- [x] 12700K (1 thread) + Intel iGPU

|Name of Test|noOCL|convertFp16|convertTo BASE|convertTo PATCH|
|---|:-:|:-:|:-:|:-:|
|ConvertFP16FP32MatMat::OCL_Core|3.130|3.152|3.127|3.136|
|ConvertFP16FP32MatUMat::OCL_Core|3.030|3.996|3.007|2.671|
|ConvertFP16FP32UMatMat::OCL_Core|3.010|3.101|3.056|2.854|
|ConvertFP16FP32UMatUMat::OCL_Core|3.016|3.298|2.072|2.061|
|ConvertFP32FP16MatMat::OCL_Core|2.697|2.652|2.723|2.721|
|ConvertFP32FP16MatUMat::OCL_Core|2.752|4.268|2.662|2.947|
|ConvertFP32FP16UMatMat::OCL_Core|2.706|2.601|2.603|2.528|
|ConvertFP32FP16UMatUMat::OCL_Core|2.704|3.215|1.999|1.988|

Patched version is not worse than convertFp16 and convertTo baseline (except MatUMat 32->16, baseline uses CPU code+dst buffer map).
There are still gaps against noOpenCL(CPU only) mode due to T-API implementation issues (unnecessary synchronization).


- [x] 12700K + AMD dGPU

|Name of Test|noOCL|convertFp16 dGPU|convertTo BASE dGPU|convertTo PATCH dGPU|
|---|:-:|:-:|:-:|:-:|
|ConvertFP16FP32MatMat::OCL_Core|3.130|3.133|3.172|3.087|
|ConvertFP16FP32MatUMat::OCL_Core|3.030|1.713|9.559|1.729|
|ConvertFP16FP32UMatMat::OCL_Core|3.010|6.515|6.309|4.452|
|ConvertFP16FP32UMatUMat::OCL_Core|3.016|0.242|23.597|0.170|
|ConvertFP32FP16MatMat::OCL_Core|2.697|2.641|2.713|2.689|
|ConvertFP32FP16MatUMat::OCL_Core|2.752|4.076|6.483|4.191|
|ConvertFP32FP16UMatMat::OCL_Core|2.706|9.042|16.481|1.834|
|ConvertFP32FP16UMatUMat::OCL_Core|2.704|0.229|15.730|0.176|

convertTo-baseline can't compile OpenCL kernel for FP16 properly - FIXED.
dGPU has much more power, so results are x16-17 better than single cpu core. 
Patched version is not worse than convertFp16 and convertTo baseline.
There are still gaps against noOpenCL(CPU only) mode due to T-API implementation issues (unnecessary synchronization) and required memory transfers.

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2024-01-26 12:56:52 +03:00
Alexander Smorkalov
ae21368eb9
Merge pull request #24832 from AryanNanda17:Aryan#22177
Resolved issue number #22177
2024-01-26 10:42:47 +03:00
Alexander Smorkalov
cb92974914 Test for Rect2f in Python. 2024-01-25 18:35:03 +03:00
Sean McBride
e64857c561
Merge pull request #23736 from seanm:c++11-simplifications
Removed all pre-C++11 code, workarounds, and branches #23736

This removes a bunch of pre-C++11 workrarounds that are no longer necessary as C++11 is now required.
It is a nice clean up and simplification.

* No longer unconditionally #include <array> in cvdef.h, include explicitly where needed
* Removed deprecated CV_NODISCARD, already unused in the codebase
* Removed some pre-C++11 workarounds, and simplified some backwards compat defines
* Removed CV_CXX_STD_ARRAY
* Removed CV_CXX_MOVE_SEMANTICS and CV_CXX_MOVE
* Removed all tests of CV_CXX11, now assume it's always true. This allowed removing a lot of dead code.
* Updated some documentation consequently.
* Removed all tests of CV_CXX11, now assume it's always true
* Fixed links.

---------

Co-authored-by: Maksim Shabunin <maksim.shabunin@gmail.com>
Co-authored-by: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
2024-01-19 16:53:08 +03:00
Alexander Smorkalov
d066c44bce
Merge pull request #24841 from mshabunin:rvv-071-update
RISC-V: updated intrin_rvv071.hpp to work with modern toolchain 2.8.0
2024-01-19 08:11:08 +03:00
Maksim Shabunin
6b77f50269 RISC-V: use non-saturating 64-bit add in intrin_rvv071.hpp 2024-01-17 20:34:12 +03:00
Maksim Shabunin
224b9ee33f RISC-V: updated intrin_rvv071.hpp to work with modern toolchain 2.8.0
- intrinsics implementation (071) reworked to use modern RVV intrinsics syntax
- cmake toolchain file (071) now allows selecting from predefined configurations

Co-authored-by: Fang Sun <fangsun@linux.alibaba.com>
2024-01-17 20:34:12 +03:00
Zhuo Zhang
37b02d170f fix qnx-sdp-700 build
based on https://github.com/opencv/opencv/pull/24864
2024-01-17 21:49:13 +08:00
Zhuo Zhang
b04de14fbb Fix QNX build
Based on https://github.com/opencv/opencv/issues/24567
2024-01-16 13:51:22 +08:00
Stefan Dragnev
2791bb7062
Merge pull request #24773 from tailsu:sd/pathlike
python: accept path-like objects wherever file names are expected #24773

Merry Christmas, all 🎄

Implements #15731

Support is enabled for all arguments named `filename` or `filepath` (case-insensitive), or annotated with `CV_WRAP_FILE_PATH`.

Support is based on `PyOS_FSPath`, which is available in Python 3.6+. When running on older Python versions the arguments must have a `str` value as before.

### 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-01-12 16:23:05 +03:00
Aryan
9b402cfa59 Resolved issue number #22177 2024-01-09 01:23:26 +05:30
Brad Smith
3b287770b9 Corrections for FreeBSD ARM support
FreeBSD does not have the /proc file system. FreeBSD was added to the code path
for aarch64 before the use of the /proc file system with f7b4b750d8
but then /proc usage was added not long after with b3269b08a1
2024-01-06 20:09:36 -05:00
Alexander Smorkalov
91ec3c0af2
Merge pull request #24815 from brad0:openbsd_x86_build
Fix building on OpenBSD X86
2024-01-06 21:20:56 +03:00
Alexander Smorkalov
22a8fa0730
Merge pull request #24798 from Rageking8:correct-invalid-error-directive
Correct invalid error directive
2024-01-06 12:05:07 +03:00
Brad Smith
34a871c855 Fix building on OpenBSD X86 2024-01-06 01:41:02 -05:00
cudawarped
19527d79d6 core: address clang warnings 2024-01-02 08:33:55 +02:00
Rageking8
7f2c14fc4f
Correct invalid error directive 2023-12-29 21:34:16 +08:00
Alexander Alekhin
2e3ccb4e8e Merge tag '4.9.0' 2023-12-28 09:29:33 +00:00
Alexander Smorkalov
dad8af6b17 Release 4.9.0. 2023-12-27 19:46:55 +03:00
Alexander Alekhin
49a0877b8c docs: exclude test entites from bindings utils 2023-12-27 06:46:20 +00:00
cudawarped
7d681cf80d build: first class cuda support 2023-12-26 09:39:18 +03:00
Alexander Smorkalov
b407c58b96 pre: OpenCV 4.9.0 (version++). 2023-12-25 15:20:10 +03:00