Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(5.x) Merge 4.x #3769

Merged
merged 6 commits into from
Jul 17, 2024
Merged

(5.x) Merge 4.x #3769

merged 6 commits into from
Jul 17, 2024

Conversation

asmorkalov
Copy link
Contributor

@asmorkalov asmorkalov commented Jul 16, 2024

OpenCV: opencv/opencv#25915
OpenCV Extra: opencv/opencv_extra#1193

#3731 from chacha21:cuda_separable_filter_single
#3748 from wangqiang9:patch-1
#3753 from gregorburger:4.x

Previous "Merge 4.x": #3763

wangqiang9 and others added 6 commits May 30, 2024 16:40
Fixed a clerical error in qrcode.py
also link to CUDA::cufft_static in case of BUILD_SHARED_LIBS=OFF
…ngle

supports empty kernels in cuda::SeparableLinearFilters opencv#3731

[#25408](opencv/opencv#25408)

When only 1D convolution is needed (row or column filter only), `cuda::LinearFilter` might be slower than `cuda::SeparableLinearFilter`
Using `cuda::SeparableLinearFilter` for 1D convolution can be done by using a `(1)` kernel for the ignored dimension.
By supporting empty kernels in `cuda::SeparableLinearFilter`, there is no need for that `(1)` kernel any more.
Additionaly, the inner `_buf ` used to store the intermediate convolution result can be saved when a single convolution is needed.

In "legacy" usage (row+col kernels), there is no regression in `cuda::SeparableLinearFilter` performance.
As soon as an empty kernel is used, the performance is largely increased.

Devil in the details : the "in-place" processing is supported and might need intermediate buf, but still no regression.

- [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
@asmorkalov asmorkalov merged commit 4e5b46b into opencv:5.x Jul 17, 2024
9 checks passed
@asmorkalov asmorkalov mentioned this pull request Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants