1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-16 22:35:51 +08:00
Commit Graph

4711 Commits

Author SHA1 Message Date
Alexander Smorkalov
07bc3f647e Merge branch 4.x 2025-09-10 09:38:51 +03:00
Alexander Smorkalov
fe8154b4b4 Merge pull request #3991 from cudawarped:cufft_static_nocallback_depreciated
[cuda][cudaarithm] Remove libcufft_static_nocallback.a dependency with CUDA 13.0
2025-09-09 16:59:00 +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
cudawarped
29f0f84e1a libcufft_static_nocallback.a has been removed. Fallback to dynamically linking to cufft because libcufft_static.a requires seperable compilation. 2025-08-30 09:07:57 +03:00
Alexander Smorkalov
f7cf147ed0 Merge branch 4.x 2025-08-27 16:11:31 +03:00
Alexander Smorkalov
ea9f108057 Merge pull request #3987 from utibenkei:fix-java-wrapper-missing-legacy-multitracker-create
Fix MultiTracker.create() Java wrapper generation and add tests
2025-08-24 17:09:34 +03:00
Alexander Smorkalov
2a82fa6415 Merge pull request #3988 from utibenkei:fix-java-wrapper-missing-vec4i
Enable Java wrapper generation for Vec4i
2025-08-20 15:05:14 +03:00
utibenkei
084c769c9b Add Java wrapper test for HoughPoint2Line in ximgproc module
- Add basic functionality test for HoughPoint2Line in XimgprocTest.java
- Add gen_dict.json to expose RO_STRICT and RO_IGNORE_BORDERS constants in Java wrapper
- Implement minimal test to verify method call and output validity
2025-08-20 01:24:15 +09:00
utibenkei
14ea2738c7 Fix MultiTracker.create() Java wrapper generation and add tests
- Fix SKIP issue in MultiTracker.create() method Java wrapper generation
- Add Java tests for MultiTracker functionality
2025-08-17 23:34:16 +09:00
Alexander Smorkalov
408ee9f25f Merge pull request #3963 from cudawarped:fix_shufl_down_on_cc_lt_70
cudev: Add __shfl_down implementation for long long and unsigned long for CUDA Tookit < 9.0
2025-08-14 13:09:58 +03:00
Alexander Smorkalov
d031ffdd89 Merge branch 4.x 2025-08-13 10:53:16 +03:00
Alexander Smorkalov
91c38c92b6 Merge pull request #3985 from cudawarped:add_cudafilters_stream_comment
cudafilters: Add comment for use with CUDA streams
2025-08-11 16:40:13 +03:00
Håvard Haug
7d168ffe02 Merge pull request #3983 from mitresthen:warn-warpaffine-overlap
Add assert to ensure using non-overlapping memory regions #3983

This pr addresses this issue: https://github.com/opencv/opencv/issues/27429
where the user did not realize that the warpaffine function requires non-overlapping src and dst memory regions. 
The code now compares the input memory regions and asserts that they do not overlap. There is also a test for this functionality.

### 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
2025-08-11 13:07:46 +03:00
Alexander Smorkalov
f49f0aef3c Merge pull request #3984 from cudawarped:fix_videostab_cuda_13
cuda: update videostab for cuda 13.0
2025-08-11 12:19:56 +03:00
cudawarped
700a1725dd cudafilters: Add comment for use with CUDA streams 2025-08-09 08:03:36 +03:00
cudawarped
9a9b173cd1 cuda: update videostab for cuda 13.0 2025-08-07 21:55:10 +03:00
Alexander Smorkalov
b55bf35d73 Merge branch 4.x 2025-07-28 12:50:12 +03:00
Gursimar Singh
cb495d9b79 Merge pull request #3967 from gursimarsingh:fastcv_cvtcolor_addition
Added fastcv color conversions #3967

This pull request introduces FastCV-based color conversions:

