我正在使用opencv MSER类,无法编译一个使用()的运算符。我不是c++专家,所以在这里发问,希望有人能帮上忙。
MSER类的定义包括一个()运算符:
class CV_EXPORTS_W MSER : public CvMSERParams
{
public:
...
void operator()( const Mat& image,
CV_OUT vector<vector<Point> >& msers, const Mat& mask ) const;
};使用MSER类的代码片段:
Mat yuv;
vector<vector<Point> > contours;
cv::MSER mser;
mser(yuv, contours, cv::Mat());在mser()行,xcode给出了这个错误:
No matching function for call to object of type 'cv::MSER'发布于 2013-05-25 05:56:33
问题出在这条线路上
vector<vector<Point> > contours;将其更改为
vector<vector<cv::Point> > contours;问题是在Cocoa框架中已经定义了一个Point,所以编译器正在寻找一个不存在的操作符版本。
https://stackoverflow.com/questions/11586499
复制相似问题