【发布时间】:2015-01-20 13:56:05
【问题描述】:
我正在尝试在 C++ 中对我的程序进行多线程处理(我使用 OpenCV 库) 这是代码:
double _find_eyes (Mat img, vector<Rect_<int> > & finalEyes)
{
//some code working on image
return valueOfMatch; //is a double
}
double _find_mouth (Mat img, vector<Rect_<int> > & finalMouth)
{
//some code working on image
return valueOfMatch; //is a double
}
double _find_face ()
{
eyesMatch = _find_eyes(image, eye);
mouthMatch = _find_mouth(image, mouth);
totalMatch = eyesMatch + mouthMatch;
}
int main()
{
find_face();
}
我想使用线程以并行方式找到嘴巴和眼睛。怎么做?我的问题在于非 void 函数和返回值。 提前致谢。
【问题讨论】:
标签: c++ multithreading opencv