Commit Graph

34447 Commits

Author SHA1 Message Date
Alexander Smorkalov
7c966efcad Drop float16_t alias in 5.x after 4.x merge. 2024-04-17 10:48:41 +03:00
Alexander Smorkalov
f643964c68 Added HAL function for popular bit-exact branch of GaussianBlur with sigma=0. 2024-04-17 10:13:35 +03:00
alexlyulkov
f9dd20eb07
Merge pull request #25414 from alexlyulkov:al/range-fixed
Fixed ONNX range layer #25414

Partially address https://github.com/opencv/opencv/issues/25363
Fixed ONNX range layer. It should support any input type.
Added tests (extra [PR](https://github.com/opencv/opencv_extra/pull/1170))

### 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-04-17 09:38:21 +03:00
Alexander Smorkalov
db3e5620cd Merge branch 4.x 2024-04-16 17:28:18 +03:00
Gursimar Singh
68967cf6d7
Merge pull request #25415 from gursimarsingh:improved_drawing_cpp_sample
Improving the drawing cpp sample to draw shapes based on user input #25415

Relates to #25006

The updated samples allows user to draw random shapes by using hot keys.

### 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-04-16 12:48:18 +03:00
Alexander Smorkalov
66fb5021e9
Merge pull request #25413 from Linaname:#25404
Correct inpainting floating point values with Telea's algorithm
2024-04-16 12:16:35 +03:00
Alexander Panov
e2621f128e
Merge pull request #25378 from AleksandrPanov:move_charuco_tutorial
Move Charuco/Calib tutorials and samples to main repo #25378

Merge with https://github.com/opencv/opencv_contrib/pull/3708

Move Charuco/Calib tutorials and samples to main repo:

- [x] update/fix charuco_detection.markdown and samples
- [x] update/fix charuco_diamond_detection.markdown and samples
- [x] update/fix aruco_calibration.markdown and samples
- [x] update/fix aruco_faq.markdown
- [x] move tutorials, samples and tests to main repo
- [x] remove old tutorials, samples and tests from contrib


### 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-04-16 12:14:33 +03:00
Rostislav Vasilikhin
6699ca1a40
Merge pull request #25382 from savuor:rv/fix_mesh_load
Fix mesh loading for texture coordinates and face indices #25382

### This PR changes

* Texture coordinates were stored incorrectly (3-channel array is read as if there were 2 channels), fixed
* Faces were pushed back to the output array instead of indexed writing which produced a lot of empty faces, fixed
* A set of ground truth tests were added to cover these issues
* `std::vector<cv::Mat>` support added for `saveMesh()` which is required for Python bindings
* More command line args were added to rasterization test data generator

### 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-04-16 10:20:44 +03:00
Gursimar Singh
3e561d8353
Merge pull request #25304 from gursimarsingh:geometry_sample_cpp
Geometry C++ sample combining other shape detection samples #25304

Clean Samples #25006
This PR removes adds a new cpp sample (geometry) which combines different methods of finding and drawing shapes in an image. It makes separate samples for convexHull, fitellipse, minAreaRect, minAreaCircle redudant. Shapes can be changed using hotkeys after running the program

### 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-04-16 10:13:34 +03:00
Alexander Alekhin
4fb0541916 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2024-04-15 11:51:36 +00:00
Alexander Smorkalov
c622ffd95f
Merge pull request #25365 from MaximSmolskiy:take-first-suitable-neighbor-in-ChessBoardDetector-findQuadNeighbors
Take first suitable neighbor in ChessBoardDetector::findQuadNeighbors
2024-04-15 14:37:41 +03:00
eplankin
02a74f2e88
Merge pull request #25377 from eplankin:3.4
* Update IPP integration

* Updated packages and hashes
2024-04-15 10:03:44 +00:00
Abduragim Shtanchaev
869016d8b1
Merge pull request #25208 from Abdurrahheem:ash/0D-fullyConnected-test
Fully connected 0D test. #25208

This PR introduces parametrized `0/1D` input support test for `Fullyconnected` layer.

### 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-04-15 09:15:36 +03:00
Alexander Smorkalov
0eef34a670
Merge pull request #25407 from Kumataro:fix25401
imgproc: doc: fix arrow symbols in header
2024-04-15 09:06:14 +03:00
mikhail.shtennikov
dfb6069ad9 Inpainting floating point values with Telea's algorithm gives unexpected results 2024-04-15 05:21:54 +05:00
Alexander Smorkalov
66ab0bee7a
Merge pull request #25388 from asmorkalov:as/jpeg-turbo-diagnostics
Fixed jpeg-turbo diagnostics and build options in default configuration.
2024-04-13 11:10:36 +03:00
Alexander Smorkalov
0bd066ee58
Merge pull request #25406 from VadimLevin:dev/vlevin/numpy-array-typing-constraints
feat: use numeric dtype for MatLike instead of generic
2024-04-13 11:06:58 +03:00
Alexander Smorkalov
002d0542dd
Merge pull request #25405 from VadimLevin:dev/vlevin/ios-framework-privacy-info
feat: add PrivacyInfo file to iOS framework
2024-04-13 11:01:48 +03:00
Kumataro
2eb9e915d9 imgproc: doc: fix arrow symbols in header 2024-04-13 06:15:11 +09:00
Vadim Levin
079e615fbd feat: add PrivacyInfo file to iOS framework 2024-04-12 15:20:11 +03:00
Vadim Levin
caa09aca36 feat: use numeric dtype for MatLike instead of generic 2024-04-12 15:10:59 +03:00
Alexander Smorkalov
ecbfc1bfd8
Merge pull request #25395 from susumu-iino:fix-dnn-plugin-build-win32
Fix dnn plugin build win32
2024-04-12 11:05:34 +03:00
Alexander Alekhin
06c1c7b5cb Merge pull request #25396 from mshabunin:test-tag-contours 2024-04-11 15:34:49 +00:00
Maksim Shabunin
c081efe3c6 imgproc: add 512mb tag for FindContours.accuracy test 2024-04-11 14:37:32 +03:00
Yuantao Feng
197626a5bf
Merge pull request #25387 from fengyuentau:complete-float16_t-renaming
Rename remaining float16_t for future proof #25387

Resolves comment: https://github.com/opencv/opencv/pull/25217#discussion_r1547733187.

`std::float16_t` and `std::bfloat16_t` are introduced since c++23: https://en.cppreference.com/w/cpp/types/floating-point.

### 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-04-11 14:02:44 +03:00
Alexander Smorkalov
2c5b296ab2
Merge pull request #25343 from asmorkalov:as/HAL_bilaterialFilter
HAL interface for bilaterialFilter
2024-04-11 09:15:15 +03:00
Alexander Smorkalov
17c7f76da3 HALL interface for bilaterialFilter. 2024-04-11 09:02:45 +03:00
Alexander Smorkalov
a10e33979a
Merge pull request #25391 from Kumataro:refix25073
core: persistence: use hfloat instead of float16_t
2024-04-11 08:34:49 +03:00
Kumataro
d22d0bd49c core: persistence: use hfloat instead of float16_t 2024-04-11 05:18:25 +09:00
Alexander Smorkalov
9813ea2b7a
Merge pull request #25306 from utibenkei:fix_build_of_dynamic_framework_for_visionos
fix build of dynamic framework for visionos
2024-04-10 16:50:38 +03:00
Alexander Smorkalov
bbd9059334 Fixed jpeg-turbo diagnostics and build options in default configuration. 2024-04-10 16:19:59 +03:00
Kumataro
b14ea19466
Merge pull request #25351 from Kumataro:fix25073_format_g
core: persistence: output reals as human-friendly expression. #25351

Close #25073
Related https://github.com/opencv/opencv/pull/25087

This patch is need to merge same time with https://github.com/opencv/opencv_contrib/pull/3714

### 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-04-10 15:17:15 +03:00
Alexander Smorkalov
cf3a130be6
Merge pull request #25385 from asmorkalov:as/new_contours_cleanup
Removed old C API usage in new findContours implementation
2024-04-10 12:48:12 +03:00
Alexander Smorkalov
282c762ead Merge branch 4.x 2024-04-10 11:27:47 +03:00
Alexander Smorkalov
5bad694b7f Removed old C API usage in new findContours implementation. 2024-04-10 11:19:55 +03:00
Alexander Smorkalov
d0ec39206a
Merge pull request #25383 from asmorkalov:as/win32_arm_ci
Added experimental build for Windows ARM64 to CI.
2024-04-10 10:44:05 +03:00
Alexander Smorkalov
cf3e90ab91 Added experimental build for Windows ARM64 to CI. 2024-04-10 10:26:34 +03:00
Alexander Smorkalov
369760116e
Merge pull request #25375 from asmorkalov:as/win32_arm_warning
Supress build warnings on Win32 for ARM
2024-04-10 09:50:30 +03:00
Maksim Shabunin
0e1d326ed0
Merge pull request #25379 from mshabunin:fix-unaligned-filter-5.x
Fix unaligned filters + increase test thresholds (5.x) #25379

Port of #25364 to 5.x + minor changes in 3d tests to pass on RISC-V platform

Failed tests:
```
[ RUN      ] AP3P.ctheta1p_nan_23607
/home/ci/opencv/modules/3d/test/test_solvepnp_ransac.cpp:2320: Failure
Expected: (cvtest::norm(res.colRange(0, 2), expected, NORM_INF)) <= (3e-16), actual: 3.33067e-16 vs 3e-16
[  FAILED  ] AP3P.ctheta1p_nan_23607 (1 ms)

[ RUN      ] Rendering/RenderingTest.accuracy/4, where GetParam() = ((320, 240), Flat, CW, Color, CV_32F, CV_32S)
/home/ci/opencv/modules/3d/test/test_rendering.cpp:430: Failure
Expected: (normL2Depth) <= (normL2Threshold), actual: 0.00102317 vs 0.000989
[  FAILED  ] Rendering/RenderingTest.accuracy/4, where GetParam() = ((320, 240), Flat, CW, Color, CV_32F, CV_32S) (22 ms)

[ RUN      ] Rendering/RenderingTest.accuracy/5, where GetParam() = ((320, 240), Shaded, None, Color, CV_32F, CV_32S)
/home/ci/opencv/modules/3d/test/test_rendering.cpp:430: Failure
Expected: (normL2Depth) <= (normL2Threshold), actual: 0.00102317 vs 0.000989
[  FAILED  ] Rendering/RenderingTest.accuracy/5, where GetParam() = ((320, 240), Shaded, None, Color, CV_32F, CV_32S) (22 ms)

[ RUN      ] Rendering/RenderingTest.accuracy/8, where GetParam() = ((320, 240), Flat, CW, Clipping, CV_32F, CV_32S)
/home/ci/opencv/modules/3d/test/test_rendering.cpp:430: Failure
Expected: (normL2Depth) <= (normL2Threshold), actual: 0.00162132 vs 0.0016
[  FAILED  ] Rendering/RenderingTest.accuracy/8, where GetParam() = ((320, 240), Flat, CW, Clipping, CV_32F, CV_32S) (22 ms)

[ RUN      ] Rendering/RenderingTest.accuracy/9, where GetParam() = ((320, 240), Shaded, None, Clipping, CV_32F, CV_32S)
/home/ci/opencv/modules/3d/test/test_rendering.cpp:430: Failure
Expected: (normL2Depth) <= (normL2Threshold), actual: 0.000554117 vs 0.000544
[  FAILED  ] Rendering/RenderingTest.accuracy/9, where GetParam() = ((320, 240), Shaded, None, Clipping, CV_32F, CV_32S) (27 ms)
```

Related CI PR: https://github.com/opencv/ci-gha-workflow/pull/165
2024-04-10 09:33:10 +03:00
Alexander Smorkalov
9ced486497
Merge pull request #25381 from gmatheu:v4.x_js_markdown_typo
Fixing code example on js image display documentation
2024-04-10 09:21:08 +03:00
Alexander Smorkalov
b3e863fee4
Merge pull request #25380 from mshabunin:fix-calib-tests
calib3d: increased AP3P test threshold for RISC-V platform
2024-04-10 08:39:18 +03:00
Maksim Shabunin
148b2ec3e0 calib3d: increased AP3P test threshold for RISC-V platform 2024-04-09 23:53:50 +03:00
Gonzalo Matheu
cb339ac6d1
Fixing code example on
js_image_display markdown
2024-04-09 16:06:08 -03:00
Maksim Shabunin
f37924796f
Merge pull request #25364 from mshabunin:fix-unaligned-filter
imgproc: fix unaligned memory access in filters and Gaussian blur #25364

* filter/SIMD: removed parts which casted 8u pointers to int causing unaligned memory access on RISC-V platform.
* GaussianBlur/fixed_point: replaced casts from s16 to u32 with union operations

Performance comparison:
- [x] check performance on x86_64 - (4 threads, `-DCPU_BASELINE=AVX2`, GCC 11.4, Ubuntu 22) - [report_imgproc_x86_64.ods](https://github.com/opencv/opencv/files/14904702/report_x86_64.ods)
- [x] check performance on AArch64 - (4 cores of RK3588, GCC 11.4 aarch64, Raspbian) - [report_imgproc_aarch64.ods](https://github.com/opencv/opencv/files/14908437/report_aarch64.ods)

Note: for some reason my performance results are quite unstable, unaffected functions show speedups and slowdowns in many cases. Filter2D and GaussianBlur seem to be OK.

Slightly related PR: https://github.com/opencv/ci-gha-workflow/pull/165
2024-04-09 17:44:36 +03:00
Alessandro de Oliveira Faria (A.K.A.CABELO)
953581a92a
Merge pull request #25357 from cabelo:yolov8m
Added and tested yolov8m model. #25357

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

Below is evidence of the test:
![yolov8m](https://github.com/opencv/opencv/assets/675645/f9bfe2c6-fe4a-42fc-93a6-17e4da5c9bb5)
2024-04-09 16:56:07 +03:00
Alexander Smorkalov
e4677fbf64
Merge pull request #25361 from hanliutong:rvv-f32
Further optimize fastDepthwiseConv for RISC-V Vector.
2024-04-09 16:04:02 +03:00
Alexander Smorkalov
4221ae1d64 Supress build warnings on Win32 for ARM. 2024-04-09 12:57:23 +03:00
Alexander Smorkalov
b0d905864d
Merge pull request #25371 from alexlyulkov:al/adaptive-threshold-tests
Added tests for adaptiveThreshold and sepFilter2D
2024-04-09 11:51:00 +03:00
alexlyulkov
f454303f6a
Merge pull request #25241 from alexlyulkov:al/int64-padding
Added int support to padding layer #25241

Added int32 and int64 support to padding layer (CPU and CUDA).
ONNX parser doesn't convert non-zero padding value to float now.

### 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-04-09 11:20:56 +03:00
Maksim Shabunin
a25132986a
Merge pull request #25146 from mshabunin:cpp-contours
Reworked findContours to reduce C-API usage #25146

What is done:
* rewritten `findContours` and `icvApproximateChainTC89` using C++ data structures
* extracted LINK_RUNS mode to separate new public functions - `findContoursLinkRuns` (it uses completely different algorithm)
* ~added new public `cv::approximateChainTC89`~ - ** decided to hide it**
* enabled chain code output (method = 0, no public enum value for this in C++ yet)
* kept old function as `findContours_old` (exported, but not exposed to user)
* added more tests for findContours (`test_contours_new.cpp`), some tests compare results of old function with new one. Following tests have been added:
  * contours of random rectangle
  * contours of many small (1-2px) blobs
  * contours of random noise
  * backport of old accuracy test
  * separate test for LINK RUNS variant

What is left to be done (can be done now or later):
* improve tests: 
  * some tests have limited verification (e.g. only verify contour sizes)
  * perhaps reference data can be collected and stored
  * maybe more test variants can be added (?)
* add enum value for chain code output and a method of returning starting points (e.g. first 8 elements of returned `vector<uchar>` can represent 2 int point coordinates)
* add documentation for new functions - **✔️ DONE**
* check and improve performance (my experiment showed 0.7x-1.1x some time ago)
* remove old functions completely (?)
* change contour return order (BFS) or allow to select it (?)
* return result tree as-is (?) (new data structures should be exposed, bindings should adapt)
2024-04-09 09:37:49 +03:00