Commit Graph

35188 Commits

Author SHA1 Message Date
Liutong HAN
3fbaad36d7
Merge pull request #26624 from hanliutong:rvv-mean
Add RISC-V HAL implementation for meanStdDev #26624

`meanStdDev` benefits from the Universal Intrinsic backend of RVV, but we also found that the performance on the `8UC4` type is worse than the scalar version when there is a mask, and there is no optimization implementation on `32FC1`.

This patch implements `meanStdDev` function in RVV_HAL using native intrinsic, significantly optimizing the performance for `8UC1`, `8UC4` and `32FC1`.

This patch is tested on BPI-F3 for both gcc 14.2 and clang 19.1.
```
$ opencv_test_core --gtest_filter="*MeanStdDev*"
$ opencv_perf_core --gtest_filter="Size_MatType_meanStdDev*
```

![1734077611879](https://github.com/user-attachments/assets/71c85c9d-1db1-470d-81d1-bf546e27ad86)

### 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-12-18 22:19:02 +03:00
Alexander Smorkalov
7c0c9e1e55
Merge pull request #26639 from vrabaud:opencv_js2
js: fix helper.js to not trigger warnings
2024-12-18 18:49:25 +03:00
Vincent Rabaud
874e57512e js: fix helper.js to not trigger warnings 2024-12-18 11:49:08 +01:00
Vincent Rabaud
1fe9dd0c3b js: add types included in bound APIs
This fixes #25239
2024-12-18 11:43:39 +01:00
Rüdiger Ihle
d369cf6d50
Merge pull request #26627 from warped-rudi:torch
Android camera feature enhancements #26627

Closes https://github.com/opencv/opencv/issues/24687

### 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-12-18 12:16:50 +03:00
quic-xuezha
1c28a98b34
Merge pull request #26617 from CodeLinaro:xuezha_2ndPost
FastCV-based HAL for OpenCV acceleration 2ndpost-1 #26617

### Detailed description:

- Add parallel support for cv_hal_sobel
- Add cv_hal_gaussianBlurBinomial and parallel support.
- Add cv_hal_addWeighted8u and parallel support
- Add cv_hal_warpPerspective and parallel support

Requires binary from [opencv/opencv_3rdparty#90](https://github.com/opencv/opencv_3rdparty/pull/90)
Related patch to opencv_contrib: [opencv/opencv_contrib#3844](https://github.com/opencv/opencv_contrib/pull/3844)

### 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-12-18 09:34:13 +03:00
Alexander Smorkalov
23f6a9ee3e
Merge pull request #26636 from FantasqueX:fix-re-warning-2
Fix Syntax warning in ts summary.py
2024-12-18 08:54:58 +03:00
Letu Ren
3899a060a3 Fix Syntax warning in ts summary.py 2024-12-18 05:27:10 +08:00
Alexander Smorkalov
7ddc02907e
Merge pull request #26634 from FantasqueX:fix-test-exif-1
Fix test_exif compilation when none of JPEG, PNG, AVIF is enabled
2024-12-17 22:36:42 +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
Letu Ren
59b9681af6 Remove useless -Wno-long-long option
According to GCC doc, -Wlong-long: Warn if long long type is used.
This is enabled by either -Wpedantic or -Wtraditional in ISO C90
and C++98 modes. To inhibit the warning messages, use -Wno-long-long.

OpenCV 4.x requires C++11. As result, this option is useless.

Ref: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
2024-12-17 21:51:35 +08:00
Letu Ren
2e21e11318 Fix test_exif compilation when non of JPEG, PNG, AVIF is enabled
When none of JPEG, PNG, AVIF is enabled, exif_files is a zero-length
array, which is prohibited by C++ reference.
2024-12-17 21:41:45 +08:00
Vincent Rabaud
e0001903ce
Merge pull request #26490 from vrabaud:4x_calibration_base
Switch calibration.cpp to C++ #26490

The CvLevMarq code has to be kept in order to keep the same accuracy (the C++ solver is not as good).

There are two ways to review this PR: by comparing to the old code, or by checking what is different from the 5.x version (which is the first commit).

### 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 16:36:14 +03:00
Alexander Smorkalov
a8f4019932 Made some pre-defined Python types optional to disable modules 2024-12-17 15:54:06 +03:00
Neko Asakura
dbb330d7be Cocoa/highgui: fix leak in cvGetWindowRect_COCOA 2024-12-17 22:31:37 +10:00
Alexander Smorkalov
0ca98d437b
Merge pull request #26632 from fengyuentau:dnn/gelu_cann
dnn: Fix CANN build
2024-12-17 15:09:33 +03:00
Yuantao Feng
51ec7fedaf fix build 2024-12-17 10:17:15 +00: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
Alexander Smorkalov
1a1b1901e8
Merge pull request #26623 from asmorkalov:as/kelidicv_0.3
Update KleidiCV to version 0.3
2024-12-16 16:58:51 +03:00
Alexander Smorkalov
a4c8d318e6 Update KleidiCV to version 0.3. 2024-12-16 15:32:44 +03:00
Alexander Smorkalov
03f90aaf85
Merge pull request #26614 from KangJialiang:fix-multi-channel-mean-scale-sample-dnn-yolo
Fix normalization parameters in YOLO example to support multi-channel mean and scale factors
2024-12-16 15:29:43 +03:00
Alexander Smorkalov
71581d9c97
Merge pull request #26618 from KangJialiang:fix/yoloPostProcessing-variable-nc
Fix yoloPostProcessing to handle variable number of classes (nc)
2024-12-14 20:59:45 +03:00
KangJialiang
25fe85bbbb Fix yoloPostProcessing` to handle variable number of classes (nc)
Previously, the yoloPostProcessing function assumed that the number of classes (nc) was fixed at 80. This caused incorrect behavior when a different number of classes was specified, leading to mismatched output shapes.

This update modifies the code to use the provided `nc` value dynamically, ensuring that the output shapes are correctly calculated based on the specified number of classes. This prevents issues when `nc` is not equal to 80 and allows for greater flexibility in model configurations.
2024-12-12 15:41:14 +08:00
KangJialiang
42be822c1d Fix normalization parameters in YOLO example to support multi-channel mean and scale factors
This branch and commit address an issue in the YOLO example (samples/dnn/yolo_detector.cpp) where the mean and scale parameters only affected the first channel (B) due to single-value input. The modification updates these parameters to accept multi-channel values, ensuring consistent preprocessing across all image channels.
2024-12-11 20:16:21 +08:00
Maksim Shabunin
1d4110884b
Revert "CI: enable AVX2 build" (#26610) 2024-12-10 17:23:13 +03:00
Alexander Smorkalov
dc8a9d5d3d
Merge pull request #26604 from mshabunin:add-avx2-build
CI: enable AVX2 build
2024-12-10 12:11:08 +03:00
Maksim Shabunin
5ef062343c CI: enable AVX2 build 2024-12-10 11:35:56 +03:00
anandkaranubc
d85c13bcbb
Merge pull request #26587 from anandkaranubc:fix-nu-svc-parameter-check
Fix #25812: Add error handling for invalid nu parameter in SVM NU_SVC #26587

### 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 [Issue #25812](https://github.com/opencv/opencv/issues/25812)
- [ ] 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-10 09:21:25 +03:00
Alexander Smorkalov
0dfc5d416f
Merge pull request #26598 from mshabunin:fix-doc-footer
doc: upgraded for compatibility with doxygen 1.12
2024-12-10 09:19:02 +03:00
Maksim Shabunin
4ade7931e1 doc: upgraded for compatibility with doxygen 1.12 2024-12-09 23:08:18 +03:00
Alexander Smorkalov
0a2669daba
Merge pull request #26596 from y-guyon:4.x_absl_str
Support string_view in caffe_importer
2024-12-09 18:03:38 +03:00
MurtazaSaherwala
3a8d7ec75a
Merge pull request #26524 from MurtazaSaherwala:DocumentationUpdation
Updated trackbar callback function and improved documentation #26524

This Fixes #26467

Description:
This pull request improve the OpenCV documentation regarding the Trackbar functionality. The current documentation does not provide clear guidance on certain aspects, such as handling the value pointer deprecation and utilizing callback arguments in C. This update addresses those gaps and provides an updated example for better clarity.

Changes:
Updated Documentation:

Clarified the usage of the value pointer and explained how to pass an initial value, since the value pointer is deprecated.
Added more detailed explanations about callback arguments in C, ensuring that users understand how to access and use them in Trackbar callbacks.
Added a note on how to properly handle initial value passing without relying on the deprecated value pointer.
Updated Tutorial Example:

Renamed and used callback function parameters to make them more understandable.
Included a demonstration on how to utilize userdata in the callback function.
Additional Notes:

Removed reliance on the value pointer for updating trackbar values. Users are now encouraged to use other mechanisms as per the current implementation to avoid the runtime warning.

### 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-12-09 16:23:07 +03:00
dai-xin
f825b4d1ab Resolve the issue of slow camera opening when using dshow as the backend for VideoCapture. 2024-12-09 17:55:46 +08:00
Yannis Guyon
1db93911ae
Support string_view in caffe_importer
An upcoming change in Protobuf will change the return types of various
methods like Descriptor::name() and Message::GetTypeName() from const
std::string& or std::string to absl::string_view. This CL fixes users
of those methods to work both before and after the change.
2024-12-09 10:24:01 +01:00
Alexander Smorkalov
1f2e7adb4b
Merge pull request #26591 from shyama7004:fix-typos
Fix typo: renamed 'search_widow_size' to 'search_window_size'
2024-12-09 11:03:49 +03:00
shyama7004
acdb707ba4 Fix typo: rename 'search_widow_size' to 'search_window_size' 2024-12-08 13:41:48 +05:30
Super
082cd7a74e
Merge pull request #25691 from redhecker:gifSupport
[GSoC] Add GIF decode and encode for imgcodecs #25691

this is related to #24855 

we add  gif support for `imread`, `imreadmulti`, `imwrite` and `imwritemulti`

opencv_extra: https://github.com/opencv/opencv_extra/pull/1203

### 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-12-07 10:17:41 +03:00
Alexander Smorkalov
7fbf3c1fec
Merge pull request #26579 from FantasqueX:fix-re-warning-1
Fix python re warning
2024-12-06 19:24:05 +03:00
Letu Ren
ed9d64c9d3 Fix python re warning in gen_objc 2024-12-06 19:54:23 +08:00
Alexander Smorkalov
646e87c728
Merge pull request #26580 from opencv-pushbot:gitee/alalek/videoio_test_filter_unstable_gstreamer
videoio(test): filter unstable GStreamer tests
2024-12-06 14:37:14 +03:00
Alexander Alekhin
7edfb57f5a videoio(test): filter unstable GStreamer tests
- observed on Ubuntu 24.04
2024-12-06 08:12:36 +00:00
Skreg
3d91d75f1a
Merge pull request #26564 from shyama7004:improve-macos-install-docs
Improvement of macOS installation guide in documentation #26564

### 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-12-06 08:55:41 +03:00
Amir Hassan
23fcea0d33
Merge pull request #26563 from kallaballa:wayland_and_xkbcommon_missing_include_dirs
Missing include directories needed for wayland-util and xkbcommon #26563

See: #26561

### 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-12-04 17:20:15 +03:00
Alexander Smorkalov
03cedee0b0
Merge pull request #26547 from mshabunin:fix-type-cast
Fixed several cases of unaligned pointer cast
2024-12-03 11:08:45 +03:00
Alexander Smorkalov
8897002fcc
Merge pull request #26560 from savuor:rv/perf_box_5x5
Perf tests for cv::boxFilter(): 5x5 added
2024-12-03 07:40:35 +03:00
Rostislav Vasilikhin
31d04f8fd9 5x5 added for boxfilter perf tests 2024-12-02 16:46:37 +01:00
Maksim Shabunin
c58b6bf11f Fixed several cases of unaligned pointer cast 2024-12-02 16:15:23 +03:00
Alexander Smorkalov
89c19f1f1a
Merge pull request #26557 from mshabunin/fix-doc-1.12
doc: fixed issue with doxygen 1.12
2024-12-02 13:44:42 +03:00
Maksim Shabunin
f4db63ca71 doc: fixed issue with doxygen 1.12 2024-12-02 12:08:59 +03:00
Alexander Smorkalov
5f1b05af0e
Merge pull request #26556 from asmorkalov:FastcvHAL_1stPost
Added Fastcv HAL changes in the 3rdparty folder.
Code Changes includes HAL code , Fastcv libs and Headers

Change-Id: I2f0ddb1f57515c82ae86ba8c2a82965b1a9626ec

Requires binaries from https://github.com/opencv/opencv_3rdparty/pull/86.
Related patch to opencv_contrib: https://github.com/opencv/opencv_contrib/pull/3811

### 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-12-02 10:50:38 +03:00