1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-20 04:25:42 +08:00
Commit Graph

37 Commits

Author SHA1 Message Date
Alexander Smorkalov
07bc3f647e Merge branch 4.x 2025-09-10 09:38:51 +03:00
Alexander Smorkalov
41f4a07d93 Merge pull request #3993 from cudawarped:cuda_double4_dep
[cuda] Add compatibility layer for vector types due for depreciation in CUDA 14.0
2025-09-09 14:50:35 +03:00
cudawarped
1e67ec20e4 cuda: add compatibility layer for depreciated vector types 2025-09-01 13:23:58 +03:00
Alexander Smorkalov
f7cf147ed0 Merge branch 4.x 2025-08-27 16:11:31 +03:00
Alexander Smorkalov
6f820b00ca Merge branch 4.x 2025-07-21 10:39:54 +03:00
cudawarped
af8945e88e cudev: Add _shfl_down implementation for long long and unsigned long long for CUDA Tookit versions < 9.0 2025-06-30 15:18:19 +03:00
Troels Ynddal
6329974d4d Merge pull request #3943 from troelsy:4.x
Add Otsu's method to cv::cuda::threshold #3943

I implemented Otsu's method in CUDA for a separate project and want to add it to cv::cuda::threshold

I have made an effort to use existing OpenCV functions in my code, but I had some trouble with `ThresholdTypes` and `cv::cuda::calcHist`. I couldn't figure out how to include `precomp.hpp` to get the definition of `ThresholdTypes`. For `cv::cuda::calcHist` I tried adding `opencv_cudaimgproc`, but it creates a circular dependency on `cudaarithm`. I have include a simple implementation of `calcHist` so the code runs, but I would like input on how to use `cv::cuda::calcHist` instead. 

### 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
2025-06-19 16:38:53 +03:00
Alexander Smorkalov
bd3b734731 Merge branch 4.x 2024-11-02 13:56:33 +03:00
Vincent Rabaud
843b6ede6a Merge pull request #3800 from vrabaud:cuda
Get CUDA code to compile with clang CUDA and without CUDA #3800

Changelist:
- there are some syntactic changes: `<< <` -> `<<<`. For some reason, I do not need to change all those in the code.
-  `::min` -> `std::min` in `__host__` code
- `modules/cudaimgproc/src/moments.cpp` needs to have the CUDA code in the `#ifdef`
- The signature of `cv::cuda::swapChannels` is not exactly the same as the C++ one in `modules/cudaimgproc/src/color.cpp` 
- `cv::cuda::FarnebackOpticalFlow::create` needs to be explicit about which FarnebackOpticalFlow it returns

### 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
2024-10-29 17:31:10 +03:00
Alexander Smorkalov
1af009236a Merge branch 4.x 2024-07-25 18:32:55 +03:00
Pierre Chatelier
667a66ee0e Merge pull request #3607 from chacha21:cuda_phase_interleaved
Add interleaved versions of phase/cartToPolar/polarToCart #3607

This PR is for performance only (at the cost of more template code and increased GPU code size) The additional variants can help the caller skip the creation of temporary GPU mats (where memory is more likely to be a critical resource), and can even allow in-place processing. magnitude/angles/x/y are often already interleaved when dealing with DFTs.

### 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.
- [X] The feature is well documented and sample code can be built with the project CMake
2024-07-22 16:00:24 +03:00
Maksim Shabunin
9a3ab80a10 Merge remote-tracking branch 'upstream/4.x' into '5.x' 2024-06-14 13:01:29 +03:00
Peter Rekdal Khan-Sunde
b236c71c2f Merge pull request #3751 from peters:4.x
Add conditional include for <cuda/std/tuple> to support CUDA 12.4+ #3751

Fixes https://github.com/opencv/opencv_contrib/issues/3752

Adds a preprocessor check to conditionally include <cuda/std/tuple>  only for CUDA versions 12.4 and above. This ensures backward compatibility  with older legacy CUDA versions.

Related to pull request #3744

