我使用的是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'
答案 0 :(得分:2)
问题在于这一行
vector<vector<Point> > contours;
将其更改为
vector<vector<cv::Point> > contours;
问题在于Cocoa框架中已经定义了一个Point,因此编译器正在寻找不存在的运算符版本。