函数错误:非静态成员函数

时间:2015-01-21 11:02:53

标签: c++ function opencv member non-static

我正在尝试使用C ++和OpenCV并行执行两个函数。这两个功能几乎相同。我只报告其中一个。 我使用std::async但收到此错误:

error: reference to non-static member function must be called
auto Match = async(launch::async, **_find_mouth**, ref(image), ref(mouth));

这是代码:

using namespace std;
double _find_mouth(Mat img, Rect_<int> & finalMouth) //this is my function
{
//some operations on image
return bestMatch;
}
...
int main(){
auto Match = async(launch::async, _find_mouth, ref(image), ref(mouth)); //here is where I call it
}

问题出在哪里?怎么了? 提前谢谢。

0 个答案:

没有答案