```
    COLOR_YUV2YUV444sp_NV12      //!< FastCV: YCbCr420PseudoPlanar to YCbCr444PseudoPlanar
    COLOR_YUV2YUV422sp_NV12      //!< FastCV: YCbCr420PseudoPlanar to YCbCr422PseudoPlanar
    COLOR_YUV422sp2YUV444sp      //!< FastCV: YCbCr422PseudoPlanar to YCbCr444PseudoPlanar
    COLOR_YUV422sp2YUV_NV12      //!< FastCV: YCbCr422PseudoPlanar to YCbCr420PseudoPlanar
    COLOR_YUV444sp2YUV422sp      //!< FastCV: YCbCr444PseudoPlanar to YCbCr422PseudoPlanar
    COLOR_YUV444sp2YUV_NV12      //!< FastCV: YCbCr444PseudoPlanar to YCbCr420PseudoPlanar
    COLOR_YUV2RGB565_NV12        //!< FastCV: YCbCr420PseudoPlanar to RGB565
    COLOR_YUV422sp2RGB565        //!< FastCV: YCbCr422PseudoPlanar to RGB565
    COLOR_YUV422sp2RGB           //!< FastCV: YCbCr422PseudoPlanar to RGB888
    COLOR_YUV422sp2RGBA          //!< FastCV: YCbCr422PseudoPlanar to RGBA8888
    COLOR_YUV444sp2RGB565        //!< FastCV: YCbCr444PseudoPlanar to RGB565
    COLOR_YUV444sp2RGB           //!< FastCV: YCbCr444PseudoPlanar to RGB888
    COLOR_YUV444sp2RGBA          //!< FastCV: YCbCr444PseudoPlanar to RGBA8888
    COLOR_RGB2YUV_NV12           //!< FastCV: RGB888 to YCbCr420PseudoPlanar
    COLOR_RGB5652YUV444sp        //!< FastCV: RGB565 to YCbCr444PseudoPlanar
    COLOR_RGB5652YUV422sp        //!< FastCV: RGB565 to YCbCr422PseudoPlanar
    COLOR_RGB5652YUV_NV12        //!< FastCV: RGB565 to YCbCr420PseudoPlanar
    COLOR_RGB2YUV444sp           //!< FastCV: RGB888 to YCbCr444PseudoPlanar
    COLOR_RGB2YUV422sp           //!< FastCV: RGB888 to YCbCr422PseudoPlanar
```

### 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
2025-07-24 09:00:42 +03:00
Alexander Smorkalov
ab4d3dc781 Merge pull request #3968 from cudawarped:add_cmake_flag_to_fix_cuda_12_9_issue
cudev: add -Xcompiler=/Zc:preprocessor to fix bug in CUDA 12.9
2025-07-24 08:59:39 +03:00
Alexander Smorkalov
6f820b00ca Merge branch 4.x 2025-07-21 10:39:54 +03:00
Troels Ynddal
84024547e3 Merge pull request #3970 from troelsy:4.x
Fix race condition in Otsu's method #3970

I found that in some cases, Otsu's method can have two or more equal thresholds. In case of the CUDA implementation, this would create a race-condition where the last thread to write the output gets to choose which Otsu threshold to use. The resulting image from cv::cuda::threshold would be the same, but the returned threshold would vary for each run.

I solve this by first doing a poll to check if there are multiple matches with `__syncthreads_count`. If not, we can return the threshold as before. If there are more than one, the kernel does a minimum reduction to find the lowest threshold that matches the otsu score. It doesn't matter which threshold you choose as long as it is consistent, so I choose the smallest one.

