Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@asmorkalov
Copy link
Contributor

@asmorkalov asmorkalov commented Feb 26, 2024

OpenCV Contrib: opencv/opencv_contrib#3644
OpenCV Extra: opencv/opencv_extra#1151

#23018 from stopmosk:move-aruco-tutorial
#24884 from alexlyulkov:al/aar-add-kotlin
#24930 from asmorkalov:as/android_enable_native_aar
#24946 from alexlyulkov:al/kotlin-tests2
#25024 from vrabaud:neon
#25044 from akretz:fix_issue_24348
#25045 from AleksandrPanov:aruco_fix_unnecessary_copying
#25046 from AleksandrPanov:fix_QRArucoParameters
#25048 from opencv-pushbot:gitee/alalek/docs_move_detail
#25054 from TolyaTalamanov:at/gapi-lower-supported-ie-backend-version
#25059 from opencv-pushbot:gitee/alalek/core_fix_float16
#25060 from dmatveev:dm/gapi_test_time
#25062 from TinyTinni:missing-const
#25064 from vpisarev:em_5point_fix
#25067 from danoli3:master
#25079 from lxk696:4.x
#25083 from mamut-m:fix_docs_for_reprojectImageTo3D
#25084 from EDVTAZ:emscripten-3.1.54-compat
#25086 from ryo8000:fix-typo
#25090 from MaximSmolskiy:compensate-edge-length-in-ChessBoardDetector-generateQuads-attempt-2
#25098 from klatism:tbb-lib-upgrade

Previous "Merge 4.x": #25041

asmorkalov and others added 30 commits January 31, 2024 15:19
…sary_copying

fix unnecessary copying in ArucoDetector
…ters

fix setArucoParameters in QRCodeDetectorAruco, add const to getArucoParameters
Replace legacy __ARM_NEON__ by __ARM_NEON opencv#25024

Even ACLE 1.1 referes to __ARM_NEON
https://developer.arm.com/documentation/ihi0053/b/?lang=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
…_move_detail

docs: move detail section of group to the top of the page
- resolves issue on Windows ARM64
…ported-ie-backend-version

G-API: Lower supported IE backend version opencv#25054

Related to opencv#25053

### 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
Added kotlin classes to AAR opencv#24884 

The resulting maven repo doesn't have kotlin-plugin dependency, and it works fine out of the box: Android Kotlin projects already have kotlin-plugin dependency, Android Java projects ignore kotlin classes.

Details on KGP versions: https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin

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

Co-authored-by: Alexander Lyulkov <[email protected]>
Co-authored-by: Alexander Smorkalov <[email protected]>
Added Kotlin test, changed Kotlin version for OpenCV
…ive_aar

Enable Android samples with native part with AAR package
Adds missing const in function declaration of VideoCapture
Fix very slow compilation of five-point algorithm on some platforms (e.g. Qualcomm) opencv#25064

Thanks to our big friend and long-term contributor for the patch!

### 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
G-API: Make test execution lighter (first attempt) opencv#25060

### Background

G-API tests look running longer than tests for the rest of modules (e.g., 5m), and the analysis show that there's several outliers in G-API test suite which take a lot of time but don't improve the testing quality much:
![image](https://github.com/opencv/opencv/assets/144187/e6df013f-e548-47ac-a418-285b3f78c9f8)

In this PR I will cut the execution time to something reasonable.

### Contents

- Marked some outliers as `verylong`:
  - OneVPL barrier test - pure brute force
  - Stateful test in stream - in fact BG Sub accuracy test clone
- Restructured parameters instantiation in Streaming tests to generate less test configurations (54 -> 36)

### 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
resulting in an error in the judgment condition]
…_fix_float16

core: fix float16_t optimization condition
…ageTo3D

Fixing the formula in the documentation of reprojectImageTo3D
Add compatibility with latest (3.1.54) emsdk version opencv#25084

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

### Details

I was following [this tutorial](https://docs.opencv.org/4.9.0/d4/da1/tutorial_js_setup.html) for building opencv with wasm target. The tutorial mentions that the last verified version of emscripten that is tested with opencv is 2.0.10, but I was curious if I could get it to work with more recent versions. I've run into a few issues with the latest version, for which fixes are included in this PR. I've found a few issues that have the same problems I encountered:

- opencv#24620
- opencv#20313
- https://stackoverflow.com/questions/77469603/custom-opencv-js-wasm-using-cv-matfromarray-results-in-cv-mat-is-not-a-co
- emscripten-core/emscripten#14803
- opencv#24572
- opencv#19493 (comment)

I used the docker image for building and comparing results with different emsdk versions. I tested by building with `--build_wasm` and `--build-test` flags and ran the tests in the browser. I addressed the following issues with newer versions of emscripten:

- In newer versions `EMSCRIPTEN` environemnt variable was stopped being set. I added support for deriving location based on the `EMSDK` environment variable, as suggested [here](emscripten-core/emscripten#14803)
- In newer versions emcmake started passing `-DCMAKE...` arguments, however the opencv python script didn't know how to handle them. I added processing to the args that will forward all arguments to `cmake` that start with `-D`. I opted for this in hopes of being more futureproof, but another approach could be just ignoreing them, or explicitly forwarding them instead of matching anything starting with `-D`. These approches were suggested [here](opencv#19493 (comment))
- With [version 3.1.31](https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#3131---012623) some previously exported functions stopped being automatically exported. Because of this, `_free` and `_malloc` were no longer available and had to be explicitly exported because of breaking tests.
- With [version 3.1.42](emscripten-core/emscripten@3.1.41...3.1.42#diff-e505aa80b2764c0197acfc9afd8179b3600f0ab5dd00ff77db01879a84515cdbL3875) the `post-js` code doesn't receive the module named as `EXPORT_NAME` anymore, but only as `moduleArg`/`Module`. This broke existing code in `helpers.js`, which was referencing exported functions through `cv.Mat`, etc. I changed all of these references to use `Module.Mat`, etc. If it is preferred, alternatively the `cv` variable could be reintroduced in `helper.js` as suggested [here](opencv#24620)

With the above changes in place, I can successfully build and run tests with the latest emscripten/emsdk docker image (also with 2.0.10 and most of the other older tags, except for a few that contain transient issues like [this](emscripten-core/emscripten#17700)).

This is my first time contributing to opencv, so I hope I got everything correct in this PR, but please let me know if I should change anything!
Define fix for Mac Catalyst iOS
…ngth-in-ChessBoardDetector-generateQuads-attempt-2

Compensate edge length in ChessBoardDetector::generateQuads (attempt 2) opencv#25090

### Pull Request Readiness Checklist

New attempt for opencv#24833, which was reverted as opencv#25036.

Locally I fixed `Calib3d_StereoCalibrate_CPP.regression` test by corners refinement using `cornerSubPix` function

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
asmorkalov and others added 5 commits February 26, 2024 12:46
fix [use hasattr("cv2", "name") ,but first param is 'character string',
Update ios_conversions.mm - Fix Mac Catalyst compile target
Move Aruco tutorials and samples to main repo opencv#23018

merge with opencv/opencv_contrib#3401
merge with opencv/opencv_extra#1143

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

---------
Co-authored-by: AleksandrPanov <[email protected]>
Co-authored-by: Alexander Smorkalov <[email protected]>
@asmorkalov asmorkalov merged commit cb7d38b into opencv:5.x Feb 27, 2024
@asmorkalov asmorkalov mentioned this pull request Feb 28, 2024
@dkurt dkurt added this to the 5.0 milestone Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.