HAL Toy Sample Plugin
The sample metavision_hal_toy_sample_plugin
serves as a demonstration of how to create a camera plugin
for Metavision HAL. It uses a software-simulated device (“toy” camera), rather than a physical camera, which simplifies
the learning process. However, this also means that some of the HAL facilities,
such as biases and ROI, are not implemented. As a result, if your application attempts to use these facilities,
it may crash. To prevent this, you will need to extend the basic sample by incorporating
the missing facilities into your implementation.
If you’re looking for a sample that supports real hardware, take a look at our HAL EVK4 Sample Plugin.
The source code of this sample can be found in <install-prefix>/share/metavision/hal/cpp_samples/metavision_hal_toy_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_toy_sample_plugin metavision_viewer
Windows
set "MV_HAL_PLUGIN_PATH=<build-directory>\lib\hal_toy_sample_plugin"
metavision_viewer.exe