Note
This C++ sample has a corresponding Python sample.
Time Surface Sample using C++
The sample metavision_time_surface.cpp
shows how to use SDK Core MostRecentTimestampBuffer
class
to compute the Time Surface of the CD events and to display it using our SDK UI module.
The source code of this sample can be found in <install-prefix>/share/metavision/sdk/core/cpp_samples/metavision_time_surface
when installing Metavision SDK from installer or packages. For other deployment methods, check the page
Path of Samples.
Expected Output
The sample visualizes the Time Surface of events:
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_time_surface
Windows
metavision_time_surface.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_time_surface -i hand_spinner.hdf5
Windows
metavision_time_surface.exe -i hand_spinner.hdf5
To check for additional options:
Linux
./metavision_time_surface -h
Windows
metavision_time_surface.exe -h