Commit Graph

34650 Commits

Author SHA1 Message Date
Alexander Smorkalov
ea8c9dc2de
Merge pull request #26062 from asmorkalov:as/pow_ocl_duplicate
Removed duplicated code in Pow implementation that triggers wrong assert on Intel iGPU
2024-08-27 17:04:57 +03:00
Alexander Smorkalov
3803eeecba
Merge pull request #26069 from hanliutong:fix-medianBlur
Enable `CV_SIMD_SCALABLE` for median blur.
2024-08-27 16:52:36 +03:00
Liutong HAN
2d5b0caa77 Enable CV_SIMD_SCALABLE in medianBlur. 2024-08-27 02:51:08 +00:00
Hao Chen
5638c38d53 Resolve compilation bug
Fixed a bug that occurred when compiling with the clang18 compiler.

Signed-off-by: Hao Chen <chenhao@loongson.cn>
2024-08-26 17:24:05 +08:00
Hao Chen
9c19a0cdba Reinitialize divider matrix in DivRCPerfTest and DivPerfTest Cases.
This patch reinitializes divider matrix without zero values in DivRCPerfTest
and DivPerfTest test cases.
2024-08-26 16:23:50 +08:00
Maksim Shabunin
412c97b411 build/doc: disabled libdc1394 by default, documented framebuffer options 2024-08-23 18:13:43 +03:00
Alexander Smorkalov
76bf17a248 Removed duplicated code in Pow implementation that triggers wrong assert on Intel iGPU. 2024-08-23 17:44:58 +03:00
penghuiho
f4c2e4f872
Merge pull request #26061 from penghuiho:fix-pow-bug
Fixed the simd bugs of iPow8u and iPow16u #26061

Add the following cases in opencv_perf_core:

* OCL_PowFixture_iPow.iPow/0, where GetParam() = (640x480, 8UC1)
* OCL_PowFixture_iPow.iPow/2, where GetParam() = (640x480, 16UC1)

iPow8u and iPow16u failed to call to simd accelerating while executing.

Fix the bug by changing the input type of iPow_SIMD function.

### 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-08-23 17:12:19 +03:00
Abduragim Shtanchaev
e5b871fa7e
Merge pull request #26059 from Abdurrahheem:ash/fix-einsum-allocation
Einsum buffer allocation fix #26059

This PR fixed buffer allocation issue in Einsum layer that causes segmentation fault on 32bit platforms. Related issue #26008 

### 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-08-23 15:25:48 +03:00
Kumataro
a3bdbf5553
Merge pull request #26022 from Kumataro:fix26016
Imgproc: use double to determine whether the corners points are within src #26022

close #26016
Related https://github.com/opencv/opencv_contrib/pull/3778

### 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-08-23 12:35:13 +03:00
Alexander Smorkalov
916724e2a0
Merge pull request #26054 from asmorkalov:as/warping_perf
Extended perf tests for warpPerspective to cover channels too
2024-08-23 11:58:20 +03:00
Alexander Smorkalov
6c6d5cd7b2
Merge pull request #25986 from asmorkalov:as/js_for_contrib
Split Javascript white-list to support contrib modules #25986

Single whitelist converted to several per-module json files. They are concatenated automatically and can be overriden by user config.

Related to https://github.com/opencv/opencv/pull/25656

### 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-08-23 10:49:08 +03:00
Maxim Smolskiy
697512bb9f
Merge pull request #26014 from MaximSmolskiy:increase-search-radius-for-corners-neighbors-in-ChessBoardDetector-findQuadNeighbors
Increase neighbors search radius for corners in ChessBoardDetector:findQuadNeighbors #26014

I didn't do everything right the way I wanted at #25991. I forgot that `edge_len` is edge **squared** length as well as `thresh_scale` is threshold for **squared** scale. So, I wanted to increase scale by `sqrt(2)` times (idea is to use quad diagonal instead of quad side) and therefore `thresh_scale` should be equal to `sqrt(2)^2 = 2`.

And refactor variables names to explicitly indicate that they are squared, so that no one else falls into this trap

I tested this PR with benchmark
```
python3 objdetect_benchmark.py --configuration=generate_run --board_x=7 --path=res_chessboard --synthetic_object=chessboard
```
PR increases detected chessboards number by `1/2%`:
```
cell_img_size = 100 (default)

before
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.941667                      13560             14400                           0.596726
Total detected time:  136.68963200000007 sec

after
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.952083                      13710             14400                           0.595984
Total detected time:  136.55770600000014 sec

----------------------------------------------------------------------------------------------------------------------------------------------

cell_img_size = 10

before
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error chessboard
                                      all             0.579167                       8340             14400                           4.198448
Total detected time:  2.535998999999999 sec

after
                                 category  detected chessboard  total detected chessboard  total chessboard  average detected error 
                                      all             0.591389                       8516             14400                           4.155250
Total detected time:  2.700832999999997 sec
```

