Open zhouyongxyz opened 3 years ago
extern "C" JNIEXPORT jfloat JNICALL Java_com_seeta_sdk_FaceMaskDetector_detect(JNIEnv *env, jobject instance, jobject image, jobject faceRect) { if(NULL == maskDetector) { LOGD("MaskDetector is NULL"); return 0; } SeetaImageData imageData = transformSeetaImageDataJavaToC(env, image); SeetaRect rect = transformSeetaRectJavaToC(env, faceRect); float score = 0; bool mask = maskDetector->detect(imageData, rect, &score); LOGD("zhouyong width = %d , height = %d,x = %d, y = %d, width = %d, height= %d, mask = %d score = %f \n", imageData.width, imageData.height, rect.x, rect.y, rect.width, rect.height, mask, score);
return score;
}
请教一下一下Android Demo中的arm-V8a libXXX_java.so怎么编译出来?
extern "C" JNIEXPORT jfloat JNICALL Java_com_seeta_sdk_FaceMaskDetector_detect(JNIEnv *env, jobject instance, jobject image, jobject faceRect) { if(NULL == maskDetector) { LOGD("MaskDetector is NULL"); return 0; } SeetaImageData imageData = transformSeetaImageDataJavaToC(env, image); SeetaRect rect = transformSeetaRectJavaToC(env, faceRect); float score = 0; bool mask = maskDetector->detect(imageData, rect, &score); LOGD("zhouyong width = %d , height = %d,x = %d, y = %d, width = %d, height= %d, mask = %d score = %f \n", imageData.width, imageData.height, rect.x, rect.y, rect.width, rect.height, mask, score);
}