我是靠谱客的博主 整齐帽子,最近开发中收集的这篇文章主要介绍java knnmatch_BFMatcher knnMatch,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

2015-02-25 21:23:36

1

I try to implement knnMatch on BFMatcher as follows:

BFMatcher matcher(NORM_L2, true);

vector matches;

//matcher.match(descriptors1, descriptors2, matches);

matcher.knnMatch(descriptors1, descriptors2, matches, 2);

And receive the following error:

fiducialMain.cpp: In function ‘void fiducialCalc(cv::Mat, cv::Mat, cv::Mat&, cv::Mat&, int&)’:

fiducialMain.cpp:98:56: error: no matching function for call to ‘cv::BFMatcher::knnMatch(cv::Mat&, cv::Mat&, std::vector<:dmatch>&, int)’

matcher.knnMatch(descriptors1, descriptors2, matches,2);

^

fiducialMain.cpp:98:56: note: candidates are:

In file included from fiducialMain.cpp:15:0:

/usr/local/include/opencv2/features2d/features2d.hpp:1116:18: note: void cv::DescriptorMatcher::knnMatch(const cv::Mat&, const cv::Mat&, std::vector<:vector> >&, int, const cv::Mat&, bool) const

CV_WRAP void knnMatch( const Mat& queryDescriptors, const Mat& trainDescriptors,

^

/usr/local/include/opencv2/features2d/features2d.hpp:1116:18: note: no known conversion for argument 3 from ‘std::vector<:dmatch>’ to ‘std::vector<:vector> >&’

/usr/local/include/opencv2/features2d/features2d.hpp:1130:18: note: void cv::DescriptorMatcher::knnMatch(const cv::Mat&, std::vector<:vector> >&, int, const std::vector<:mat>&, bool)

CV_WRAP void knnMatch( const Mat& queryDescriptors, CV_OUT vector >& matches, int k,

^

/usr/local/include/opencv2/features2d/features2d.hpp:1130:18: note: no known conversion for argument 2 from ‘cv::Mat’ to ‘std::vector<:vector> >&’

Can anybody explain this error?

最后

以上就是整齐帽子为你收集整理的java knnmatch_BFMatcher knnMatch的全部内容,希望文章能够帮你解决java knnmatch_BFMatcher knnMatch所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(82)

评论列表共有 0 条评论

立即
投稿
返回
顶部