Modify JNI bug

This commit is contained in:
tunm
2023-03-05 00:37:43 +08:00
parent 74486e6438
commit d6f260ff75
+1 -1
View File
@@ -219,7 +219,7 @@ JNIEXPORT jobjectArray JNICALL HYPERLPR_API(core_HyperLPRCore_PlateRecognitionFr
env->CallVoidMethod(jPlate, setConfidenceMethodId, plate.text_confidence);
// set in plate code
// env->CallObjectMethod(jPlate, setCodeMethodId, stringTojstring(env, plate.code));
env->CallObjectMethod(jPlate, setCodeMethodId, env->NewStringUTF(plate.code));
env->CallVoidMethod(jPlate, setCodeMethodId, env->NewStringUTF(plate.code));
env->SetObjectArrayElement(jPlateArray, i, jPlate);
env->DeleteLocalRef(jPlate);