Skip to content

Enable Java wrapper generation for Vec4i #3988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2025

Conversation

utibenkei
Copy link
Contributor

@utibenkei utibenkei commented Aug 19, 2025

Fixes an issue where Java wrapper generation skips methods using Vec4i.
Depends on PR in opencv: opencv/opencv#27567

Add Java wrapper test for HoughPoint2Line in ximgproc module

  • Add basic functionality test for HoughPoint2Line in XimgprocTest.java
  • Add gen_dict.json to expose RO_STRICT and RO_IGNORE_BORDERS constants in Java wrapper
  • Implement minimal test to verify method call and output validity

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • 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

- Add basic functionality test for HoughPoint2Line in XimgprocTest.java
- Add gen_dict.json to expose RO_STRICT and RO_IGNORE_BORDERS constants in Java wrapper
- Implement minimal test to verify method call and output validity
@asmorkalov asmorkalov self-assigned this Aug 20, 2025
@asmorkalov asmorkalov merged commit 2a82fa6 into opencv:4.x Aug 20, 2025
10 of 13 checks passed
asmorkalov pushed a commit to opencv/opencv that referenced this pull request Aug 20, 2025
Enable Java wrapper generation for Vec4i #27567 
 
Fixes an issue where Java wrapper generation skips methods using Vec4i.
Related PR in opencv_contrib: opencv/opencv_contrib#3988

The root cause was the absence of Vec4i in gen_java.json, which led to important methods such as aruco.drawCharucoDiamond() and ximgproc.HoughPoint2Line() being omitted from the Java bindings.

This PR includes the following changes:

- Added Vec4i definition to gen_java.json
- Updated gen_java.py to handle jintArray-based types properly
- ~~Also adjusted jn_args and jni_var for Vec2d and Vec3d to ensure correct JNI behavior~~

The modified Java wrapper generator successfully builds and includes the expected methods using Vec4i.

### 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
@asmorkalov asmorkalov mentioned this pull request Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants