Merge pull request #27245 from utibenkei:fix_java_wrapper_get_set_blobColor

Enable Java bindings for SimpleBlobDetector::blobColor
This commit is contained in:
Alexander Smorkalov 2025-04-21 20:53:35 +03:00 committed by GitHub
commit 29ef2a1da3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -7,6 +7,12 @@
"jni_var": "Feature2D %(n)s", "jni_var": "Feature2D %(n)s",
"suffix": "J", "suffix": "J",
"j_import": "org.opencv.features2d.Feature2D" "j_import": "org.opencv.features2d.Feature2D"
},
"uchar": {
"j_type": "byte",
"jn_type": "byte",
"jni_type": "jbyte",
"suffix": "B"
} }
} }
} }

View File

@ -108,8 +108,7 @@ public class SIMPLEBLOBFeatureDetectorTest extends OpenCVTestCase {
assertEquals(2, params.get_minRepeatability()); assertEquals(2, params.get_minRepeatability());
assertEquals(10.0f, params.get_minDistBetweenBlobs()); assertEquals(10.0f, params.get_minDistBetweenBlobs());
assertEquals(true, params.get_filterByColor()); assertEquals(true, params.get_filterByColor());
// FIXME: blobColor field has uchar type in C++ and cannot be automatically wrapped to Java as it does not support unsigned types assertEquals(0, params.get_blobColor());
//assertEquals(0, params.get_blobColor());
assertEquals(true, params.get_filterByArea()); assertEquals(true, params.get_filterByArea());
assertEquals(800f, params.get_minArea()); assertEquals(800f, params.get_minArea());
assertEquals(6000f, params.get_maxArea()); assertEquals(6000f, params.get_maxArea());