小编spi*_*ros的帖子

没有匹配的函数可用于调用“std::thread::thread(<未解析的重载函数类型>)”

void show_image(){\n   // Create a Mat to store images\nMat cam_image;\nERROR_CODE err; \n\n// Loop until \'e\' is pressed\nchar key = \'\';\nwhile (key != \'e\') {\n\n    // Grab images \n    err = cam.grab();\n\n    // Check if successful\n    if (err == SUCCESS) {\n        // Retrieve left image and show with OpenCV\n        cam.retrieveImage(zed_image, VIEW_LEFT);\n        cv::imshow("VIEW", cv::Mat(cam_image.getHeight(), cam_image.getWidth(), CV_8UC4, cam_image.getPtr<sl::uchar1>(sl::MEM_CPU)));\n        key = cv::waitKey(5);\n    } else\n        key = cv::waitKey(5);\n}\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n

上面的函数被这个函数调用 -threaded-:

\n\n
void startCAM()\n{\n\n    if(show_left){\n     cam_call = std::thread(show_image);\n    }\n    //Wait for data to be grabbed\n …
Run Code Online (Sandbox Code Playgroud)

c++ multithreading c++11

5
推荐指数
1
解决办法
4370
查看次数

标签 统计

c++ ×1

c++11 ×1

multithreading ×1