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/cpp_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:

Linux

./metavision_composed_viewer

Windows

metavision_composed_viewer.exe

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

Linux

./metavision_composed_viewer -i spinner.hdf5

Windows

metavision_composed_viewer.exe -i spinner.hdf5

To check for additional options:

Linux

./metavision_composed_viewer -h

Windows

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.