### 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-06 14:26:15 +03:00
Alexander Smorkalov
1ed3dd2c53 Merge pull request #3744 from asmorkalov:as/variadic_tuple
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
2024-05-30 15:48:48 +03:00
Alexander Smorkalov
4b7de5ae4e Merge branch 4.x 2024-01-18 17:50:32 +03:00
cudawarped
eca7f1c917 cuda: add moments 2023-12-05 11:19:11 +02:00
Vadim Pisarevsky
96257c2492 Added new data types (#3523)
* conditionally turn off DataType<uint>, because equivalent type traits is now defined in core (after adding CV_32U)
* temporarily disabled integral tests in cudev
2023-08-04 10:49:16 +03:00
Alexander Alekhin
9331902ed9 Merge pull request #3421 from tomoaki0705:fix_warnings_4x 2023-01-13 15:17:55 +00:00
Tomoaki Teshima
f48a261d8b fix warnings 2023-01-13 22:43:20 +09:00
cudawarped
abd3ca8bf8 cudev: fix 1D error introduced in PR 3378 2023-01-12 21:16:38 +02:00
Alexander Smorkalov
8db3e627fb Merge pull request #3378 from cudawarped:replace_texture_ref_with_texture_obj
Fix CUDA texture bugs and replace all instances of CUDA texture references with texture objects
2022-12-20 15:07:09 +03:00
James Bowley
8a6ea82ed0 Replace all instances of texture references/objects with texture objects using the existing updated cv::cudev::Texture class.
Fixes bugs in cv::cuda::demosaicing, cv::cuda::resize and cv::cuda::HoughSegmentDetector.
2022-12-15 12:36:59 +02:00
James Bowley
0af5f73079 Reset cuda runtime error code to cudasuccess on runtime failure. 2022-11-29 13:53:16 +02:00
Alexander Alekhin
ebcc69caf5 Merge pull request #3113 from TracelessLe:master 2021-11-28 12:57:43 +00:00
TracelessLe
b4be7469fb Update color_cvt.hpp
fix a potential overflow bug in cv::cuda::cvtColor(cv::COLOR_Lab2BGR) func, which need to clamp on B/G/R.
2021-11-18 15:31:19 +08:00
Aaron Miller
f1c0b5eae6 Implement cv::cuda::inRange (Fixes OpenCV #6295) 2021-01-18 21:50:41 -05:00
dtmoodie
9ccd8eeecd Merge pull request #2666 from dtmoodie:fix_cudev
Replace DataType in cudev with traits::Type<T>

* DataType<T>::type is deprecated, replace with traits::Type<T>::value

* typo
2020-09-13 11:49:25 +00:00
Alexander Alekhin
75fcfa6093 Merge pull request #2028 from tomoaki0705:fixCudaImgProcFailure 2019-03-08 16:26:22 +00:00
Tomoaki Teshima
a6b3254db9 fix test failure of CUDA_ImgProc
* update the coefficient value
2019-03-06 18:56:00 +09:00
Namgoo Lee
02b3d77b7b [moved from opencv] CUDA 10.1 Build Issue Fix
original commit: 5a2faab2e6
2019-03-03 16:40:43 +00:00
Namgoo Lee
cade19501f [moved from opencv] cudev - Rework some code
- Use shfl_down, instead of __shfl_down, on warp scan
- Remove race conditions

original commit: 2b6be3cb0f
2019-02-25 13:46:32 +09:00
Namgoo Lee
04041fd7ea [moved from opencv] cudalegacy: Use safe block scan function
original commit: 21eb60f88b
2019-02-13 01:55:02 +09:00
Namgoo Lee
18439b4150 [moved from opencv] __shfl_up_sync with mask for CUDA >= 9
* __shfl_up_sync with proper mask value for CUDA >= 9

* BlockScanInclusive for CUDA >= 9

* compatible_shfl_up for use in integral.hpp

* Use CLAHE in cudev

* Add tests for BlockScan

original commit: 970293a229
2019-01-21 15:31:15 +00:00
Tomoaki Teshima
62f55b4f1f fix test failure of cudaimgproc convert color of bgr2gray series 2018-10-11 08:30:22 +09:00
Tomoaki Teshima
53c60a9d50 [moved from opencv] fix test failure of cudev
* follow the implementation of Luv2RGBfloat in imgproc/src/color_lab.cpp
  * loosen threshold in cudaimgproc

original commit: e6ef9221cb
2018-09-29 23:13:12 +09:00
Tomoaki Teshima
ff7dbee60d fix CvFp16Test failure 2018-09-25 14:52:33 +09:00
Alexander Alekhin
82733fe56b cuda: move CUDA modules to opencv_contrib
OpenCV 4.0+
2018-09-19 18:57:43 +03:00