【发布时间】:2018-05-21 17:02:24
【问题描述】:
我正在运行 Ubuntu 14.04。我正在尝试使用 openCV 3 运行 FLANN,但出现错误。
使用 AKAZE 和 ORB 尝试了以下所有内容,但代码来自我尝试使用 ORB 时的代码。
我使用 ORB 来查找描述符和关键点。
Ptr<ORB> detector = ORB::create();
std::vector<KeyPoint> keypoints_1, keypoints_2;
Mat descriptors_1, descriptors_2;
detector->detectAndCompute( img_1, noArray(), keypoints_1, descriptors_1 );
detector->detectAndCompute( img_2, noArray(), keypoints_2, descriptors_2 );
使用 ORB 后,我使用以下代码查找匹配项:
FlannBasedMatcher matcher;
std::vector<DMatch> matches;
matcher.match(descriptors_1, descriptors_2, matches);
代码构建良好,一切正常。当我运行代码时出现此错误:
OpenCV Error: Unsupported format or combination of formats (type=0
) in buildIndex_, file /home/jim/opencv/modules/flann/src/miniflann.cpp, line 315
terminate called after throwing an instance of 'cv::Exception'
what(): /home/jim/opencv/modules/flann/src/miniflann.cpp:315: error: (-210) type=0
in function buildIndex_
Aborted (core dumped)
谁能告诉我为什么? OpenCV 3 是否处于 BETA 状态?有没有 FLANN 的替代品(BFMatcher 除外)
【问题讨论】:
-
您能否提供更多有关您如何制作描述符的信息?一些匹配器不接受 float / int 中的描述符
-
@RafaFirenze 刚刚添加(在我上面的帖子中)我用来查找描述符的代码。
-
查看同一问题的答案here