HAL Sample Plugin

The sample metavision_hal_sample_plugin shows how to create a camera plugin for Metavision HAL. For some explanations on camera plugins architecture, check our Camera Plugin page.

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

How to start

First, compile the sample as described in this tutorial.

To use the sample plugin when running an executable, you need to set the environment variable MV_HAL_PLUGIN_PATH. For example, if you want to run metavision_viewer with the sample plugin, run:

Linux

MV_HAL_PLUGIN_PATH=<build-directory>/lib/hal_sample_plugin metavision_viewer

Windows

set "MV_HAL_PLUGIN_PATH=<build-directory>\lib\hal_sample_plugin"
metavision_viewer.exe

Warning

This sample plugin does not implement some of the HAL facilities (like biases and ROI), so the sample/application you use will crash if it tries to use those facilities. To avoid this, you will have to build on the top of this basic sample and add the missing facilities. If you are an event-based camera distributor or integrator and want your product to be compatible with Metavision SDK, contact us to get access to all software support to develop and distribute your own Metavision Plugin.