Composed Viewer Sample using C++

The sample metavision_composed_viewer.cpp shows how to use Metavision SDK pipeline utility to filter events and show a frame combining unfiltered and filtered events. It also shows how to set a custom consuming callback on a Metavision::FrameCompositionStage instance, so that it can consume data from multiple stages.

The source code of this sample can be found in <install-prefix>/share/metavision/sdk/core/samples/metavision_adaptive_rate when installing Metavision SDK from installer or packages. For other deployment methods, check the page Path of Samples.

Expected Output

The sample visualizes an output combined frame composed of input CD events and polarity filtered events:

Expected Output from Metavision Composed Viewer Sample

How to start

First, compile the sample as described in this tutorial.

To start the sample based on the live stream from your camera, run:





To start the sample based on recorded data, provide the full path to a RAW file (here, we use the file spinner.raw from our Sample Recordings):


./metavision_composed_viewer -i spinner.raw


metavision_composed_viewer.exe -i spinner.raw

To check for additional options:


./metavision_composed_viewer -h


metavision_composed_viewer.exe -h

Code Notes

The code of this sample is explained in the page about Building a Complex Pipeline within the chapter on pipelines.