Commit Graph

25032 Commits

Author SHA1 Message Date
Alexander Smorkalov
534243647e Fixed Android build with Vulkan support. 2025-01-13 21:13:22 +03:00
Vincent Rabaud
bfb54aa691 Remove useless C headers 2025-01-13 16:34:28 +01:00
Alexander Smorkalov
6931a4cc06
Merge pull request #26744 from Diego1V:fixHoughSIGSEGV
Fix #26086 - Update types inside HoughLinesProbabilistic
2025-01-13 13:05:21 +03:00
Skreg
08a88816ed
Merge pull request #26753 from shyama7004:RotatedMarkers
Fix rotated aruco marker board generation #26753

### Issue : [25884](https://github.com/opencv/opencv/issues/25884)
### 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
2025-01-13 10:51:03 +03:00
Alexander Smorkalov
d6f60d4ab8
Merge pull request #26757 from shyama7004:test-fix
fix threshold for photo_calibratedebevec regression test
2025-01-13 10:25:18 +03:00
Diego1V
052b2c43c3 Update types inside HoughLinesProbabilistic in order to handle great images. 2025-01-13 09:36:44 +03:00
shyama7004
5b7b887200 Photo_CalibrateDebevec.regression-fix 2025-01-12 19:45:22 +05:30
Maksym Ivashechkin
e29a70c17f
Merge pull request #26742 from ivashmak:fix_homography_inliers
Bug fix for #25546 - Updating inliers for homography estimation #26742

Fixes #25546

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2025-01-11 18:08:58 +03:00
Super
2c2866a7a6
Merge pull request #26738 from redhecker:fix
Fix bugs in GIF decoding #26738 

### Pull Request Readiness Checklist

this is related to #25691 

i solved two bugs here:

