This Python sample has a corresponding C++ sample.

File to CSV Sample using Python

The sample shows how to use Metavision SDK pipeline utility to convert an event-based event file (RAW, DAT or HDF5) to a CSV formatted event-based file.

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

Expected Output

The sample reads data from an event file and writes them to a CSV file in the execution path.

As this decoder is using the default settings of EventsIterator for the timestamp shifting feature (i.e. shifting is enabled), the shifted timestamps are written in the output CSV file. Hence events found in the CSV files produced by this sample will not have the same timestamps as the one produced by our Standalone Decoders.

How to start

To start the sample based on recorded data, provide the full path to an event file (for example, a RAW file from our Sample Recordings):


python3 -i FILE_NAME.raw


python -i FILE_NAME.raw