-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[Saliency] Enable Java/Android bindings by adding 'WRAP java' to CMake #4018
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
Open
Akhil-Chaturvedi
wants to merge
4
commits into
opencv:4.x
Choose a base branch
from
Akhil-Chaturvedi:patch-1
base: 4.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
@Akhil-Chaturvedi Please handle CI warnings. |
Contributor
|
Contributor
|
Author
|
@asmorkalov The Windows10-x64 job seems to have failed on a network glitch (ECONNRESET) at the very end. Could you please trigger a re-run? All other checks passed. Thanks! |
asmorkalov
approved these changes
Oct 10, 2025
asmorkalov
reviewed
Oct 11, 2025
modules/saliency/include/opencv2/saliency/saliencySpecializedClasses.hpp
Outdated
Show resolved
Hide resolved
Fixes opencv#4016 This addresses the inability to use the `saliency` module in Android (Java/Kotlin) applications. When generated using `build_sdk.py`, the native library compiles, but the Java wrapper class (`org.opencv.saliency.Saliency`) is not generated. **Technical Fix:** The `ocv_define_module` macro in `modules/saliency/CMakeLists.txt` was missing the `java` flag in its `WRAP` parameter. **Change in `modules/saliency/CMakeLists.txt`:** # OLD ocv_define_module(saliency opencv_imgproc opencv_features2d WRAP python) # NEW ocv_define_module(saliency opencv_imgproc opencv_features2d WRAP python java)
saliency: Fix -Woverloaded-virtual in header
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #4016
This addresses the inability to use the
saliencymodule in Android (Java/Kotlin) applications. When generated usingbuild_sdk.py, the native library compiles, but the Java wrapper class (org.opencv.saliency.Saliency) is not generated.Technical Fix:
The
ocv_define_modulemacro inmodules/saliency/CMakeLists.txtwas missing thejavaflag in itsWRAPparameter.Change in
modules/saliency/CMakeLists.txt:OLD
ocv_define_module(saliency opencv_imgproc opencv_features2d WRAP python)
NEW
ocv_define_module(saliency opencv_imgproc opencv_features2d WRAP python java)
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.