android - 有没有人使用 OpenCV 实现了一个用于统一的 android 插件?

标签 android opencv unity3d

我已经使用 openCV 和 native 代码编写了一个 android 应用程序,但是当我尝试为 Unity 提取库时,它在加载 OpenCV 库时崩溃。

public class MainActivity extends UnityPlayerActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (!OpenCVLoader.initDebug()) {
         Log.e(this.getClass().getSimpleName(), "  OpenCVLoader.initDebug(), not working.");
    } else {
        Log.d(this.getClass().getSimpleName(), "  OpenCVLoader.initDebug(), working.");
    }        
//This doesn't work either
//OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_1_0, this, mLoaderCallback);
}
}

有没有办法克服这个问题并加载 OpenCV 库?或者我应该为 Unity 创建另一个接口(interface)并加载 .jar 而不扩展 UnityPlayerActivity?

最佳答案

您将花费时间来实现并将其转换为插件是不值得的。已使用 plugin从 Assets 商店。不是免费的,但值得,因为它也支持其他平台。

关于android - 有没有人使用 OpenCV 实现了一个用于统一的 android 插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36712588/

相关文章:

javascript - 如何使用 react-native 生成​​可以在没有服务器的情况下运行的 apk?

android - Google Play 服务 v23 Proguard 配置

opencv - CUDA x64 + openCV 2.1

c++ - 相机标定 OpenCV 相机作为输入

c++ - 自动矢量化 : Convincing the compiler that alias check is not necessary

c# - 在 Unity3D 中,我正在学习 tilemap 教程。但是,UV 布局出现奇怪。我怎样才能解决这个问题?

android - 如何在 Android 中启用/禁用日志级别?

java - 上下文和 Activity 有什么区别?

c# - JSON.net 在没有模式的情况下反序列化 JSON

c# - 在 Unity 中使用 getComponent 从附加到游戏对象的脚本中获取图像