Commit Graph

35188 Commits

Author SHA1 Message Date
Suleyman TURKMEN
ca51d55ee3 minor improvement for better code readibility 2025-01-24 15:31:53 +03:00
Gou Minghao
9bb01e799f
Merge pull request #26669 from GouMinghao:4.x
solvePnPRansac implementation for Fisheye camera model #26669

Related: https://github.com/opencv/opencv/pull/25028

### 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
2025-01-24 14:51:10 +03:00
Pierre Chatelier
3cbb4acd2d
Merge pull request #26836 from chacha21:thresholding_compute_threshold_only
Add cv::THRESH_DRYRUN flag to get adaptive threshold values without thresholding #26836

A first proposal for #26777

Adds a `cv::THRESH_DRYRUN` flag to let cv::threshold() compute the threshold (useful for OTSU/TRIANGLE), but without actually running the thresholding. This flags is a proposal instead of a new function cv::computeThreshold()

- [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-01-24 14:25:21 +03:00
Kumataro
ab77e1cfc8
Merge pull request #26678 from Kumataro:fix26673
OpenEXR 2.2 or earlier cannot be used with C++17 or later #26678

Close https://github.com/opencv/opencv/issues/26673
Close https://github.com/opencv/opencv/issues/25313

### 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-24 14:18:29 +03:00
Alexander Smorkalov
9a77bef92b
Merge pull request #26832 from vrabaud:png
Move the checks to read_chunk.
2025-01-24 12:53:09 +03:00
Alexander Smorkalov
a3e95ec6d0
Merge pull request #26660 from NekoAsakura:4.x
Cocoa/highgui: replace with `@autoreleasepool` blocks
2025-01-24 11:34:27 +03:00
Vincent Rabaud
4e4eaea9a3 Move the checks to read_chunk.
Only user chunks need to be compared to PNG_USER_CHUNK_MALLOC_MAX
2025-01-23 16:37:46 +01:00
Alexander Smorkalov
4a4031dc48
Merge pull request #26601 from dai-xin:4.x
VideoCapture open camera slow
2025-01-22 20:48:29 +03:00
Rüdiger Ihle
c623a5afc1
Merge pull request #26646 from warped-rudi:refactoring
Android camera refactoring #26646

This patch set does not contain any functional changes. It just cleans up the code structure to improve readability and to prepare for future changes.

* videoio(Android): Use 'unique_ptr' instead of 'shared_ptr'
Using shared pointers for unshared data is considered an antipattern.
* videoio(Android): Make callback functions private static members
Don't leak internal functions into global namespace. Some member
variables are now private as well.
* videoio(Android): Move resolution matching into separate function
Also make internally used member functions private.
* videoio(Android): Move ranges query into separate function
Also remove some unneccessary initialisations from initCapture().
* videoio(Android): Wrap extremly long source code lines
* videoio(Android): Rename members of 'RangeValue'

### 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-22 16:58:14 +03:00
Vincent Rabaud
7728dd3387
Merge pull request #26782 from vrabaud:png_leak
Fix potential READ memory access #26782

This fixes https://oss-fuzz.com/testcase-detail/4923671881252864 and https://oss-fuzz.com/testcase-detail/5048650127966208

### 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-22 14:47:28 +03:00
Skreg
f6aa472acc
Merge pull request #26800 from shyama7004:fix-cap-orientation-auto-default
Fixed default cap_prop_orientation_auto behaviour #26800

Fixes : #26795

### 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-22 13:55:48 +03:00
Skreg
055dbbb848
Merge pull request #26815 from shyama7004:fix-deprecation
Replaced sprintf with snprintf #26815

Fixes : #26814

### 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-22 13:53:59 +03:00
Maxim Smolskiy
8ab0ad6e1b
Merge pull request #26810 from MaximSmolskiy:improve-robustness-for-fitEllipseAMS
Improve robustness for fitEllipseAMS #26810

### Pull Request Readiness Checklist

Related to #26694 

Added functionality to add noise to points in degenerate cases and try again for `fitEllipseAMS`. `fitEllipseNoDirect` and `fitEllipseDirect` already have this

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-01-22 12:49:12 +03:00
Kumataro
ea023b72ce
Merge pull request #26788 from Kumataro:fix26767
jpegxl: support cv::IMREAD_UNCHANGED and other ImreadFlags #26788

Close https://github.com/opencv/opencv/issues/26767

### 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-01-22 10:50:43 +03:00
Suleyman TURKMEN
db962ea069
Merge pull request #26813 from sturkmen72:fix_animation
Added CV_WRAP to Animation struct #26813

closes #26808
### 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-22 10:40:08 +03:00
Alexander Smorkalov
459bb12466
Merge pull request #26778 from vidipsingh:doc-fix-fontscale-behavior-puttext
Added fontScale behavior description to putText() documentation
2025-01-21 11:21:42 +03:00
Skreg
fe9405e8c0
Merge pull request #26806 from shyama7004:fix-typo
* fix a small typo

* removal of unused variable
2025-01-20 17:14:27 +03:00
Maxim Smolskiy
a2a3f5e86c
Merge pull request #26773 from MaximSmolskiy:improve-robustness-for-ellipse-fitting
Improve robustness for ellipse fitting #26773

### Pull Request Readiness Checklist

Related to #26694 

Current noise addition is not very good because for example it turns degenerate case of one horizontal line into degenerate case of two parallel horizontal lines

Improving noise addition leads to improved robustness of algorithms

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-01-20 14:25:40 +03:00
Alexander Smorkalov
6f24d755f2
Merge pull request #26798 from brad0:opencv_powerpc_elf_aux_info
Add CMake checks for getauxval and elf_aux_info for POWER
2025-01-20 13:33:46 +03:00
Alexander Smorkalov
2db6b29a76
Merge pull request #26787 from MaximSmolskiy:fix_memory_leaks_for_JpegXLDecoder
Fix memory leaks for JpegXLDecoder
2025-01-20 13:33:10 +03:00
Alexander Smorkalov
5949cb10ee
Merge pull request #26793 from UnnamedOrange:4.x
Fix an is-empty condition in FFmpeg video capture when parsing FFmpeg options defined in the environment variables
2025-01-20 11:30:42 +03:00
Kumataro
3e1fafefbe
Merge pull request #26802 from Kumataro:fix26801
3rdparty:ittnotify: update to v3.25.4 #26802

Close https://github.com/opencv/opencv/issues/26801
See https://github.com/opencv/opencv/pull/26797

### 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-20 10:54:13 +03:00
Alexander Smorkalov
133fda3c56
Merge pull request #26803 from brad0:opencl_openbsd
OpenCL: OpenBSD build fix
2025-01-20 09:31:46 +03:00
Alexander Smorkalov
16cbdcf582
Merge pull request #26805 from MaximSmolskiy:fix-typo-in-matchTemplate-description
Fix typo in matchTemplate description
2025-01-20 09:28:12 +03:00
Brad Smith
918196ec1b Add CMake checks for getauxval and elf_aux_info for POWER
- Change __unix__ check for feature detection. NetBSD does not
have either API.
- Adds support for OpenBSD/powerpc64.
2025-01-19 13:27:20 -05:00
MaximSmolskiy
500e1ff763 Fix typo in matchTemplate description 2025-01-19 17:31:03 +03:00
Brad Smith
93023e1a68 OpenCL: OpenBSD build fix 2025-01-19 02:46:25 -05:00
Maksim Shabunin
3effe195cb
Merge pull request #26786 from mshabunin/fix-ppc64-gcc15
core: fixed VSX build with GCC 15
2025-01-18 16:13:28 +03:00
UnnamedOrange
8482caf348 Fix an is-empty condition in FFmpeg video capture 2025-01-18 17:01:22 +08:00
MaximSmolskiy
b7e1cba660 Fix memory leaks for JpegXLDecoder 2025-01-17 00:39:32 +03:00
Maksim Shabunin
63ef786a3a core: fixed VSX build with GCC 15 2025-01-16 23:48:29 +03:00
Neko Asakura
eff12685c5 Cocoa/highgui: replace with @autoreleasepool blocks and clean up extraneous comments 2025-01-16 11:40:41 +08:00
Vidip Singh
6ba8f4838b Added fontScale behavior description to putText() documentation
- Updated the documentation of the putText function to clarify the behavior of the fontScale parameter.
- Explained how fontScale affects text rendering: magnifying (>1), minimizing (<1), and mirroring (<0).
2025-01-15 19:17:29 +05:30
Alexander Smorkalov
1d701d1690
Merge pull request #26776 from vrabaud:ub_warp
Don't overflow pointer addition
2025-01-15 15:19:19 +03:00
Vincent Rabaud
e76924ef0d Don't overflow pointer addition
In both cases we add negative value (as unsigned type), so
pointer addition wraps, which is undefined behavior.
2025-01-15 11:07:43 +01:00
Alexander Smorkalov
796adf5dc6
Merge pull request #26769 from y-guyon:patch-1
Avoid adding value to nullptr
2025-01-14 19:06:52 +03:00
Alexander Smorkalov
1a6ef7e08c
Merge pull request #26765 from asmorkalov:as/android_vulkan_build_fix
Fixed Android build with Vulkan support.
2025-01-14 16:23:22 +03:00
Yannis Guyon
b62ab874d1
Avoid adding value to nullptr
This UB can be avoided by postponing calculation until needed.
2025-01-14 10:50:53 +01:00
Alexander Smorkalov
534243647e Fixed Android build with Vulkan support. 2025-01-13 21:13:22 +03:00
Alexander Smorkalov
342ced1e04
Merge pull request #26763 from vrabaud:remove_c
Remove useless C headers
2025-01-13 20:23:10 +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
Alexander Smorkalov
bb79493a89
Merge pull request #26750 from mshabunin:fix-ppc64-vsx
core: fixed VSX intrinsics implementation
2025-01-11 09:40:21 +03:00