### 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-08-22 15:06:02 +03:00
Alexander Smorkalov
55d1bf3da9 Extended perf tests for warpPerspective to cover channels too. 2024-08-21 17:31:28 +03:00
Yuantao Feng
347d673a87
Merge pull request #23279 from fengyuentau:add_topk
dnn: add ONNX TopK #23279

Merge with https://github.com/opencv/opencv_extra/pull/1200

Partially fixes #22890 and #20258

To-do:

- [x] TopK forward impl
- [x] add tests
- [x] support Opset 1 & 10 if possible
- [ ] ~Support other backends~ (TopK has two outputs, which is not supported by other backends, such as openvino)


Perf:

M1 (time in millisecond)

| input shape     | axis | dnn  | ort  |
| --------------- | ---- | ---- | ---- |
| (1000, 100)     | 0    | 1.68 | 4.07 |
| (1000, 100) K5  | 0    | 1.13 | 0.12 |
| (1000, 100)     | 1    | 0.96 | 0.77 |
| (100, 100, 100) | 0    | 10.00 | 31.13 |
| (100, 100, 100) | 1    | 7.33 | 9.17 |
| (100, 100, 100) | 2    | 7.52 | 9.48 |

M2 (time in milisecond)

| input shape     | axis | dnn  | ort  |
| --------------- | ---- | ---- | ---- |
| (1000, 100)     | 0    | 0.76 | 2.44 |
| (1000, 100) K5 | 0 | 0.68 | 0.07 |
| (1000, 100)     | 1    | 0.41 | 0.50 |
| (100, 100, 100) | 0    | 4.83 | 17.52|
| (100, 100, 100) | 1    | 3.60 | 5.08 |
| (100, 100, 100) | 2    | 3.73 | 5.10 |

ONNXRuntime performance testing script: https://gist.github.com/fengyuentau/a119f94fd16721ec9974b8c7b0a45d4c

### 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-08-21 17:03:24 +03:00
FantasqueX
7cf075c392
Merge pull request #25968 from FantasqueX:correct-bayer2gray-simd-1
Correct Bayer2Gray u8 SIMD #25968

SIMD version of CV_DESCALE is not correct. It should be implemented using v_dotprod.

What's more, the stop condition of vector operation should be `bayer < bayer_end - 14` because we just need to make sure result is safely stored into `dst`.

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

### 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-08-21 11:33:07 +03:00
Alexander Smorkalov
7e3b69e02b
Merge pull request #26052 from savuor:rv/rounding_lock
Fix rounding mode for test
2024-08-21 10:26:34 +03:00
alexlyulkov
8715229e49
Merge pull request #26009 from alexlyulkov:al/unify-build-gradle
Unified build.gradle files into one template #26009

Issue #24686

### 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-08-21 09:24:28 +03:00
Rostislav Vasilikhin
7fe36a3cb2 lock rounding mode for parallel test run 2024-08-21 09:02:02 +03:00
Alexander Smorkalov
a087a9c47a
Merge pull request #26045 from asmorkalov:as/variant-free
Free Variant variable after usage in DShow back-end
2024-08-20 14:19:39 +03:00
Alexander Smorkalov
ec2e2da1fe
Merge pull request #26046 from ivafanas:speedup_random_forest_get_votes
speedup random forest getVotes method.
2024-08-20 14:19:21 +03:00
Ivan Afanasyev
7d3d2101f9 speedup random forest getVotes method. 2024-08-20 15:35:59 +07:00
Alexander Smorkalov
24fde08712 Free Variant variable after usage in DShow back-end 2024-08-19 21:40:52 +03:00
Alexander Smorkalov
ae4a11b0c0
Merge pull request #26034 from Octopus136:issue-26033
Fix: reduce redundant code by optimizing device name retrieval
2024-08-19 19:06:16 +03:00
Alexander Smorkalov
ebe04a5723
Merge pull request #26041 from knmcguire:patch-1
Docfix - Remove notice on using deprecated itemset
2024-08-19 17:44:07 +03:00
Alexander Smorkalov
de89aa379d
Merge pull request #25980 from ericmariasis:eric-mariasis-stitcher-py-markdown
fixing issue 25962
2024-08-19 17:40:55 +03:00
ericmariasis
cb72a2131f Added python branch to stitching tutorial. 2024-08-19 16:28:15 +03:00
ShengYu
aa133cd899
Merge pull request #26038 from shengyu7697:fix-typo
Fix typos #26038

Fix typos

