EVT2 RAW File encoder

The sample metavision_evt2_raw_file_encoder.cpp demonstrates how to encode a CSV file into an EVT2 format RAW file.

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

Expected Output

The sample creates a RAW file from CSV files:

  • If a CD CSV file with the format x,y,polarity,timestamp is provided as input, the output RAW file will contain CD events encoded in EVT2 format.

  • If an External Trigger output CSV file with the format value,id,timestamp is provided as input, the output RAW file will contain External Trigger Events.

How to start

First, compile the sample as described in this tutorial.

To start the sample, provide the full path to a CSV file (for example, a RAW file from our Sample Recordings converted to CSV format using the metavision_file_to_csv sample):

Linux

metavision_evt2_raw_file_encoder /path/to/output.raw /path/to/input.csv

Windows

metavision_evt2_raw_file_encoder.exe \path\to\output.raw \path\to\input.csv

Optionally, in addition to the CD events CSV file, you can also provide a CSV file containing the External Trigger Events:

Linux

metavision_evt2_raw_file_encoder /path/to/output.raw /path/to/input_cd.csv /path/to/input_external_triggers.csv

Windows

metavision_evt2_raw_file_encoder.exe \path\to\output.raw \path\to\input_cd.csv \path\to\input_external_triggers.csv