问题描述
我遵循了一个允许我静态安装opencv的教程-自从我将此代码添加到活动中以来,它就可以正常工作
I have followed a tutorial which allowed me to install opencv statically - It works since i added this code to the activity
static
{
if(!OpenCVLoader.initDebug()){
Log.d("RANCHU", "Failed");
}
else
{
Log.d("RANCHU", "SUCCESS Opencv");
}
}
它总是显示成功,但是每当我在没有opencv sdk管理器的情况下使用该应用程序时,我都会收到以下消息:
It always shows success,yet whenever I use the app with no opencv sdk manager I get the following message:
未找到OpenCV管理器pacakge!尝试安装它?
有什么建议吗?
推荐答案
似乎我不得不在网上搜索了很长时间,直到找到解决方案后,我决定为所有人一劳永逸地解决问题:
Seems I had to search the web for a long time until I found the solution I decided to solve it once and for all for everyone :
首先,我关注了此视频,该视频非常有帮助(所有版权归合法所有者所有) https://www.youtube.com/watch?v=OTw_GIQNbD8
First I followed This video which is very helpful (All credit goes to the rightful owner)https://www.youtube.com/watch?v=OTw_GIQNbD8
后来我在活动中添加了
static
{
if(!OpenCVLoader.initDebug()){
Log.d("DD", "Failed");
}
else
{
Log.d("DD", "SUCCESS Opencv");
}
}
之后,您应该在简历中添加:
After that in on resume you should add :
mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
就是这样,如果您拥有////OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_1_0, this,mLoaderCallback);
and that is it , if you have the line // OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_1_0, this,mLoaderCallback);
删除它!在我删除它之前,它没有起作用.
Remove it! Before I removed it , it didnt work.
希望它对某人有帮助
这篇关于使用android opencv应用程序而无需下载opencv sdk管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!