### 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-08-19 13:00:07 +03:00
Kimberly N. McGuire
b5b9b3a279
Remove notice on using deprecated itemset 2024-08-18 15:43:25 +02:00
Octopus136
61d719d2aa fix: reduce redundant code by optimizing device name retrieval 2024-08-16 15:31:35 +08:00
Alexander Alekhin
78630ddc67 Merge pull request #26029 from fengyuentau:dnn/fix_cuda_matmul_crash 2024-08-16 01:08:34 +00:00
Alexander Alekhin
0838920371 Merge pull request #26032 from FantasqueX:fix-typo-3 2024-08-15 16:53:02 +00:00
Alexander Alekhin
95070e61ce Merge pull request #26031 from FantasqueX:fix-typo-2 2024-08-15 16:52:45 +00:00
Letu Ren
a8a088d28c Fix typo in MorphShapes document 2024-08-15 18:20:57 +08:00
Letu Ren
c340b3b466 Fix typo in openvx readme 2024-08-15 16:37:40 +08:00
Yuantao Feng
93e0c7e53f fix matmul crash 2024-08-15 16:10:40 +08:00
Alexander Smorkalov
315f85d4f4
Merge pull request #26019 from shengyu7697:fix-typo
correct "enviroment" to "environment"
2024-08-12 13:33:05 +03:00
Kumataro
2fcea41f86
Merge pull request #26018 from Kumataro:fix26017
doc: remove duplicated OpenCV Theory at ToC in Basic Drawing #26018

Close #26017

### 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-08-12 13:32:52 +03:00
shengyu
37c1acbf19 correct "enviroment" to "environment" 2024-08-11 22:27:36 +08:00
Kumataro
da3debda6d
Merge pull request #25981 from Kumataro:fix25971
imgproc: add specific error code when cvtColor is used on an image with an invalid number of channels #25981

close #25971

### 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-08-09 14:22:02 +03:00
Nishanth
6cd730a02c
Merge pull request #26002 from nishanthdass:doc/missing-fields-python-tutorials
Remove empty Additional Resources and Exercises fields from tutorials #26002

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

This PR is in response to issue [26001](https://github.com/opencv/opencv/issues/26001)

This pull request addresses the issue of empty "Additional Resources" and "Exercises" fields in several OpenCV-Python tutorials. The empty sections have been removed to improve the clarity and consistency of the documentation.
2024-08-09 10:34:44 +03:00
Arvind Iyer
c9df679943
Merge pull request #25959 from arvind-iyer:4.x
Improved samples/python/tracker.py docstring #25959

This PR removed unused arguments and updated existing argument placeholders to be more descriptive of what they are.

### 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-08-07 15:17:26 +03:00
Alexander Smorkalov
67d0338c9c
Merge pull request #26004 from ericmariasis:eric-mariasis-issue-26000
got rid of std prefix
2024-08-07 10:26:24 +03:00
ericmariasis
3f92884520 got rid of std prefix 2024-08-07 00:17:04 -04:00
James Choi
582a7f32d5
Merge pull request #25832 from chachoi-world:4.x
Add support for QNX #25832

Build and test instruction for QNX:
https://github.com/chachoi-world/qnx-ports/blob/main/opencv/README.md

### 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-08-06 20:25:39 +03:00
Alexander Smorkalov
d8bcc2c85d
Merge pull request #25996 from asmorkalov:as/fillPoly_check
Fixed asserts in fillPoly
2024-08-06 17:56:22 +03:00
Rostislav Vasilikhin
1acf722e24
Merge pull request #25970 from savuor:rv/hal_pyrdown
pyrDown: offset HAL added, IPP removed #25970

Resolves #25976

### Changes
* HAL added for offset support so that border pixels can be fetched from outside of the image ROI (see `BORDER_ISOLATED` parameter)
* IPP removed since there is `pyrUp` instead of `pyrDown` and there's no easy way to fix this other than rewriting it from scratch
* replaced old C call by modern `cv::pyrDown`

### 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
- [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-08-06 15:04:53 +03:00
Alexander Smorkalov
9dee2c6e67 Fixed asserts in fillPoly. 2024-08-06 12:02:01 +03:00
Alexander Smorkalov
49459d46e2
Merge pull request #25932 from asmorkalov:as/HAL_cvtColor_aprox
Added xxxApprox overloads for YUV color conversions in HAL and AlgorithmHint to cvtColor #25932

The xxxApprox to implement HAL functions with less bits for arithmetic of FP.

The hint was introduced in #25792 and #25911

### 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-08-06 11:40:58 +03:00
Alexander Smorkalov
333054e05e
Merge pull request #25943 from asmorkalov:as/fisheye_distrort_newk
Added fisheye::distortPoints with non-identity projection matrix
2024-08-05 19:33:18 +03:00