gpt4 book ai didi

android - 无法在 openCV 3.2 中创建 DescriptorMatcher - Android

转载 作者:太空宇宙 更新时间:2023-11-03 22:49:22 25 4
gpt4 key购买 nike

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

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 中,出现以下异常:

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 版本中的错误?

最佳答案

你的代码是正确的,我已经在我的 OpenCV 3.1 项目上试过了,它运行得很好。我不知道 OpenCV 3.2,但它应该是一样的。您是否尝试输入匹配器的相应 int 值?

DescriptorMatcher matcher = DescriptorMatcher.create(4);

您可以在这里找到相应的 Int 值 DescriptorMatcher OpenCV 3.2 .看起来 DescriptorMatcher.BRUTEFORCE_HAMMING 被认为是一个 long insted of int。

关于android - 无法在 openCV 3.2 中创建 DescriptorMatcher - Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41788433/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com