gpt4 book ai didi

java - 将数据从 Java 文件传递​​到 cpp

转载 作者:太空宇宙 更新时间:2023-11-04 13:53:46 25 4
gpt4 key购买 nike

我正在尝试根据示例代码在 Java 中创建对象检测算法 here .但是在代码中图像值是硬编码的。有没有办法我可以自己传递图像位置。

   const char * imgInFile = "/sdcard/nonfree/img1.jpg";// Need to pass custom values
const char * imgOutFile = "/sdcard/nonfree/img1_result.jpg";

谢谢

最佳答案

当然,在Java中使用

private String imgInFile;
private String imgOutFile;

然后从输入文件中读取这些值,或者从运行应用程序时传递给您的应用程序的参数中获取它们。

关于java - 将数据从 Java 文件传递​​到 cpp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22457271/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com