I'm unsure when `__syncthreads_count` as introduced, but it is compatible with CC≥2.0. CUDA Toolkit's archive only goes back to version 8.0, but it was documented back then (https://docs.nvidia.com/cuda/archive)


### 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-07-17 09:36:33 +03:00
Alexander Smorkalov
735b7a0a36 Merge pull request #3969 from CodeLinaro:apreetam_7thPost
Modified QcAllocator to store File Descriptor
2025-07-16 13:35:13 +03:00
cudawarped
6d3915e415 cudev: add -Xcompiler=/Zc:preprocessor to fix bug in CUDA 12.9 2025-07-12 08:38:20 +03:00
Aakash Preetam
d6e2199e69 Modified QcAllocator to store File Descriptor 2025-07-03 15:51:17 +05:30
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
Alexander Smorkalov
d943e1d61c Merge pull request #3964 from asmorkalov:as/threshold_otsu_fix
Fixed out-of-bound access in CUDA Otsu threshold implementation.
4.12.0
2025-06-27 18:40:05 +03:00
Alexander Smorkalov
b72527fbca Fixed out-of-bound access in CUDA Otsu threshold implementation. 2025-06-27 17:04:40 +03:00
Alexander Smorkalov
28e6ce591a Merge pull request #3926 from shyama7004:docChanges
enhance multi_camera_tutorial for clarity
2025-06-19 16:40:30 +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
edce692c7a Merge pull request #3764 from sturkmen72:edcolor
Add EDColor related algorithms to EdgeDrawing Class
2025-06-19 16:16:03 +03:00
Alexander Smorkalov
845eb159bb Merge pull request #3954 from asmorkalov:as/fastcv_5.x
Fixed FastCV module dependencies and CI in 5.x
2025-06-17 16:50:49 +03:00
Alexander Smorkalov
ccdfb89316 Fixed FastCV module build and CI in 5.x 2025-06-17 15:38:34 +03:00
Alexander Smorkalov
f5c95be616 Merge pull request #3901 from gursimarsingh:move_ccm_to_photo_module
Removed MCC/CCM module from OpenCV Contrib for migration to OpenCV Main
2025-06-12 17:08:52 +03:00
Alexander Smorkalov
2bc4fd007b Merge branch 4.x 2025-06-11 16:13:42 +03:00
Aakash Preetam
1e4d4e0f3e Merge pull request #3936 from CodeLinaro:apreetam_6thPost
Add warpAffine and resizeDown APIs in FastCV Extension #3936

- Added warpAffine function to apply affine transformations.
2x3 affine transformations for both CV_8UC1 and CV_8UC3 input
2x2 matrix-based patch extraction for grayscale images, with ROI.

- Deprecated resizeDownBy2 and resizeDownBy4 functions.
- Introduced resizeDown function to down-scale images using specified scaling factors or dimensions, supporting both single-channel (CV_8UC1) and two-channel (CV_8UC2) images.

### 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-09 15:47:31 +03:00
Aakash Preetam
6e8ce301e0 Merge pull request #3931 from CodeLinaro:apreetam_5thPost
Add FastCV DSP Initialization, QcAllocator and FastCV DSP Extension APIs #3931

Merge with https://github.com/opencv/opencv/pull/27290

**Detailed Description**

This PR introduces FastCV DSP Extension APIs within the '**cv::fastcv::dsp**' namespace.
The following APIs have been added:

1. **fcvdspinit**: Initializes the FastCV DSP environment.
2. **fcvdspdeinit**: Deinitializes the FastCV DSP environment.
3. **sumOfAbsoluteDiffs**: Computes the sum of absolute differences of an image against an 8x8 template.
4. **thresholdOtsu**: Binarizes a grayscale image using Otsu's method.
5. **FFT**: Computes the 1D or 2D Fast Fourier Transform of a real-valued matrix.
6. **IFFT**: Computes the 1D or 2D Inverse Fast Fourier Transform of a complex-valued matrix.
7. **canny**: Applies the Canny edge detector to an 8-bit grayscale image.
8. **filter2D**: Applies a generic 2D filter to an image.

The **QcAllocator** has been added to manage memory allocations on Qualcomm's Chipsets. This allocator ensures that matrices are allocated using the Qualcomm hardware memory allocator, providing efficient DSP operations.

Requires updated binary from: https://github.com/opencv/opencv_3rdparty/pull/97
Requires binary from https://github.com/opencv/opencv_3rdparty/pull/95

Lib Hash Update: https://github.com/opencv/opencv/pull/27403

### 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-06 12:30:12 +03:00
Alexander Smorkalov
0a5ac86b52 Merge pull request #3939 from vrabaud:mcc
Properly fix inf/inf issue in MCC
2025-05-21 16:14:57 +03:00
Vincent Rabaud
68c8cf83b7 Properly fix inf/inf issue in MCC
Properly fix https://github.com/opencv/opencv_contrib/issues/3316

Without this fix, we could end up with 4 corners, which might seem
valid, while some of those are (0,0).
2025-05-20 23:06:22 +02:00
quic-xuezha
eebd8977e1 Merge pull request #3922 from CodeLinaro:xuezha_4thPost
Add WarpPerspective in FastCV extension #3922

### 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-05-07 13:45:02 +03:00
Alexander Smorkalov
bdbbcaa9eb Merge branch 4.x 2025-04-30 12:32:42 +03:00
Alexander Smorkalov
acd145f414 Merge pull request #3927 from utibenkei:fix_java_enum_wrapper
Explicitly specify enum type scope to improve Java wrapper generation
2025-04-22 11:54:25 +03:00
utibenkei
21b83618d4 Explicitly specify enum type scope to improve Java wrapper generation
Changed PatternPositionType to aruco::PatternPositionType to explicitly specify its scope.
This allows gen_java.py to correctly register disc_type, preventing constructors and
methods using this enum type from being skipped during Java wrapper generation.
2025-04-19 00:10:59 +09:00
Alexander Smorkalov
d28106c47f Merge pull request #3919 from asmorkalov:as/fastcv_ci
Added CI pipeline with FastCV back-end.
2025-04-16 19:01:16 +03:00
Alexander Smorkalov
63fec5a382 Fixed branch. 2025-04-16 17:41:52 +03:00
Alexander Smorkalov
56cf3e614c Merge pull request #3925 from gursimarsingh:mcc_bug_fix
[BUG FIX] Fix DNN-based MCC checker detector's checker box alignment issue
2025-04-11 09:29:00 +03:00
Sarrink
09d9e0d4d3 Merge pull request #3923 from Sarrink:patch-1
Typo fix: KadewTraKuPong to KaewTraKulPong #3923

From his paper: https://scispace.com/pdf/an-improved-adaptive-background-mixture-model-for-real-time-1l517cez5l.pdf

### 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
2025-04-11 09:25:43 +03:00
shyama7004
57764e1849 enhance multi_camera_tutorial for clarity 2025-04-10 20:28:11 +05:30
Gursimar Singh
6fb4508cb9 mcc bug fix 2025-04-10 16:13:56 +05:30
Alexander Smorkalov
e3165a9904 Merge pull request #3924 from CodeLinaro:integrateYUV_fastcv_extn
Fastcv extn for integrate YUV(YCbCr) image and bug fix in split extn
2025-04-10 07:52:02 +03:00