无法在openCV 3.2中创建DescriptorMatcher-Android [英] Unable to create DescriptorMatcher in openCV 3.2 - Android

查看:186
本文介绍了无法在openCV 3.2中创建DescriptorMatcher-Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Android中运行以下openCV代码:

I'm running the following openCV code in Android:

FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB);
DescriptorExtractor descriptor = DescriptorExtractor.create(DescriptorExtractor.ORB);
DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);

在openCV 2.4.1中工作正常 在openCV 3.2中,出现以下异常:

It works fine in openCV 2.4.1 In openCV 3.2 I'm getting the following exception:

java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.features2d.DescriptorMatcher.create_1(int) (tried Java_org_opencv_features2d_DescriptorMatcher_create_11 and Java_org_opencv_features2d_DescriptorMatcher_create_11__I)
                                                                                     at org.opencv.features2d.DescriptorMatcher.create_1(Native Method)
                                                                                     at org.opencv.features2d.DescriptorMatcher.create(DescriptorMatcher.java:76)

我在2种不同的Android设备上进行了检查.我是在做错什么还是新的openCV版本中的错误?

I checked it on 2 different Android devices. Am I doing something wrong or is this a bug in the new openCV version?

推荐答案

Google Play上的OpenCV管理器当前存在问题.我还不支持3.2版.为了解决该问题,我将SDK的libs目录(sdk \ native \ libs)复制到了应用程序的src/main/jniLibs中.请注意,我正在使用Android Studio.在Eclipse中,它应该位于应用程序的根目录下.参见:在Android中加载本机库时出错

There is currently a problem with the OpenCV Manager on Google Play. I doesn't support version 3.2 yet. To overcome the problem I copied the libs directory (sdk\native\libs) from the SDK to src/main/jniLibs of my application. Please note that I'm using Android Studio. In Eclipse it supposed to be located under the root of the app. see: Error while loading Native Library in Android

这篇关于无法在openCV 3.2中创建DescriptorMatcher-Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