我试图从示例代码中创建java中的对象检测算法 here。 但是在代码中,图像值是硬编码的。我可以通过自己的方式传递图像位置。
const char * imgInFile = "/sdcard/nonfree/img1.jpg";// Need to pass custom values
const char * imgOutFile = "/sdcard/nonfree/img1_result.jpg";
谢谢
答案 0 :(得分:0)
您可以向runDemo
方法添加字符串参数。您应该在java中更改方法签名并修复nonfree_jni.cpp文件中的jni方法原型并... Goolge how to pass string to jni.