Can I write a cv::Mat as JPEG data to a named pipe?
问题 I need to write my image data in JPEG form to a named pipe (created with mkfifo ) in Linux. But I couldn't find a way to get this working. I can write with imwrite to a plain file, but not to this FIFO. Code: img = cv::Mat(cv::Size(videoWidth, videoHeight), CV_8UC3, videoBuffer); cv::namedWindow("Display window", cv::WINDOW_NORMAL); cv::imshow("Display window", img); // Show our image inside it. cv::imwrite("image.jpg", img); How can I use a named pipe instead of a file? 回答1: I found the