-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3731 from chacha21:cuda_separable_filter_single
supports empty kernels in cuda::SeparableLinearFilters #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
- Loading branch information
Showing
3 changed files
with
138 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters