OpenCV独立安装程序opencv [英] OpenCV standalone installer opencv
问题描述
我正在使用OpenCV应用程序,它工作正常,但是当我尝试安装该应用程序时,它要求下载OpenCV管理器,而我不希望这样做.我想为OpenCV应用程序制作一个独立的安装程序,其中包括内置的OpenCV管理器?我确实检查了此链接,但仍然显示弹出窗口来安装opencv?
I am working on an OpenCV app, and it works fine but when I try to install the app it asks to download the OpenCV manager, and which i dont want. I want to make a stand alone installer for OpenCV app which includes the OpenCV manager inbuit into it ? I did check this link but still it shows pop up to install opencv?
推荐答案
根据我的经验,您可能只需要执行以下2(或3)个步骤:
in my experience you maybe just need to do these 2(or 3) steps:
1.像这样更改Java中的加载库代码:
1.change the load lib code in java like this:
static {
Log.i(TAG,"OpenCV library load!");
if (!OpenCVLoader.initDebug()) {
Log.i(TAG,"OpenCV load not successfully");
}
else {
System.loadLibrary("opencv_java");// load other libraries
}
}
2.在Java中删除此代码:
2.delete this code in java:
OpenCVLoader.initAsync(OpenCVLoader.OpenCV_VERSION_2_4_3, this, mLoaderCallback);
3.如果您在项目中添加了ndk代码,也许您必须像这样编辑Android.mk文件:
3.if you have add ndk code to your project, maybe you have to edit Android.mk file like this:
OpenCV_CAMERA_MODULES:=on
OpenCV_INSTALL_MODULES:=on
OpenCV_LIB_TYPE:=SHARED
这篇关于OpenCV独立安装程序opencv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!