Metavision SDK contains a set of C++ utility classes aimed at simplifying the implementation of algorithms using data pipelines.
Pipeline class allows you to organize data processing in a pipeline of processing
units, called stages, and control their execution. In a pipeline, each processing stage can have previous stages and next
stages, thus forming a directed graph, for example:
In a pipeline, the goal of each stage is to perform some processes, typically from input data, and output data for the
next stages. The type of input and output data from a stage does not need to be the same.
For example, a stage could take a buffer of
Event2d as input and output a buffer
As another example, a stage could take
EventCD as input and generate
cv::Mat as output.
It is also possible for stages to have no input data or no output data.
Most stages extend from the
The main advantages of using the
Pipeline class are:
it transparently manages data transfer, without unnecessary copies;
it manages multi-threading, allowing to easily run each stage in its own thread if needed.
In the next sections, we will present how to use pipelines, and we will provide some examples of how to build pipelines and create custom stages.