Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/149.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ OpenCV错误:在create中断言失败(!fixedSize()| |((Mat*)obj)->;size.operator()()==大小(列,行)),_C++_Multithreading_Opencv - Fatal编程技术网

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'的类型
如果我不使用线程,我没有任何问题