Open modules samples

Metavision Open Modules

Open modules C++ samples

C++ samples of the open modules allow you to understand the building blocks of the SDK by starting from basic examples. If you want to start programming from the ground up, you should start with the C++ Get Started tutorial.

In the following table, for each sample, you will find:

Name

Description

Module

Using SDK

pipelines

UI framework

used for display

Main algorithms or classes

demonstrated in the sample

metavision_software_info

Prints information on the installed software

(e.g. software version)

Base

No

N/A

SoftwareInfo

metavision_sdk_get_started

Sample explained step by step that shows how to print statistics

and display frames from an event-based camera or from a RAW file

Core

No

SDK UI

Camera

PeriodicFrameGenerationAlgorithm

metavision_active_pixel_detection

Application that detects and masks active pixels

(application designed for future sensors)

Driver

No

OpenCV

Camera

CDFrameGenerator

metavision_viewer

Displays data from an event-based camera or from a RAW, DAT or

HDF5 file using SDK Driver API

Driver

No

OpenCV

Camera

CDFrameGenerator

metavision_evk3d_viewer

Displays data from an EVK3D stream as a depth map

Driver

No

OpenCV

Camera

metavision_file_cutter

Cuts RAW or HDF5 event file from/to given time

Driver

No

N/A

RAWEventFileWriter

HDF5EventFileWriter

metavision_file_info

Gets information about an event file and prints it to console

Driver

No

N/A

Camera

metavision_file_to_csv

Converts an event file to CSV-formatted file in C++

Driver

No

N/A

Camera::from_file

metavision_file_to_dat

Converts an event file to DAT-formatted file

Driver

No

N/A

StreamLoggerAlgorithm

metavision_file_to_hdf5

Converts an event file to an HDF5 event file in C++

Driver

Yes

N/A

HDF5EventFileWriter

metavision_file_to_video

Converts an event file to an AVI video

Core

No

N/A

CvVideoRecorder

PeriodicFrameGenerationAlgorithm

metavision_filtering

Filters events (ROI + polarity) and displays them on the screen

Core

Yes

SDK UI

RoiFilterAlgorithm

PolarityFilterAlgorithm

metavision_composed_viewer

Filters events and shows both unfiltered and filtered events

Core

Yes

SDK UI

FrameCompositionStage

metavision_csv_viewer

Reads CSV-formatted file and displays events on the screen

Core

Yes

SDK UI

BaseStage

metavision_event_frame_generation

Generate and displays histo/diff event frames from event files

Core

No

SDK UI

EventFrameDiffGenerationAlgorithm

EventFrameHistoGenerationAlgorithm

metavision_event_frame_gpu_loading

Preprocesses raw event frame files on a GPU using CUDA

Core

No

N/A

metavision_time_surface

Displays Time Surface of events

Core

No

SDK UI

MostRecentTimestampBuffer

metavision_simple_windows

Shows how to create and interact with basic windows

UI

No

SDK UI

Window

MTWindow

Open modules Python samples

Python samples of the open modules allow you to understand the building blocks of the SDK by starting from basic examples. If you want to start programming from the ground up, you should start with the Python Get started tutorial.

In the following table, for each sample, you will find its modules and the main algorithms or classes demonstrated in the sample.

Name

Description

Module

Main algorithms or classes

demonstrated in the sample

metavision_sdk_get_started

Sample explained step by step that shows how to print statistics

and display frames from an event-based camera or from a RAW file

Core

EventsIterator

PeriodicFrameGenerationAlgorithm

metavision_simple_viewer

Displays events from an event-based camera

or from an event file (RAW, DAT or HDF5)

Core

LiveReplayEventsIterator

PeriodicFrameGenerationAlgorithm

metavision_simple_recorder

Record events from an event-based camera to a RAW file

Core

I_EventsStream

metavision_file_to_csv

Converts event file (RAW, DAT or HDF5) file to CSV-formatted file in Python

Core

EventsIterator

metavision_filtering

Filters events (ROI + polarity) and displays them on the screen

Core

PolarityFilterAlgorithm

RoiFilterAlgorithm

metavision_csv_viewer

Reads CSV-formatted file and displays events on the screen

Core

PeriodicFrameGenerationAlgorithm

metavision_interop

Reads multiple AER event file formats and

displays events on the screen

Core

EventsIterator

metavision_sync

Synchronizes event-based cameras

Core

initiate_device

metavision_adaptive_rate

Reads RAW, dynamically splits into event frames based on the

content of the stream, and displays result on screen

Core

AdaptiveRateEventsIterator

AdaptiveRateEventsSplitterAlgorithm

metavision_time_surface

Displays Time Surface of events

Core

MostRecentTimestampBuffer

demo_event_to_video

Demonstrates Event to Video ML pipeline

Core ML

EventToVideoLightningModel

train_event_to_video

Trains Event to Video ML pipeline

Core ML

EventToVideoLightningModel

viz_data_event_to_video

Visualize Event to Video training data

Core ML

GPUEBSIM

viz_video_to_event_simulator

Demonstrates CPU Video to Event ML pipeline

Core ML

viz_events

viz_video_to_event_gpu_simulator

Demonstrates GPU Video to Event ML pipeline

Core ML

GPUEventSimulator

demo_corner_detection

Demonstrates Corner Detection ML pipeline

Core ML

CornerDetectionLightningModel

train_corner_detection

Trains Corner Detection ML pipeline

Core ML

CornerDetectionLightningModel

HAL C++ samples

HAL is the API to access camera functionalities in a generic way (i.e. hiding the hardware specificities of each device). You can discover how to operate and tune sensors and cameras using this API. The samples listed in the table below can be used as starting point.

Note

If you want to build a full-featured application in C++ (with display, data conversion etc.), you might consider using the Driver module that offers a user-friendly API to access the camera and the data with the Camera class (Metavision::Camera). Follow the tutorial Get Started using C++ to discover SDK Driver C++ API. And if you want to code in Python, follow the tutorial Python Get started that shows how you can use EventsIterator to stream events.

Name

Description

Main algorithm or class

demonstrated in the sample

metavision_hal_ls

Lists all connected Prophesee devices

DeviceDiscovery

metavision_platform_info

Prints information on the platform, connected devices,

and installed software (useful for debug)

I_HW_Identification

metavision_raw_cutter

Cuts RAW file from/to given time

I_Decoder

I_EventsStream

metavision_hal_seek

Seek in a RAW file

I_EventsStream

metavision_hal_showcase

Showcases various HAL API facilities

I_TriggerIn

I_TriggerOut

EventExtTrigger

I_Monitoring

I_LL_Biases

I_EventRateActivityFilterModule

I_DigitalEventMask

I_HW_Identification

I_DigitalCrop

metavision_hal_sync

Synchronizes event-based cameras

I_DeviceControl

metavision_hal_sample_plugin

Provides an example of HAL plugin

CameraDiscovery

Note

The HAL API is available in C++ and Python but we currently have samples only for the C++ API. If you want to use Python, we recommend to follow the Python Getting Started guide and check the HAL Python API documentation.

Camera Plugins Samples

Some samples are showing advanced usage of our sensors. When installing the SDK from packages/installer, those samples can be found in : <install-prefix>/share/metavision/hal_psee_plugins/cpp_samples/SAMPLE_NAME.

Name

Description

Sensor

metavision_imx636_facility_casting_sample

Accesses sensor specific implementations of HAL facilities.

For more information, check Hardware Layer Library page.

IMX636

metavision_riscv_logger

Receives log messages from an application embedded in the sensor

For more information, launch metavision_riscv_logger -h.

GenX320