使用Android应用程序的静态库的OpenCV [英] OpenCV using static libraries for Android application

查看:75
本文介绍了使用Android应用程序的静态库的OpenCV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 Android Studio 4.0 应用程序中集成了 OpenCV 4.3.0 .我必须在目标Android设备上安装OpenCV Manager才能使我的应用程序正常工作.

I have integrated OpenCV 4.3.0 in my Android Studio 4.0 application. I have to install the OpenCV Manager on my target Android device to make my application work.

我点击了以下链接以集成OpenCV:
https://android.jlelse.eu/a-beginners-guide-to-setting-up-opencv-android-library-on-android-studio-19794e220f3c

I have followed below link to integrate the OpenCV:
https://android.jlelse.eu/a-beginners-guide-to-setting-up-opencv-android-library-on-android-studio-19794e220f3c

按照上面的链接,我的 Android 应用程序中有静态的 OpenCV 库.

As per the above link, I have the static OpenCV libraries in my Android application.

在我的代码中,我只是打开相机预览进行测试.我的应用程序无法加载静态库,并且我必须在Android设备上安装OpenCV Manager,然后只有我的应用程序才能完美运行.

In my code, I just open the camera preview for testing. My application fails to load the static libraries and I have to install OpenCV Manager on my Android device then only my application works perfectly.

此外,我的Android项目在 jniLinbs 文件夹 arm64-v8a armeabi-v7a x86 x86_64 .但是,我仍然必须使用OpenCV Manager应用程序来访问Camera Preview.我有以下代码要初始化.

Also, my Android project has the libraries included under the jniLinbs folder arm64-v8a, armeabi-v7a, x86, and x86_64. But still, I have to use OpenCV Manager Application for accessing the Camera Preview. I have the below code to initialize.

if (!OpenCVLoader.initDebug()) {
  // This code is getting executed  
  Log.d(TAG, "Internal OpenCV library not found. Using OpenCV Manager for initialization");
  OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_4_0, this, mLoaderCallback);
} else {
  Log.d(TAG, "OpenCV library found inside package. Using it!");
  mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
}

我想念什么吗?

我想避免使用OpenCV Manager应用程序,而是将所有库集成到一个Android应用程序中.

I want to avoid using the OpenCV Manager Application and have all the libraries integrated into one Android application.

推荐答案

  • Android的OpenCV的新版本通常不稳定
  • 请在此处下载opencv-3.4.3-android-sdk.zip,您的问题将得到解决: 查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