我是靠谱客的博主 整齐帽子,这篇文章主要介绍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内容请搜索靠谱客的其他文章。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部