Commit Graph

24925 Commits

Author SHA1 Message Date
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
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
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