Commit Graph

3352 Commits

Author SHA1 Message Date
Alexander Smorkalov
d4861bfd1f Merge remote-tracking branch 'origin/3.4' into merge-3.4 2023-05-24 14:37:48 +03:00
Akshat Chauhan
c07145fe28
Merge pull request #23662 from akormous:docfix
Fix truncated sentenced in boxPoints documentation #22975 #23662

Resolves #22975

Completed the sentence as per the suggestion given in the issue #22975
### 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
2023-05-24 11:41:25 +03:00
Alexander Smorkalov
98d678c2d2 Added check that YUYV input of cvtColor has even width. 2023-05-23 14:17:43 +03:00
Dmitry Kurtaev
c92135bdd1
Merge pull request #23634 from dkurt:fix_nearest_exact
Fix even input dimensions for INTER_NEAREST_EXACT #23634

### Pull Request Readiness Checklist

resolves https://github.com/opencv/opencv/issues/22204
related: https://github.com/opencv/opencv/issues/9096#issuecomment-1551306017

/cc @Yosshi999

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
2023-05-19 20:32:04 +03:00
Sean McBride
58e4a880a2 Deprecated convertTypeStr and made new variant that also takes the buffer size
This allows removing the unsafe sprintf.
2023-04-26 09:48:15 -04:00
Alexander Smorkalov
e4a29d93fe Merge remote-tracking branch 'origin/3.4' into merge-3.4 2023-04-21 10:55:04 +03:00
Alexander Smorkalov
4c06a721ef
Merge pull request #23503 from seanm:issue13729
Fixed undefined left shifting of negative number
2023-04-20 12:10:04 +03:00
Sean McBride
47bea69322
Merge pull request #23055 from seanm:sprintf2
* Replaced most remaining sprintf with snprintf
* Deprecated encodeFormat and introduced new method that takes the buffer length
* Also increased buffer size at call sites to be a little bigger, in case int is 64 bit
2023-04-18 09:22:59 +03:00
Sean McBride
aa2fabcba5 Fixed undefined left shifting of negative number
Added explicit cast to unsigned before doing the left shift.

This was caught by UBSan which reported things like:

drawing.cpp:361:22: runtime error: left shift of negative value -26214
drawing.cpp:383:22: runtime error: left shift of negative value -78642
2023-04-17 15:39:37 -04:00
Gaotianhong
f1dbc7d724 fix warning in pointPolygonTest 2023-04-13 13:13:27 +08:00
Simon Lynen
6033599c88
Make LineSegmentDetector deterministic by using stable_sort for ordering keypoints prior to region growing
This makes LineSegmentDetector deterministic by using stable_sort for ordering points by norm. Without this change the region growing in LSD is non-determinstic and thus the returned lines are changing between invocations.

This is a replacement for https://github.com/opencv/opencv/pull/23370
2023-03-22 04:12:51 +01:00
Vincent Rabaud
8ad8ec679f
Merge pull request #22441 from vrabaud:hls_while
In case of huge (and probably invalid) input, make sure we do not
rely only on the while loops for truncation.

### 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
2023-03-07 15:05:38 +03:00
Alexander Alekhin
47293f28cf Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2023-02-11 18:35:00 +00:00
Ibai Gorordo
c280cd7290
Merge pull request #23210 from ibaiGorordo:rect_nfa_bugfix
Fix rect_nfa (lsd)

* Fix missing log_gamma in nfa()

