我正在尝试在特定场景中使用霍夫线,并且 findContours 方法一直没有匹配函数错误
代码
...
Mat bw, hsvdst;
...
bw = Mat::zeros(hsvdst.rows, hsvdst.cols, CV_8UC1);
vector<vector<Point> > contours;
vector<Vec4i> hierarchy;
findContours(bw.clone(), contours, hierarchy, RETR_EXTERNAL, CHAIN_APPROX_SIMPLE);
错误
error: no matching function for call to ‘findContours(cv::Mat, st
d::vector<std::vector<cv::Point_<int> > >&, std::vector<cv::Vec<int, 4> >&, cv::<anonymous enum>, cv::<anonymous enum>)
note: candidates are:
void cv::findContours(cv::InputOutputArray, cv::OutputArrayOfArr
ays, cv::OutputArray, int, int, cv::Point)
note: no known conversion for argument 1 from ‘cv::Mat’ to ‘cv::Inpu
tOutputArray {aka const cv::_OutputArray&}’
请协助,我不确定我在这里缺少什么。
环境:OpenCV 2.4.6.1;Eclipse CDT,Ubuntu 12.04.2