概述
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所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复