Comparing the nfa function with the function in the binomial_nfa repository (https://github.com/rafael-grompone-von-gioi/binomial_nfa/blob/main/C99/log_binomial_nfa.c#L152), the first log_gamma call is missing.

* Fix rect_nfa pixel index

* Replace std::rotate

* Rename tmp to v_tmp

* Replace auto and std::min_element

* Change slope equality check to int

* Fix left limit check
2023-02-08 17:33:06 +00:00
Maksim Shabunin
e4acd74e87 Fix some clang 14 warnings 2023-02-07 01:19:00 +03:00
Alexander Alekhin
d3ae175bca Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2023-01-28 10:01:23 +00:00
Alexander Alekhin
c67d4fc633 Merge pull request #23076 from inayd:22012-bugfixFillPoly 2023-01-28 09:55:02 +00:00
Alexander Alekhin
52855a39ad Merge pull request #23165 from labeeb-7z:optimizeDistanceTransform 2023-01-25 16:52:46 +00:00
Alexander Alekhin
18cbfa4a4f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2023-01-23 00:11:12 +00:00
Labib Asari
35c17f35be removed redundant code 2023-01-21 00:16:48 +05:30
Alexander Alekhin
69020666fe test: reproducible results, enabled 2-channel tests, increased some thresholds 2023-01-19 15:39:33 +03:00
Maksim Shabunin
c1e5c16ff3 Backport C-API cleanup (imgproc) from 5.x 2023-01-16 23:29:50 +03:00
Christoph Rackwitz
a64b51dd94
Merge pull request #23108 from crackwitz:issue-23107
Usage of imread(): magic number 0, unchecked result

* docs: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()

* samples, apps: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()

* tests: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()

* doc/py_tutorials: check imread() result
2023-01-09 09:55:31 +00:00
inayd
54449b614b Fix occuring artifacts in fillPoly 2023-01-03 16:29:13 +01:00
Alexander Alekhin
bc8c912c7a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-12-24 13:54:58 +00:00
Sergei Shutov
1339c7f30c Define the number of dstChannels for Lab, Luv, YCrCb and XYZ conversions 2022-12-23 12:04:30 +02:00
Alexander Alekhin
420db56ffd Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-12-18 02:17:17 +00:00
Alexander Smorkalov
423bc515e5 Integer underflow fix for morphologyEx in Carotene (arm). 2022-12-09 18:08:22 +03:00
Alexander Alekhin
b16f76eede Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-12-03 12:39:41 +00:00
HAN Liutong
a32f2cd24a
Merge pull request #22520 from hanliutong:hsv
Modify the SIMD loop in color_hsv.

* Modify the SIMD loops in color_hsv.

* Add FP supporting in bit logic.

* Add temporary compatibility code.

* Use max_nlanes instead of vlanes for array declaration.

* Use "CV_SIMD || CV_SIMD_SCALABLE".

* Revert the modify of the Universal Intrinsic API

* Fix warnings.

* Use v_select instead of bits manipulation.
2022-11-28 18:28:14 +00:00
Alexander Alekhin
5d14cc68b7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-11-16 16:54:11 +00:00
kallaballa
f5e852cdf0 define the number of dstChannels for HLS and HSV conversion as well 2022-11-11 09:23:28 +01:00
Juha Reunanen
63bff33e85 Fix floodFill for very large images 2022-11-07 13:42:20 +02:00
Zihao Mu
17b98dd005 improve code style and Doc of stackblur. 2022-10-29 17:34:28 +08:00
Alexander Alekhin
028d4d83d3 imgproc: sigma2=sigma1 in top-level function of GaussianBlur 2022-10-28 17:04:53 +00:00
Alexander Alekhin
762481411d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-10-15 16:44:47 +00:00
Alexander Smorkalov
4103567776
Merge pull request #22194 from heavyrain-lzy:fixbug_pyrup
Fix the pyramid bug when src*2 < dst
2022-10-04 15:37:01 +03:00
robin
ed3b56d763 Add warpAffine IPPIW implementation protected by ipp NE flag
Signed-off-by: robin <bin.wang@intel.com>
2022-10-04 08:40:44 +03:00
Alexander Smorkalov
b403d37267
Merge pull request #20379 from zihaomu:stackblur
Add StackBlur for imgproc
2022-09-29 16:24:20 +03:00
Zihao Mu
2918071a3e add stackblur for imgproc. 2022-09-28 17:47:32 +08:00
Sean McBride
1829eba584 Fixed most clang -Wextra-semi warnings 2022-09-27 18:06:46 -04:00
catree
c34c4b50d0 Add information about the disparity-to-depth mapping matrix. Add more references about other related functions in the calib3d doc. 2022-09-26 18:40:18 +02:00
Alexander Alekhin
2e15582799 build: eliminate uninitialized warnings from GCC12 2022-09-14 11:58:43 +00:00
wxsheng
4154bd0667
Add Loongson Advanced SIMD Extension support: -DCPU_BASELINE=LASX
* Add Loongson Advanced SIMD Extension support: -DCPU_BASELINE=LASX
* Add resize.lasx.cpp for Loongson SIMD acceleration
* Add imgwarp.lasx.cpp for Loongson SIMD acceleration
* Add LASX acceleration support for dnn/conv
* Add CV_PAUSE(v) for Loongarch
* Set LASX by default on Loongarch64
* LoongArch: tune test threshold for Core/HAL.mat_decomp/15

Co-authored-by: shengwenxue <shengwenxue@loongson.cn>
2022-09-10 09:39:43 +03:00
Alexander Smorkalov
b26fc6f31b
Merge pull request #22466 from sturkmen72:patch-4
Improvement on error handling for HoughCircles
2022-09-06 12:01:59 +03:00
Suleyman TURKMEN
22eb91a7e0 Update hough.cpp 2022-09-05 18:58:20 +03:00
Alexander Smorkalov
448e3a7e58
Merge pull request #22226 from ocpalo:libspng
[GSoC 2022] spng encoder/decoder added as optional png codec
2022-09-05 13:25:41 +03:00
Alexander Smorkalov
a72074b33f
Merge pull request #22164 from lamm45:hough-angles
Fix angle discretization in Hough transforms
2022-08-31 12:23:52 +03:00
lamm45
1f0bfc8d83 Fix angle discretization in Hough transforms
In some situations the last value was missing from the discrete theta
values. Now, the last value is chosen such that it is close to the
user-provided maximum theta, while the distance to pi remains always
at least theta_step/2. This should avoid duplicate detections.

A better way would probably be to use max_theta as is and adjust the
resolution (theta_step) instead, such that the discretization would
always be uniform (in a circular sense) when full angle range is used.
2022-08-30 18:46:16 -04:00
Berke
3929e26276 spng encoder/decoder added as optional png codec 2022-08-29 00:03:43 +03:00