Vision Programming Interface (nvm_vpi)
The NvMedia nvm_vpi sample application demonstrates how to use the NvMedia Vision Programming Interface (VPI) APIs to perform computer vision operations. The sample uses the NVIDIA® Tegra® PVA (Programmable Vision Accelerator) hardware engine.
nvm_vpi provides options to select which algorithm to run, and which hardware engine to run it on. Test input data and reference output is currently part of the application.
Architecture
The following diagram shows the architecture of the nvm_vpi application.
In this diagram, “***” is a placeholder. For example, NvMediaVPI***UnRegister could be any of the following:
• NvMediaVPIArrayUnregister
• NvMediaVPIImageUnregister
• NvMediaVPIPyramidUnregister
Running the Sample Application
Prerequisites
To run the sample
1. Navigate to:
samples/nvmedia/vpi/
2. Launch the application:
$ nvm_vpi -e <engine ID> -t < test ID> -v <Logging Level>
Command Line Options
This is the nvm_vpi command syntax:
$ nvm_vpi [-h] [-v <Logging Level>] [-e <Engine ID>] [-t Test ID>]
The following table describes the command line options. All of the options are optional.
If the application is run without any options, it sequentially runs through all test IDs on engine 0.
Option | Parameter | Description |
-h | N/A | Displays guidance on using this application. |
-e | [engine ID] | Specifies the hardware engine ID on which to run the test. |
-t | [test ID] | Specifies the ID of the test to run. The value may be: • 0: All tests (the default) • 1: Convolution • 2: BoxFilter • 3: ProcessStereoPair with Output Motion Vector Hints • 4: ProcessStereoPair with Output Stereo Disparity • 5: GetImagePyramid • 6: ConvolveImageSeparable • 7: GetKeyPointsFast • 8: GetHarrisKeyPoints • 9: SparseFlowPyrLK • 10: ConvertMV |
-v | [level] | Specifies the logging level. The value may be: • 0 = Errors • 1 = Warnings • 2 = Info • 3 = Debug If the ‑v option is used with no level, it defaults to 3. If the option is not used, it defaults to 0. |
Examples
Convolution on PVA 0
$ nvm_vpi -e 0 -t 1 -v 3
Harris Key Points on PVA 1
$ nvm_vpi -e 1 -t 8 -v 3