Skip to content

events to frames

Alexandre Marcireau edited this page Jun 20, 2018 · 7 revisions

example files: examples/events_to_frames

You can either create a similar directory and install the Sepia, Tarsier and Chameleon dependencies as in the basics tutorials, or run:

git clone https://github.com/neuromorphic-paris/tutorials
cd tutorials/examples/events_to_frames
git submodule update --init --recursive -- third_party/sepia
git submodule update --init --recursive -- third_party/tarsier
git submodule update --init --recursive -- third_party/chameleon
premake4 gmake
cd build
make && release/events_to_frames

Exporting event-based data as frames is useful for:

  • comparing event-based algorithms with their frame-based counterparts
  • creating media for conventional hardware, such as frame-based video files
  • using existing tools for post-processing

This example implements an ATIS Event Stream file reader which saves screenshots of the window as PNG images.

chameleon::frame_generator, documented here, implements a synchronization mechanism between the thread calling its save_frame_to function and the display thread. The events pushed to any display before calling the save_frame_to function are guaranteed to update the display before the window screenshot is taken.

It can be useful to automatically exit the Qt application when the Event Stream's end of file is reached. This example calls app.quit() in the handle_exception callback of the observable, prompting the application to exit when all the events have been handled.

Clone this wiki locally