Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/163.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/4/matlab/15.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++ c+中的基本管道+;_C++_Pipeline - Fatal编程技术网

C++ c+中的基本管道+;

C++ c+中的基本管道+;,c++,pipeline,C++,Pipeline,我用c/c++编写了3个主要程序: 1. Read frame from video stream (using opencv VideoCapture). 2. Process frame (some tracking algorithm). 3. Write frame to new video stream(using opencv Videowriter). 我想构造一个“简单”管道(仅使用c++11),其中每个核心/线程将负责以下每个过程: t1: Thread 1 - read f

我用c/c++编写了3个主要程序:

1. Read frame from video stream (using opencv VideoCapture).
2. Process frame (some tracking algorithm).
3. Write frame to new video stream(using opencv Videowriter).
我想构造一个“简单”管道(仅使用c++11),其中每个核心/线程将负责以下每个过程:

t1: Thread 1 - read frame#1; Thread 2 - do nothing; Thread 3 - do nothing;

t2: Thread 1 - read frame#2; Thread 2 - process frame#1; Thread 3 - do nothing;

t3: Thread 1 - read frame#3; Thread 2 - process frame#2; Thread 3 - write  processed frame#1;

t4: Thread 1 - read frame#4; Thread 2 - process frame#3; Thread 3 - write  processed frame#2;
等等


感谢您在这一步骤中提供的帮助

这是一个非常广泛的问题。您可以从阅读开始,我很好奇opencv中的每个阶段是否都有异步回调?