1. the decoding setting:
according to [https://www.w3.org/Graphics/GIF/spec-gif89a.txt](https://www.w3.org/Graphics/GIF/spec-gif89a.txt)

```
    DEFERRED CLEAR CODE IN LZW COMPRESSION

    There has been confusion about where clear codes can be found in the
    data stream.  As the specification says, they may appear at anytime.  There
    is not a requirement to send a clear code when the string table is full.

    It is the encoder's decision as to when the table should be cleared.  When
    the table is full, the encoder can chose to use the table as is, making no
    changes to it until the encoder chooses to clear it.  The encoder during
    this time sends out codes that are of the maximum Code Size.

    As we can see from the above, when the decoder's table is full, it must
    not change the table until a clear code is received.  The Code Size is that
    of the maximum Code Size.  Processing other than this is done normally.

    Because of a large base of decoders that do not handle the decompression in
    this manner, we ask developers of GIF encoding software to NOT implement
    this feature until at least January 1991 and later if they see that their
    particular market is not ready for it.  This will give developers of GIF
    decoding software time to implement this feature and to get it into the
    hands of their clients before the decoders start "breaking" on the new
    GIF's.  It is not required that encoders change their software to take
    advantage of the deferred clear code, but it is for decoders.
```
at first i didn't consider this case, thus leads to a bug discussed in #25691. the changes made in function lzwDecode() is aiming at solving this.

2. the fetch method of loopCount:
in the codes at https://github.com/opencv/opencv/blob/4.x/modules/imgcodecs/src/grfmt_gif.cpp#L410, if the branch is taken, 3 more bytes will be taken, leading to unpredictable behavior.

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
2025-01-11 10:34:49 +03:00
Alexander Smorkalov
1e31f8047d
Merge pull request #26748 from vrabaud:png_leak
Fix remaining bugs in PNG reader
2025-01-11 10:21:38 +03:00
Vincent Rabaud
ee86f1c969 Fix remaining bugs in PNG reader
- free chunk before a potential longjmp
- do not try to allocate when the chunk is > PNG_USER_CHUNK_MALLOC_MAX
2025-01-10 17:04:39 +01:00
Maksim Shabunin
97f3f39066 core: fixed VSX intrinsics implementation 2025-01-10 18:34:11 +03:00
Skreg
f00814e38d
Merge pull request #26602 from shyama7004:minor-fix
Improved dumpVector, cv::Rect operator<< and exceptions #26602

- Applied format for vector element formatting to ensure consistent and clear output representation.  
- Moved `operator<<` to the `cv` namespace to align with OpenCV's coding standards and improve maintainability.  
- Enhanced error handling by including detailed exception messages using `e.what()` for better debugging.  

### 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-01-10 15:02:18 +03:00
Junrou Nishida
85f9ac4e23
Merge pull request #26713 from homuler:fix/build-ios-framework
Ensure Obj-C header files are generated correctly if under /private/var #26713

Fix #26712 

### 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-01-10 14:48:56 +03:00
Alexander Smorkalov
68187de4ad
Merge pull request #26741 from shyama7004:minor-update
added POST_BUILD to add_custom_command in python_loader.cmake to avoid warning
2025-01-10 13:39:58 +03:00
Vincent Rabaud
d12fa37eed
Merge pull request #26739 from vrabaud:png_leak
Add more boundary checks. #26739

Also fix a bug in read_chunk where we could end up with png_get_uint_32(len) + 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
- [ ] 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-01-10 11:33:43 +03:00
shyama7004
05bc484eed addition of POST_BUILD 2025-01-09 20:40:56 +05:30
Alexander Smorkalov
bdb6a968ce
Merge pull request #26706 from Kumataro:fix26705
imgcodecs: fix EXR tests
2025-01-09 15:46:52 +03:00
Alexander Smorkalov
7e7c75e239
Merge pull request #26737 from shyama7004:minor-change
minor change
2025-01-09 15:14:28 +03:00
shyama7004
938f89a20e minor change 2025-01-08 20:17:17 +05:30
Alexander Smorkalov
d744296bbd Merge branch 'as/release_4.11.0' into 4.x 2025-01-08 17:25:28 +03:00
Alexander Smorkalov
31b0eeea0b Release 4.11.0 2025-01-08 15:47:46 +03:00
Alexander Smorkalov
198f23890e Fixed fread size check for corrupted PNGs. 2025-01-08 14:23:43 +03:00
Alexander Smorkalov
66ffeae4b1
Merge pull request #26728 from vrabaud:png_behavior
Fix behavior change when PNG buffer is incomplete.
2025-01-08 13:23:02 +03:00
Alexander Smorkalov
38b86591ba
Merge pull request #26729 from MaximSmolskiy:change-article-for-fitEllipseDirect-function
Change article for fitEllipseDirect function
2025-01-08 12:14:45 +03:00
Vincent Rabaud
cb959b3915 Fix behavior change when PNG buffer is incomplete. 2025-01-08 09:11:38 +01:00
Alexander Smorkalov
e34eff9ab2
Merge pull request #26721 from MaximSmolskiy:fix-comment-for-fitEllipse-Java-case-accurracy-test
Fix comment for fitEllipse Java case accurracy test
2025-01-08 11:09:32 +03:00
Alexander Smorkalov
0dfd2b3628
Merge pull request #26719 from MaximSmolskiy:remove-code-duplication-from-tests-for-ellipse-fitting
Remove code duplication from tests for ellipse fitting
2025-01-08 11:07:55 +03:00
Alexander Smorkalov
4b35101d55
Merge pull request #26720 from vrabaud:png_leak
Use RAII to avoid leaks in PNG reader.
2025-01-08 10:57:28 +03:00
MaximSmolskiy
0331af01ae Change article for fitEllipseDirect function 2025-01-07 22:24:48 +03:00
Vincent Rabaud
0e3d71b0e0 Remove extra /* in /**/ comment 2025-01-07 11:49:30 +01:00
MaximSmolskiy
9b85ab0a63 Fix comment for fitEllipse Java case accurracy test 2025-01-06 19:14:57 +03:00
Vincent Rabaud
d86387347d Use RAII to avoid leaks in PNG reader. 2025-01-06 16:42:30 +01:00
MaximSmolskiy
56dd9d51b1 Remove code duplication from tests for ellipse fitting 2025-01-06 17:13:32 +03:00
Masahiro Ogawa
fc994a6ae8
Merge pull request #21407 from sensyn-robotics:feature/weighted_hough
Feature: weighted Hough Transform #21407

### 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 other license that is incompatible with OpenCV
- [x] The PR is proposed to proper branch
- [x] There is reference to 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-01-06 15:35:35 +03:00
Suleyman TURKMEN
2aee94752a
Merge pull request #26714 from sturkmen72:png
Fix for png durations and memory leak #26714

### 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-01-06 14:25:08 +03:00
Alexander Smorkalov
904dbe9555
Merge pull request #26716 from MaximSmolskiy:fix-tests-for-ellipse-fitting
Fix tests for ellipse fitting
2025-01-06 14:07:29 +03:00
Alexander Smorkalov
ad36f68500 Fixed some memory leaks in PNG/APNG implementation. 2025-01-06 10:41:33 +03:00
Souriya Trinh
5000ec50db Add examples for each cv::BorderTypes enum types to better illustrate the result of each method in the documentation. 2025-01-06 03:57:35 +01:00
MaximSmolskiy
3e534bb7c8 Fix tests for ellipse fitting 2025-01-06 01:27:06 +03:00
Alexander Smorkalov
ff18c9cc79
Merge pull request #26688 from sturkmen72:gif-png-webp-avif
Animated GIF APNG WEBP AVIF revisions
2025-01-04 16:44:14 +03:00
Rüdiger Ihle
a6f72f813d
Merge pull request #26698 from warped-rudi:mediandk2
AndroidMediaNdkVideoWriter pixel format enhancement #26698

* videoio(Android): Add source pixel formats RGBA and GRAY to AndroidMediaNdkVideoWriter

Let AndroidMediaNdkVideoWriter::write() deduce source pixel format from matrix type:

CV_8UC3 -> BGR   (as before)
CV_8UC4 -> RGBA  (use in conjunction with CvCameraViewFrame)
CV_8UC1 -> GRAY

* samples/android/video-recorder: Send images to VideoWriter in RGBA format

### 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-01-03 17:53:00 +03:00
Alexander Smorkalov
f65006eee1
Merge pull request #26699 from vrabaud:bmp_overflow
Fix integer overflow in in cv::BmpDecoder::readHeader
2025-01-03 14:43:23 +03:00
Suleyman TURKMEN
b4d0325666 GIF APNG WEBP AVIF revisions 2025-01-03 14:29:18 +03:00
Vincent Rabaud
0538e64b13
Fix leaks in cv:Merge pull request #26701 from vrabaud:png_leak
Fix leaks in cv::PngDecoder #26701

Bug: oss-fuzz:386688709

### 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-01-03 14:13:18 +03:00
Vincent Rabaud
845616d82c Fix integer overflow in in cv::BmpDecoder::readHeader
Bug: oss-fuzz:371546812
2025-01-03 08:59:43 +01:00
Alexander Smorkalov
5e1eed5026
Merge pull request #26700 from vrabaud:png_buffer_overflow
Fix heap buffer overflow in cv::PngDecoder::read_from_io
2025-01-03 10:39:23 +03:00
Kumataro
1281317e17 imgcodecs: fix EXR tests 2025-01-03 09:53:01 +09:00
Vincent Rabaud
2f0035b23f Fix flaky Imgcodecs_APNG.imwriteanimation_bgcolor 2025-01-02 22:53:06 +01:00
Vincent Rabaud
12963ea699 Fix heap buffer overflow in cv::PngDecoder::read_from_io
Bug: oss-fuzz:386688710
2025-01-02 14:51:20 +01:00
Alexander Smorkalov
4d26e16af8
Merge pull request #26690 from MaximSmolskiy:speed-up-and-reduce-memory-consumption-for-findContours
Speed up and reduce memory consumption for findContours
2024-12-31 12:31:11 +03:00
cDc
1db982780f
Merge pull request #26379 from cdcseacave:jxl_codec
Add jxl (JPEG XL) codec support #26379

### Pull Request Readiness Checklist

Related CI and Docker changes:
- https://github.com/opencv/ci-gha-workflow/pull/190
- https://github.com/opencv-infrastructure/opencv-gha-dockerfile/pull/44

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 https://github.com/opencv/opencv/issues/20178
- [ ] 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-12-31 11:56:35 +03:00
Alexander Smorkalov
c803aa2ddd
Merge pull request #26057 from asmorkalov:as/android_16k_pages
Android builds update #26057

Fixes https://github.com/opencv/opencv/issues/26027
Should also address https://github.com/opencv/opencv/issues/26542
 
Changes:
- Switched to Android build tools 34, NDK 26d, target API level 34 (required by Google Play).
- Use flexible page size on Android by default to support Android 15+.
- Dummy stub for R and BuildConfig classes for javadoc.
- Java 17 everywhere.
- Strict ndkVersion and ABI list in release package.

Related:
- Docker: https://github.com/opencv-infrastructure/opencv-gha-dockerfile/pull/41
- Pipeline: https://github.com/opencv/ci-gha-workflow/pull/183

Related IPP issue with NDK 27+: https://github.com/opencv/opencv/issues/26072

Google documentation for 16kb pages support : https://developer.android.com/guide/practices/page-sizes?hl=en

### 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-12-31 11:53:04 +03:00
Alexander Smorkalov
d2264d5868 Tune threshold to stabinlize test with Vulkan backend. 2024-12-31 10:23:13 +03:00
MaximSmolskiy
f15fa21c6b Speed up and reduce memory consumption for findContours 2024-12-31 02:49:15 +03:00
Suleyman TURKMEN
8bc65a1d13
Merge pull request #25715 from sturkmen72:apng_support
Animated PNG Support #25715

Continues https://github.com/opencv/opencv/pull/25608

### 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
2024-12-30 11:32:31 +03:00
Rüdiger Ihle
d39aae6bdf
Merge pull request #26656 from warped-rudi:mediandk
AndroidMediaNdkCapture pixel format enhancement #26656

### 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
- [ 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-12-30 11:09:11 +03:00
Alexander Smorkalov
9c33baebbd
Merge pull request #26675 from hanliutong:rvv-hal-fix
Add test cases and fix bugs in the RISC-V Vector HAL.
2024-12-29 18:09:21 +03:00
Alexander Alekhin
1b48eafe48 Merge pull request #26672 from opencv-pushbot:gitee/alalek/update_ffmpeg_4.x 2024-12-29 01:42:29 +00:00
Liutong HAN
b31f7694c5 Add test cases and fix bugs in the RVV HAL. 2024-12-27 08:39:52 +00:00
Alexander Smorkalov
707ab39454
Merge pull request #26164 from CSBVision:patch-7
Update haveCUDA() to detect CUDA support at runtime
2024-12-26 15:56:03 +03:00
Alexander Alekhin
4c7ea70051 videoio(test): re-enable FFmpeg tests on WIN32
- related PR25874
2024-12-26 12:29:45 +00:00
Alexander Alekhin
09892c9d17 fix FFmpeg wrapper build 2024-12-26 12:15:46 +00:00
Dmitry Kurtaev
e9982e856f
Merge pull request #25584 from dkurt:videocapture_from_buffer
Open VideoCapture from data stream #25584

### Pull Request Readiness Checklist

Add VideoCapture option to read a raw binary video data from `std::streambuf`.

There are multiple motivations:
1. Avoid disk file creation in case of video already in memory (received by network or from database).
2. Streaming mode. Frames decoding starts during sequential file transfer by chunks.

Suppoted backends:
* FFmpeg
* MSMF (no streaming mode)

Supporter interfaces:
* C++ (std::streambuf)
* Python (io.BufferedIOBase)

resolves https://github.com/opencv/opencv/issues/24400

- [x] test h264
- [x]  test IP camera like approach with no metadata but key frame only?
- [x] C API plugin

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
2024-12-26 12:48:49 +03:00
WangWeiLin-MV
fe649f4adb Add include chrono gstreamersource.cpp 2024-12-24 06:53:30 +00:00
Maksim Shabunin
0756dbfe3d RISC-V: enabled intrinsics in dotProd, relaxed test thresholds 2024-12-24 00:58:54 +03:00
Alexander Smorkalov
b42075f3e2
Merge pull request #26664 from asmorkalov:update_version_4.11.0-pre
pre: OpenCV 4.11.0 (version++)
2024-12-23 15:34:39 +03:00
Alexander Smorkalov
a2ce9e1bac pre: OpenCV 4.11.0 (version++) 2024-12-23 13:58:08 +03:00
Maksim Shabunin
ec2208f5f7 dnn: remove obsolete OV models tests 2024-12-23 12:59:33 +03:00
FantasqueX
4efd52f676
Merge pull request #26650 from FantasqueX:fix-26642
Use size_t when calculating size of all_points #26650

Closes: #26642 

Asan log
```
=================================================================
==41401==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7fc55a02a3fc at pc 0x7fc58e304131 bp 0x7ffd54787b00 sp 0x7ffd54787af8
WRITE of size 4 at 0x7fc55a02a3fc thread T0
    #0 0x7fc58e304130 in cv::QRDetectMulti::checkSets(std::vector<std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >, std::allocator<std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > > > >&, std::vector<std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >, std::allocator<std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > > > >&, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >&) /home/fanta/source/opencv/modules/objdetect/src/qrcode.cpp:3726
    #1 0x7fc58e3054b0 in cv::QRDetectMulti::localization() /home/fanta/source/opencv/modules/objdetect/src/qrcode.cpp:3829
    #2 0x7fc58e308020 in cv::ImplContour::detectMulti(cv::_InputArray const&, cv::_OutputArray const&) const /home/fanta/source/opencv/modules/objdetect/src/qrcode.cpp:3987
    #3 0x7fc58e30b5b1 in cv::ImplContour::detectAndDecodeMulti(cv::_InputArray const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, cv::_OutputArray const&, cv::_OutputArray const&) const /home/fanta/source/opencv/modules/objdetect/src/qrcode.cpp:4176
    #4 0x7fc58e28922f in cv::GraphicalCodeDetector::detectAndDecodeMulti(cv::_InputArray const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, cv::_OutputArray const&, cv::_OutputArray const&) const /home/fanta/source/opencv/modules/objdetect/src/graphical_code_detector.cpp:42
    #5 0x5954e8 in Body /home/fanta/source/opencv/modules/objdetect/test/test_qrcode.cpp:48
    #6 0x594fc0 in TestBody /home/fanta/source/opencv/modules/objdetect/test/test_qrcode.cpp:42
    #7 0x67ee6a in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/fanta/source/opencv/modules/ts/src/ts_gtest.cpp:3919
    #8 0x6734a4 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/fanta/source/opencv/modules/ts/src/ts_gtest.cpp:3955
    #9 0x641fe8 in testing::Test::Run() /home/fanta/source/opencv/modules/ts/src/ts_gtest.cpp:3993
    #10 0x6431ac in testing::TestInfo::Run() /home/fanta/source/opencv/modules/ts/src/ts_gtest.cpp:4169
    #11 0x643d15 in testing::TestCase::Run() /home/fanta/source/opencv/modules/ts/src/ts_gtest.cpp:4287
    #12 0x659ff3 in testing::internal::UnitTestImpl::RunAllTests() /home/fanta/source/opencv/modules/ts/src/ts_gtest.cpp:6662
    #13 0x681205 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/fanta/source/opencv/modules/ts/src/ts_gtest.cpp:3919
    #14 0x675127 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/fanta/source/opencv/modules/ts/src/ts_gtest.cpp:3955
    #15 0x65734c in testing::UnitTest::Run() /home/fanta/source/opencv/modules/ts/src/ts_gtest.cpp:6271
    #16 0x5907f0 in RUN_ALL_TESTS() /home/fanta/source/opencv/modules/ts/include/opencv2/ts/ts_gtest.h:22240
    #17 0x590cdd in main (/home/fanta/source/opencv-build-4.x-clang/bin/opencv_test_objdetect+0x590cdd) (BuildId: a9363fc788d57c48225fc0559ac9199d07d415db)
    #18 0x7fc58ab242ad in __libc_start_call_main (/lib64/libc.so.6+0x2a2ad) (BuildId: 03f1631dc9760d3e30311fe62e15cc4baaa89db7)
    #19 0x7fc58ab24378 in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x2a378) (BuildId: 03f1631dc9760d3e30311fe62e15cc4baaa89db7)
    #20 0x417014 in _start ../sysdeps/x86_64/start.S:115

0x7fc55a02a3fc is located 0 bytes after 2938510332-byte region [0x7fc4aadc8800,0x7fc55a02a3fc)
allocated by thread T0 here:
    #0 0x7fc58e590298 in operator new(unsigned long) (/lib64/libasan.so.8+0xfd298) (BuildId: da72ee674d801ced58193987786b90646d94ff8d)
    #1 0x7fc58e34d010 in std::__new_allocator<cv::Vec<int, 3> >::allocate(unsigned long, void const*) /usr/include/c++/14/bits/new_allocator.h:151

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/fanta/source/opencv/modules/objdetect/src/qrcode.cpp:3726 in cv::QRDetectMulti::checkSets(std::vector<std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >, std::allocator<std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > > > >&, std::vector<std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >, std::allocator<std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > > > >&, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >&)

Shadow bytes around the buggy address:
  0x7fc55a02a100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7fc55a02a180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7fc55a02a200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7fc55a02a280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7fc55a02a300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x7fc55a02a380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00[04]
  0x7fc55a02a400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7fc55a02a480: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7fc55a02a500: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7fc55a02a580: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7fc55a02a600: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==41401==ABORTING
```

`(true_points_group[i].size()` is 1794 and `(true_points_group[i].size() - 2 ) * (true_points_group[i].size() - 1) * true_points_group[i].size())` is 5764222464 which overflows `int`

### 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-12-23 11:36:39 +03:00
alexlyulkov
aa52dafc90
Merge pull request #26127 from alexlyulkov:al/blob-from-images
Faster implementation of blobFromImages for cpu nchw output #26127

Faster implementation of blobFromImage and blobFromImages for
HWC cv::Mat images -> NCHW cv::Mat
case

Running time on my pc in ms:

**blobFromImage**
```
image size            old        new   speed-up
32x32x3             0.008      0.002       4.0x
64x64x3             0.021      0.009       2.3x
128x128x3           0.164      0.037       4.4x
256x256x3           0.728      0.158       4.6x
512x512x3           3.310      0.628       5.2x
1024x1024x3        14.503      3.124       4.6x
2048x2048x3        61.647     28.049       2.2x
```

**blobFromImages**
```
image size            old        new   speed-up
16x32x32x3          0.122      0.041       3.0x
16x64x64x3          0.790      0.165       4.8x
16x128x128x3        3.313      0.652       5.1x
16x256x256x3       13.495      3.127       4.3x
16x512x512x3       58.795     28.127       2.1x
16x1024x1024x3    251.135    121.955       2.1x
16x2048x2048x3   1023.570    487.188       2.1x
```


### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-12-23 10:04:34 +03:00
Suleyman TURKMEN
d9a139f9e8
Merge pull request #25608 from sturkmen72:animated_webp_support
Animated WebP Support #25608

related issues #24855 #22569 

### 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-12-20 13:06:28 +03:00
alex-urm
0903061589
Merge pull request #25500 from alex-urm:v4l_default_image_size
V4l default image size #25500

Added ability to set default image width and height for V4L capture.  This is required for cameras that does not support 640x480 resolution because otherwise V4L capture cannot be opened and failed with "Pixel format of incoming image is unsupported by OpenCV" and then with "can't open camera by index" message. Because of the videoio architecture it is not possible to insert actions between CvCaptureCAM_V4L::CvCaptureCAM_V4L and CvCaptureCAM_V4L::open so the only way I found is to use environment variables to preselect the resolution.

Related bug report is [#25499](https://github.com/opencv/opencv/issues/25499)
Maybe (but not confirmed) this is also related to [#24551](https://github.com/opencv/opencv/issues/24551)

This fix was made and verified in my local environment: capture board AVMATRIX VC42, Ubuntu 20, NVidia Jetson Orin.

### 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-12-20 11:00:30 +03:00
Alexander Smorkalov
f3d9d56ebe
Merge pull request #26625 from NekoAsakura:4.x
Cocoa/highgui: fix leak in cvGetWindowRect_COCOA
2024-12-20 09:03:33 +03:00
Maksim Shabunin
b53fa94745 videoio: fixed writer setProperty with FFmpeg plugin 2024-12-19 22:04:24 +03:00
Alexander Smorkalov
6a0affdbce
Merge pull request #26147 from vrabaud:opencv_js
js: fix enum generation issues
2024-12-19 17:35:16 +03:00
Alexander Smorkalov
3073ba28cc
Merge pull request #26644 from vrabaud:opencv_js2
js: Fix C preprocessor stringification
2024-12-19 17:05:50 +03:00
Alexander Smorkalov
5baca5275e
Merge pull request #26633 from asmorkalov:as/optional_python_types
Made some pre-defined Python types optional to disable modules
2024-12-19 15:10:08 +03:00
Suleyman TURKMEN
60d35d1bd5
Merge pull request #26511 from sturkmen72:proposed_fix_for_21902
* add alternative flags to cv::seamlessClone

* Update photo.hpp

* Update seamless_cloning.cpp

* Update seamless_cloning_impl.cpp
2024-12-19 11:57:58 +03:00
Alexander Smorkalov
cdad0b7027
Merge pull request #26082 from mshabunin:fix-hal-cvt-functions
imgproc: restore multiplanar conversion functions in cv::hal namespace
2024-12-19 11:56:04 +03:00
Alexander Smorkalov
ebf3c400d2
Merge pull request #26387 from sturkmen72:js-imgproc
Add some functions to OpenCV JS API
2024-12-19 09:45:23 +03:00
Alexander Smorkalov
537a2566cf
Merge pull request #26643 from vrabaud:js_clone_fix
js: Rename Mat::clone binding because it is used in Emscripten.
2024-12-19 08:20:07 +03:00
Maxim Smolskiy
9f64f021de
Merge pull request #26637 from MaximSmolskiy:fix-VideoCapture-fails-to-read-single-image-with-digits-in-name
Fix VideoCapture fails to read single image with digits in name #26637

### Pull Request Readiness Checklist

Fix #26457 

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-12-19 08:17:05 +03:00
Alexander Smorkalov
e747ed11cb
Merge pull request #26645 from FantasqueX:fix-typo-3
fix typo
2024-12-19 08:13:07 +03:00
Alexander Smorkalov
5cd448377a
Merge pull request #26638 from vrabaud:opencv_js1
js: add types included in bound APIs
2024-12-19 08:11:54 +03:00
Vincent Rabaud
79d019b4f1
Merge pull request #26640 from vrabaud:opencv_js3
js: fix generation of "const const" in code #26640

### 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-12-19 07:59:01 +03:00
Letu Ren
428d93114f fix typo 2024-12-19 10:59:17 +08:00
Vincent Rabaud
914a83fa0c Fix enum generation issues. 2024-12-18 22:20:05 +01:00
Vincent Rabaud
a628417f2a Fix C preprocessor stringification 2024-12-18 22:17:08 +01:00
Vincent Rabaud
773bd1a90a Rename Mat::clone binding because it is used in Emscripten.
This is in emscripten 3.1.71 and above, cf
https://github.com/emscripten-core/emscripten/pull/22734
There was a temptative fix upstream to no avail:
https://github.com/emscripten-core/emscripten/pull/23132
2024-12-18 21:52:21 +01:00
Vincent Rabaud
874e57512e js: fix helper.js to not trigger warnings 2024-12-18 11:49:08 +01:00
Vincent Rabaud
1fe9dd0c3b js: add types included in bound APIs
This fixes #25239
2024-12-18 11:43:39 +01:00
Rüdiger Ihle
d369cf6d50
Merge pull request #26627 from warped-rudi:torch
Android camera feature enhancements #26627

Closes https://github.com/opencv/opencv/issues/24687

### 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
2024-12-18 12:16:50 +03:00
Alexander Smorkalov
23f6a9ee3e
Merge pull request #26636 from FantasqueX:fix-re-warning-2
Fix Syntax warning in ts summary.py
2024-12-18 08:54:58 +03:00
Letu Ren
3899a060a3 Fix Syntax warning in ts summary.py 2024-12-18 05:27:10 +08:00
Alexander Smorkalov
7ddc02907e
Merge pull request #26634 from FantasqueX:fix-test-exif-1
Fix test_exif compilation when none of JPEG, PNG, AVIF is enabled
2024-12-17 22:36:42 +03:00
Pierre Chatelier
d77abeddd0
Merge pull request #26472 from chacha21:gpumatnd_step
More convenient GpuMatND constructor #26472

Closes #26471

For convenience, GpuMatND can now accept a step.size() equal to size.size(), as long as the last step is equal to elemSize()

- [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-12-17 17:26:14 +03:00
Letu Ren
2e21e11318 Fix test_exif compilation when non of JPEG, PNG, AVIF is enabled
When none of JPEG, PNG, AVIF is enabled, exif_files is a zero-length
array, which is prohibited by C++ reference.
2024-12-17 21:41:45 +08:00
Vincent Rabaud
e0001903ce
Merge pull request #26490 from vrabaud:4x_calibration_base
Switch calibration.cpp to C++ #26490

The CvLevMarq code has to be kept in order to keep the same accuracy (the C++ solver is not as good).

There are two ways to review this PR: by comparing to the old code, or by checking what is different from the 5.x version (which is the first commit).

### 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
2024-12-17 16:36:14 +03:00
Alexander Smorkalov
a8f4019932 Made some pre-defined Python types optional to disable modules 2024-12-17 15:54:06 +03:00
Neko Asakura
dbb330d7be Cocoa/highgui: fix leak in cvGetWindowRect_COCOA 2024-12-17 22:31:37 +10:00
Alexander Smorkalov
0ca98d437b
Merge pull request #26632 from fengyuentau:dnn/gelu_cann
dnn: Fix CANN build
2024-12-17 15:09:33 +03:00
Yuantao Feng
51ec7fedaf fix build 2024-12-17 10:17:15 +00:00
Kumataro
260f511dfb
Merge pull request #26590 from Kumataro:fix26589
Support C++20 standard #26590

Close https://github.com/opencv/opencv/issues/26589
Related https://github.com/opencv/opencv_contrib/pull/3842
Related: https://github.com/opencv/opencv/issues/20269

- do not arithmetic enums and ( different enums or floating numeric) 
- remove unused variable

### 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
2024-12-17 07:40:27 +03:00
KangJialiang
25fe85bbbb Fix yoloPostProcessing` to handle variable number of classes (nc)
Previously, the yoloPostProcessing function assumed that the number of classes (nc) was fixed at 80. This caused incorrect behavior when a different number of classes was specified, leading to mismatched output shapes.

This update modifies the code to use the provided `nc` value dynamically, ensuring that the output shapes are correctly calculated based on the specified number of classes. This prevents issues when `nc` is not equal to 80 and allows for greater flexibility in model configurations.
2024-12-12 15:41:14 +08:00
anandkaranubc
d85c13bcbb
Merge pull request #26587 from anandkaranubc:fix-nu-svc-parameter-check
Fix #25812: Add error handling for invalid nu parameter in SVM NU_SVC #26587

### 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 [Issue #25812](https://github.com/opencv/opencv/issues/25812)
- [ ] 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-12-10 09:21:25 +03:00
Maksim Shabunin
4ade7931e1 doc: upgraded for compatibility with doxygen 1.12 2024-12-09 23:08:18 +03:00
Alexander Smorkalov
0a2669daba
Merge pull request #26596 from y-guyon:4.x_absl_str
Support string_view in caffe_importer
2024-12-09 18:03:38 +03:00
MurtazaSaherwala
3a8d7ec75a
Merge pull request #26524 from MurtazaSaherwala:DocumentationUpdation
Updated trackbar callback function and improved documentation #26524

This Fixes #26467

Description:
This pull request improve the OpenCV documentation regarding the Trackbar functionality. The current documentation does not provide clear guidance on certain aspects, such as handling the value pointer deprecation and utilizing callback arguments in C. This update addresses those gaps and provides an updated example for better clarity.

Changes:
Updated Documentation:

Clarified the usage of the value pointer and explained how to pass an initial value, since the value pointer is deprecated.
Added more detailed explanations about callback arguments in C, ensuring that users understand how to access and use them in Trackbar callbacks.
Added a note on how to properly handle initial value passing without relying on the deprecated value pointer.
Updated Tutorial Example:

Renamed and used callback function parameters to make them more understandable.
Included a demonstration on how to utilize userdata in the callback function.
Additional Notes:

Removed reliance on the value pointer for updating trackbar values. Users are now encouraged to use other mechanisms as per the current implementation to avoid the runtime warning.

### 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
2024-12-09 16:23:07 +03:00
dai-xin
f825b4d1ab Resolve the issue of slow camera opening when using dshow as the backend for VideoCapture. 2024-12-09 17:55:46 +08:00
Yannis Guyon
1db93911ae
Support string_view in caffe_importer
An upcoming change in Protobuf will change the return types of various
methods like Descriptor::name() and Message::GetTypeName() from const
std::string& or std::string to absl::string_view. This CL fixes users
of those methods to work both before and after the change.
2024-12-09 10:24:01 +01:00
shyama7004
acdb707ba4 Fix typo: rename 'search_widow_size' to 'search_window_size' 2024-12-08 13:41:48 +05:30
Super
082cd7a74e
Merge pull request #25691 from redhecker:gifSupport
[GSoC] Add GIF decode and encode for imgcodecs #25691

this is related to #24855 

we add  gif support for `imread`, `imreadmulti`, `imwrite` and `imwritemulti`

opencv_extra: https://github.com/opencv/opencv_extra/pull/1203

### 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
2024-12-07 10:17:41 +03:00
Letu Ren
ed9d64c9d3 Fix python re warning in gen_objc 2024-12-06 19:54:23 +08:00
Alexander Alekhin
7edfb57f5a videoio(test): filter unstable GStreamer tests
- observed on Ubuntu 24.04
2024-12-06 08:12:36 +00:00
Amir Hassan
23fcea0d33
Merge pull request #26563 from kallaballa:wayland_and_xkbcommon_missing_include_dirs
Missing include directories needed for wayland-util and xkbcommon #26563

See: #26561

### 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-12-04 17:20:15 +03:00
Alexander Smorkalov
03cedee0b0
Merge pull request #26547 from mshabunin:fix-type-cast
Fixed several cases of unaligned pointer cast
2024-12-03 11:08:45 +03:00
Rostislav Vasilikhin
31d04f8fd9 5x5 added for boxfilter perf tests 2024-12-02 16:46:37 +01:00
Maksim Shabunin
c58b6bf11f Fixed several cases of unaligned pointer cast 2024-12-02 16:15:23 +03:00
Maksim Shabunin
f4db63ca71 doc: fixed issue with doxygen 1.12 2024-12-02 12:08:59 +03:00
Suleyman TURKMEN
6eaa77461e add some functions and tests
applyColorMap
approxPolyN
arrowedLine
blendLinear
boxPoints
clipLine
convertMaps
createHanningWindow
divSpectrums
drawMarker
findContoursLinkRuns
fitEllipseAMS
fitEllipseDirect
getFontScaleFromHeight
getRectSubPix
HuMoments
intersectConvexConvex
invertAffineTransform
minEnclosingTriangle
preCornerDetect
rotatedRectangleIntersection
sqrBoxFilter
spatialGradient
stackBlur
2024-12-01 23:17:35 +03:00
Maksim Shabunin
e953fcfaa4 objdetect: fix invalid vector access in QR encoder 2024-11-29 14:40:53 +03:00
Alexander Smorkalov
bef3585245
Merge pull request #26513 from sturkmen72:fix_for_26264
Fix for issue 26264
2024-11-29 14:26:29 +03:00
Philip Lamb
a5f8711ce1
Merge pull request #26537 from artoolkitx:emscripten-build-fixes
Emscripten build fixes #26537

- Corrects typo in Emscripten-only intrinsics header (Fixes https://github.com/opencv/opencv/issues/26536)
- Updates deprecated intrinsic title (as per LLVM final intrinsic name).

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-11-28 09:25:01 +03:00
Alexander Smorkalov
a27d749471
Merge pull request #26516 from asmorkalov:as/pano_component_wrap
Document some stitching methods and enable bindings for them.
2024-11-28 08:19:55 +03:00
Rostislav Vasilikhin
bf914a7681 8uc2 added 2024-11-28 01:59:18 +01:00
Alexander Smorkalov
c8c64f69dd
Merge pull request #26533 from mshabunin:fix-reduce-test
test: fix technical issue with min_element in reduce tests
2024-11-27 09:08:01 +03:00
Alexander Smorkalov
68941ef8e7
Merge pull request #26530 from mshabunin:fix-usac-vector-access
calib3d: fix vector access in USAC
2024-11-26 22:15:05 +03:00
Maksim Shabunin
55b4c2ac59 test: fix technical issue with min_element in reduce tests 2024-11-26 21:55:41 +03:00
Maksim Shabunin
82c45dde5b calib3d: fix vector access in USAC 2024-11-26 16:15:51 +03:00
Alexander Smorkalov
0b01712dd3 Fixed missing include chrono in g-api tests. 2024-11-26 15:22:57 +03:00
Suleyman TURKMEN
b385767c1c Update drawing.cpp and test_contours.cpp 2024-11-25 20:35:20 +03:00
Alexander Smorkalov
65d4112fa5
Merge pull request #26512 from sturkmen72:fix_build_js_warnings
Fix for build_js warnings
2024-11-25 16:05:53 +03:00
Alexander Smorkalov
905cc45f85 Document some stitching methods and enable bindings for them. 2024-11-25 14:03:49 +03:00
Kumataro
5080be6669 doc: fix to supported depth for TIFF 2024-11-24 15:03:58 +09:00
Suleyman TURKMEN
1358af180c fix build_js warnings 2024-11-24 04:24:44 +03:00
Rostislav Vasilikhin
64d3111377
Merge pull request #26459 from savuor:rv/hal_absdiff_scalar
HAL added for absdiff(array, scalar) + related fixes #26459

### This PR changes
* HAL for `absdiff` when one of arguments is a scalar, including multichannel arrays and scalars
* several channels support for HAL `addScalar`
* proper data type check for `addScalar` when one of arguments is a scalar

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-11-19 10:35:49 +03:00
Alexander Smorkalov
64273c8a5b
Merge pull request #26461 from vrabaud:4x_calibration_base
Remove internal calib3d_c_api.h
2024-11-19 09:45:10 +03:00
Alexander Smorkalov
1b0d58a554
Merge pull request #26468 from savuor:rv/warp_perspective_test_border
warpPerspective test: borderType argument fixed
2024-11-18 11:41:18 +03:00
xkszltl
d0c8b36de8
Check existence of OpenEXR version macros before using.
It is introduced in 2.0.1 (not even in 2.0.0) and some old system like CentOS 7 still has 1.7 in stock.
- 60cdff8a6f (diff-c4bae0726aebe410e407db9abd406d9cf2684f82dd8a08f46d84e8b7c35cf22aR67)
2024-11-17 18:37:13 -08:00
Rostislav Vasilikhin
21cb138be8 warpPerspective border type test 2024-11-15 19:28:16 +01:00
Vincent Rabaud
8c6339c04d Remove internal calib3d_c_api.h
The new C++ code is copy/pasted from OpenCV5:
- functions initIntrinsicParams2D, subMatrix (the first 160 lines)
- function prepareDistCoeffs
- the different asserts

Not all the API/code is ported to C++ yet to ease the review.
2024-11-15 09:31:30 +01:00
Alexander Smorkalov
4866811933
Merge pull request #26155 from mshabunin:dnn-dispatch
dnn: use dispatching for Winograd optimizations
2024-11-14 21:28:42 +03:00
Maksim Shabunin
b7e609d5e8 flann: remove unused hdf5 header 2024-11-14 19:44:10 +03:00
Alexander Smorkalov
1ff16cb551 Backport some of C API removal in core module implementation. 2024-11-14 11:24:00 +03:00
Alexander Smorkalov
11a4a06fa4
Merge pull request #26181 from sturkmen72:png_exif_test
Enable PNG exif orientation test
2024-11-13 16:57:18 +03:00
Rostislav Vasilikhin
67f07b16cb
Merge pull request #25624 from savuor:rv/hal_addscalar
HAL added for add(array, scalar) #25624

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-11-13 08:33:19 +03:00
Alexander Smorkalov
ff639d11d4
Merge pull request #26451 from savuor:rv/fix_get_handle
Build fix for opencl_core.cpp
2024-11-12 20:50:48 +03:00
Rostislav Vasilikhin
641f43dd48 build fix 2024-11-12 17:04:42 +01:00
Dmitry Kurtaev
c230841105
Merge pull request #26446 from dkurt:file_storage_empty_and_1d_mat
* Change style of empty and 1d Mat in FileStorage

* Remove misleading 1d Mat test
2024-11-12 17:51:10 +03:00