Note

This C++ sample has a corresponding Python sample.

Filtering using C++

The sample metavision_filtering.cpp shows how to use Metavision SDK pipeline utility to filter and display events. It also shows how to capture the keys pressed in a display window and use them to modify the behavior of the stages while the pipeline is running.

The following filters can be applied via keyboard keys:

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

Expected Output

The sample visualizes CD events from an event-based device or a recording (RAW or HDF5 event file) after filtering:

Expected Output from Metavision Filtering 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_filtering

Windows

metavision_filtering.exe

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

Linux

./metavision_filtering -i spinner.hdf5

Windows

metavision_filtering.exe -i spinner.hdf5

Code Notes

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