1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-14 18:58:22 +08:00

4598 Commits

Author SHA1 Message Date
Dave Merchant
c4c74c435b Merge pull request #4017 from D00E:known-foreground-mask
In support of Optional Known Foreground Mask for Background Subtractors #4017

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

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
 x Patch to opencv_extra has the same branch name.

 The feature is well documented and sample code can be built with the project CMake

Description

Is in support to a pull request regarding, issue https://github.com/opencv/opencv/issues/26476.
Core paired pull request: https://github.com/opencv/opencv/pull/27810
This adds function templates inline with the pure virtual overloaded apply function present for background subtraction. Supporting the build of the pull request:
2025-10-14 09:59:58 +03:00
pratham-mcw
06fc7ad743 Merge pull request #3980 from pratham-mcw:opt-arm64-adaptive-manifold-unroll
ximgproc: optimize Adaptive Manifold function for ARM64 #3980

### 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

- This PR introduces an ARM64-specific performance optimization in AdaptiveManifoldFilter::h_filter by applying loop unrolling.
- The optimization is guarded with #if defined(_M_ARM64) to ensure it only affects ARM64 builds.
- The optimization does not affect accuracy and maintains the same numerical behavior as the original scalar implementation.

Performance Improvements :

- The optimization significantly improves the performance of adaptive Manifold function on Windows ARM64 targets.
- The table below shows timing comparisons before and after the optimization:
<img width="1098" height="219" alt="image" src="https://github.com/user-attachments/assets/6cab9147-8ba0-4582-bdc6-e1f57989da86" />
2025-10-13 11:33:42 +03:00
Alexander Smorkalov
379981e2ba Merge pull request #4020 from Roaimkhan:fix-min-disp-bug
Fix: preserve _min_disp in DisparityWLSFilterImpl init()
2025-10-11 10:05:03 +03:00
Roaim
b6620189a5 Fix: preserve _min_disp in DisparityWLSFilterImpl init() 2025-10-10 01:54:20 +05:00
Alexander Smorkalov
9ce410a550 Merge pull request #4015 from asmorkalov:as/skip_advanced_cudacodec_tests
Mark advanced configurations in cudacodecs as unstable as not all GPUs support it
2025-10-02 15:32:37 +03:00
Alexander Smorkalov
7693d5e1cc Mark advanced configurations in cudacodecs as unstable as not all GPUs support it. 2025-10-02 12:18:19 +03:00
Alexander Smorkalov
04c05a1665 Merge pull request #4010 from Kumataro:fixC4009
fix build warnings for GCC 15
2025-10-01 10:31:12 +03:00
Alexander Smorkalov
1231b207af Merge pull request #4012 from asmorkalov:as/older_codec_sdk
Fixed support for NVIDIA Codec SDK 11.x
2025-09-29 17:46:11 +03:00
Alexander Smorkalov
b6c62e471e Fixed support for NVIDIA Codec SDK 11.x 2025-09-29 15:39:44 +03:00
Alexander Smorkalov
de21064724 Merge pull request #4005 from vrabaud:nanoflann
Bump nanoflann from 1.3.2 to 1.7.1
2025-09-29 11:50:25 +03:00
Alexander Smorkalov
a7631fc88b Merge pull request #4011 from gabrielpreviato:doc/fix-resize-doxygen
Add INTER_AREA interpolation method on `resize` Doxygen string
2025-09-29 11:27:09 +03:00
Gabriel Previato
c99c2560ba Add INTER_AREA interpolation method on resize Doxygen string 2025-09-28 11:44:33 +00:00
Kumataro
964c53407a fix build warnings for GCC 15 2025-09-27 13:54:51 +09:00
Alexander Smorkalov
01fd98d58f Merge pull request #4006 from vrabaud:c_headers
Remove more C code
2025-09-25 23:47:18 +03:00
Alexander Smorkalov
7df0c32c83 Merge pull request #4007 from asmorkalov:as/js_extend
Added initial JS support in contrib
2025-09-25 23:47:01 +03:00
Alexander Smorkalov
4f542678bf Added initial JS support in contrib. 2025-09-25 17:25:47 +03:00
Vincent Rabaud
d880a9aa28 Remove more C code 2025-09-25 14:32:17 +02:00
Vincent Rabaud
af714b9323 Bump nanoflann from 1.3.2 to 1.7.1
Copied from https://github.com/jlblancoc/nanoflann
Only change: #include <nanoflann.hpp> -> #include "nanoflann.hpp"
in KDTreeVectorOfVectorsAdaptor.h
2025-09-25 10:51:16 +02:00
Alexander Smorkalov
9e0bae6396 Merge pull request #4002 from dkurt:d.kurtaev/skip_warpPerspective
Skip WarpPerspective.Rotation
2025-09-23 13:47:42 +03:00
Dmitry Kurtaev
7d500c2dcb Skip WarpPerspective.Rotation 2025-09-22 21:48:35 +03:00
Alexander Kraynikov
b01e6a7581 Merge pull request #3999 from incubus-ank:fix/cuda_fast_detectAsync_memory_leak
Add missing cudaFree #3999

I found missing memory cudaFree in cv::cuda::FAST_Impl::detectAsync()

I created an issue, but did not receive a response.
https://github.com/opencv/opencv_contrib/issues/3994

### Pull Request Readiness Checklist

- [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-09-12 19:02:37 +03:00
Alexander Smorkalov
095981ca99 Merge pull request #3953 from pratham-mcw:fix/bgsegm-lsbp-arm-failure
bgsegm: Enable __popcnt intrinsic for MSVC on ARM to fix LSBP test failure
2025-09-10 16:14:05 +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
pratham-mcw
2347ac5379 Remove ARM exclusion for __popcnt on MSVC 2025-09-02 10:35:51 +05:30
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
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
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
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
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
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