Commit 7304cfb
authored
Merge pull request #4018 from Akhil-Chaturvedi:patch-1
[Saliency] Enable Java/Android bindings by adding 'WRAP java' to CMake #4018
Fixes #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)
### 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 CMake1 parent d147d10 commit 7304cfb
File tree
3 files changed
+3
-15
lines changed- modules/saliency
- include/opencv2/saliency
- src/BING
3 files changed
+3
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | 311 | | |
315 | 312 | | |
316 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| 451 | + | |
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | 457 | | |
467 | 458 | | |
468 | 459 | | |
| |||
0 commit comments