Added CUDA 12.4+ support #3744
Tries to fix https://github.com/opencv/opencv_contrib/issues/3690 for CUDA 12.4+
Related patch to main repo: https://github.com/opencv/opencv/pull/25658
Changes:
- Added branches to support new variadic implementation of thrust::tuple
- Added branch with std::array instead of std::tuple in split-merge and grid operations. The new branch got rid of namespace clash: cv::cuda in OpenCV and ::cuda in CUDA standard library (injected by Thrust). Old tuple branches presumed for compatibility with old code and CUDA versions before 12.4.
### 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
on some CUDA versions creating/destroying cufftPlan2d is very time consuming
we now create them in ConvolveImpl::create() and destroy them in the dtor
this solves issue #3385
Fixes two errors when building with the options WITH_CUDA=ON and BUILD_CUDA_STUBS=ON on a machine without CUDA.
In the cudaarithm module, make sure cuda_runtime.h only gets included when CUDA is installed.
In the stitching module, don't assume that cuda is present just because cudaarithm and cudawarping are present (as is the case when building with the above options).
original commit: 22ee5c0c4d
Add python bindings to cudaobjdetect, cudawarping and cudaarithm
* Overload cudawarping functions to generate correct python bindings.
Add python wrapper to convolution funciton.
* Added shift and hog.
* Moved cuda python tests to this repo and added python bindings to SURF.
* Fix SURF documentation and allow meanshiftsegmention to create GpuMat internaly if not passed for python bindings consistency.
* Add correct cuda SURF test case.
* Fix python mog and mog2 python bindings, add tests and correct cudawarping documentation.
* Updated KeyPoints in cuda::ORB::Convert python wrapper to be an output argument.
* Add changes suggested by alalek
* Added changes suggested by asmorkalov