Note

This Python sample may be slow depending on the event rate of the scene and the configuration of the algorithm. We provide it to allow quick prototyping. For better performance, look at the corresponding C++ sample.

Noise Filtering using Python

The Python bindings of Metavision SDK CV provides different noise filtering strategies.

The sample metavision_noise_filtering.py shows how to use the Python bindings of Metavision SDK CV to apply different noise filtering strategies. In addition, it shows how to capture keys pressed in a display window used to modify the behavior of the stages while the pipeline is running.

The following filters can be applied via keyboard keys:

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

Expected Output

The sample visualizes CD events after filtering (here, we applied Activity Filter):

Expected Output from Metavision Noise Filtering Sample

How to start

To start the sample based on the live stream from your camera, run:

Linux

python3 metavision_noise_filtering.py

Windows

python metavision_noise_filtering.py

To start the sample, you need to provide recorded data with the full path to a file (here, we use a file from our Sample Recordings):

Linux

python3 metavision_noise_filtering.py -i monitoring_40_50hz.hdf5

Windows

python metavision_noise_filtering.py -i monitoring_40_50hz.hdf5