Code Samples & Applications

Here we give a brief summary of all Metavision samples and applications. Please, note that:

  • samples are aimed at demonstrating concepts as simple as possible. They serve as API usage examples.

  • applications are useful tools which solve specific needs (e.g. focusing, calibration, data conversion, debugging, etc.).

Metavision SDK samples & applications

Metavision SDK samples are delivered in C++ and/or Python.

Name

Description

Level

Module

Code & Doc

Application

or Sample

Simple Viewer

Displays events from an event-based camera

or from a RAW file

Easy

Core

Python

Sample

Data Viewer

Displays data from an event-based camera or from a RAW file

using SDK Driver API

Easy

Driver

C++

Application

Software Info

Prints information on the installed software

(e.g. software version)

Easy

Base

C++

Application

RAW Mosaic Viewer

Combines multiple sources of events (from several RAW files)

and results of their filtering into the same displayed frame

Easy

Driver

C++

Sample

RAW to CSV Converter

Converts RAW file to CSV-formatted file

Easy

Driver

C++

Sample

RAW to CSV Converter

Converts RAW file to CSV-formatted file

Easy

Core

Python

Sample

RAW To DAT Converter

Converts RAW file to DAT-formatted file

Easy

Driver

C++

Application

RAW File Info

Gets information about RAW file and prints it to console

Easy

Driver

C++

Application

Data Filtering

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

Easy

Core

C++ / Python

Sample

Data Noise Filtering

Filters events with a noise filter Activity, Trail or STC)

and displays them on the screen

Easy

CV

C++ / Python

Sample

Composed Viewer

Filters events and shows both unfiltered and filtered events

Easy

Core

C++

Sample

CSV Viewer

Reads CSV-formatted file and displays events on the screen

Easy

Core

C++ / Python

Sample

RAW To Video Converter

Converts events from RAW file to AVI video

Easy

Core

C++

Application

Simple Window

Shows how to create and interact with basic windows

Easy

UI

C++

Sample

Undistortion

Demonstrates how to undistort and distort events

Medium

CV

C++

Sample

Optical Flow

Computes the sparse optical flow for moving objects

Medium

CV

C++ / Python

Sample

2D Edgelet Tracking

Tracks 2D edgelets

Medium

CV3D

C++

Sample

3D Model Tracking

Tracks known 3D objects

Medium

CV3D

C++ / Python

Sample

Focusing

Helps to focus an event-based camera using a blinking pattern

Advanced

Calibration

C++

Application

Calibration

Estimates intrinsics parameters of an event-based camera

using a blinking pattern

Advanced

Calibration

C++

Application

Vibration Estimation

Estimates vibration frequency per pixel and shows the dominant

frequency (the most common frequency among all pixels)

Advanced

Analytics

C++ / Python

Sample

Object Counting

Counts small objects moving vertically (e.g. bulk counting)

Advanced

Analytics

C++ / Python

Sample

Particle Size Measurement

Counts and estimates the sizes of objects moving vertically

Advanced

Analytics

C++ / Python

Sample

Generic Tracking

Tracks any moving object

Advanced

Analytics

C++ / Python

Sample

Sparkle Tracking

Tracks simple non-colliding objects

Advanced

Analytics

C++ / Python

Sample

Detection_and_Tracking_Pipeline

Inference Pipeline of Detection and Tracking

Advanced

ML

C++ / Python

Application / Sample

Eval_coco_kpi

Evaluates Detection and Tracking pipeline on coco KPIs

Advanced

ML

Python

Sample

Vizu_gt_det

Visualizes Ground Truth and ML detection results

Medium

ML

Python

Sample

Bbox_txt2npy *

Converts Bbox from text format to numpy format

Medium

ML

Python

Sample

Export_detector *

Exports detection checkpoint to torch.jit model

Medium

ML

Python

Sample

Flow_inference *

Performs Optical Flow inference with a flow network

Medium

ML

Python

Sample

Generate_hdf5 *

Writes HDF5 feature files from event files

Advanced

ML

Python

Sample

Train_detection *

Trains Detection model with Pytorch Lightning

Advanced

ML

Python

Sample

Train_flow *

Trains Optical Flow model

Advanced

ML

Python

Sample

Viz_data(HDF5) *

Visualizes a precomputed HDF5 dataset with or without bbox labels

Advanced

ML

Python

Sample

Viz_event_simulator *

Displays events produced by the frame-to-event simulator

Advanced

ML

Python

Sample

Viz_moving_mnist *

Visualizes the Moving MNIST

Advanced

ML

Python

Sample

Please, note that ML samples marked with “*” are distributed with Metavision Professional only.

HAL samples & applications

HAL samples are delivered in C++ only.

Name

Description

Level

Application

or Sample*

HAL Ls

Lists all connected Prophesee devices

Easy

Sample

Platform Info

Prints information on the platform, connected Prophesee devices,

and installed software (useful for debug)

Medium

Application

RAW File Cutter

Cuts RAW file from/to given time

Medium

Application

HAL Viewer

Visualizes events from event-based cameras

Advanced

Sample

HAL Sync

Synchronizes event-based cameras

Advanced

Sample

HAL plugin sample

Provides an example of HAL plugin

Advanced

Sample

Metavision Designer samples

Metavision Designer samples are delivered in Python only.

Name

Description

Level

Module

Data Viewer using HAL

Streams data from an event-based camera or from a RAW file

using Metavision HAL

Easy

CV

Dat File Reader

Reads DAT-formatted file and displays events on the screen

Easy

CV

RAW To Video Converter

Converts events from RAW file to AVI video

Easy

Core

Data Rate

Demonstrates how to read events from RAW or DAT file

using PythonConsumer and how to visualize the data rate

Medium

Core

Data Filtering

Filters events and displays them on the screen

Easy

CV

Optical Flow

Computes the sparse optical flow for moving objects

Medium

CV

3D Data Viewer

Displays data from an event-based camera in a xyt axis

Advanced

3DView

Vibration Estimation

Estimates vibration frequency per pixel and shows the dominant

frequency (the most common frequency among all pixels)

Advanced

Analytics

Object Counting

Counts small objects moving vertically (e.g. bulk counting)

Advanced

Analytics

Generic Tracking

Tracks any moving object

Advanced

Analytics

Sparkle Tracking

Tracks simple non-colliding objects

Advanced

Analytics

Standalone samples

Name

Description

Level

Source file name

EVT2 RAW File decoder

Decodes an EVT 2.0 format RAW file and writes the decoded events in a CSV file

Medium

metavision_evt2_raw_file_decoder.cpp

EVT3 RAW File decoder

Decodes an EVT 3.0 format RAW file and writes the decoded events in a CSV file

Medium

metavision_evt3_raw_file_decoder.cpp

Path of samples & applications

The path of the samples and applications source code depends on your operating system and installation.

On Ubuntu, the samples and applications are located in:

  • /usr/share/metavision when installing Metavision Essentials with the packages

  • samples and python_samples folders within each module source code when using the source code

  • /usr/local/share/metavision when building from source code with the deployment step

On Windows, the samples and applications are found in:

  • C:\Program Files\Prophesee\share\metavision when installing Metavision Essentials with the installer and when building from source code with the deployment step

  • samples and python_samples folders within each module source code when using the source code

Note

The compilation steps for the samples and applications are described in this guide.