C++ OpenCV错误:在create中断言失败(!fixedSize()| |((Mat*)obj)->;size.operator()()==大小(列,行)),
我使用定义为以下函数的线程获得此运行时错误:C++ OpenCV错误:在create中断言失败(!fixedSize()| |((Mat*)obj)->;size.operator()()==大小(列,行)),,c++,multithreading,opencv,C++,Multithreading,Opencv,我使用定义为以下函数的线程获得此运行时错误: void doubleThresholding(InputArray imgin, OutputArray imgout, uchar T1, uchar T2, InputArray mask) 这是一个使用双阈值分割图像的函数,其中InputArray和OutputArray是OpenCV类 这是创建线程对象的代码部分: Mat nusegmB; thread t1(doubleThresh
void doubleThresholding(InputArray imgin, OutputArray imgout, uchar T1,
uchar T2, InputArray mask)
这是一个使用双阈值分割图像的函数,其中InputArray和OutputArray是OpenCV类
这是创建线程对象的代码部分:
Mat nusegmB;
thread t1(doubleThresholding,rgb[0],nusegmB,55,60,cytosegm);
t1.join();
我尝试在rgb[0]、nusegmB和cytosegm上使用std::ref(),但没有编译。我收到以下错误消息:
error: no type named ‘type’ in ‘class std::result_of<void (*(cv::Mat, std::reference_wrapper<cv::Mat>, int, int, cv::Mat))(const cv::_InputArray&, const cv::_OutputArray&, unsigned char, unsigned char, const cv::_InputArray&)>’
错误:在'class std::result\u of'中没有名为'type'的类型
如果我不使用线程,我没有任何问题