cv::remap segfaults with std::thread
问题 I am getting segfault with the following simple code: #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <thread> #include <unistd.h> void run() { sleep(1); // see below cv::Mat source(10, 10, CV_32FC1, -1); cv::Mat result(10, 10, CV_32FC1); cv::Mat trX(result.rows, result.cols, CV_32FC1, 5); cv::Mat trY(result.rows, result.cols, CV_32FC1, 5); cv::remap(source, result, trX, trY, cv::INTER_LINEAR, cv::BORDER_TRANSPARENT); std::cout <<