VPI vs Visionworks (September 2020)

I’m converting an image pipeline from OpenCV into…well something faster. I noted from some previous posts (January and May 2020) that VPI is the preferred solution and that Visionworks will no longer be developed.

I also saw from the NVIDIA reply that VPI was not fully optimised as of January and that it did not support larger images.

My pipeline looks something like this…

Image:1920x1080, 16-bit grayscale, 30FPS -> bilateral filter -> pyramid search -> FIR or IIR filter -> Stabilisation -> gamma / contrast correction -> scale / encode for display.

Note that I need to rotate the image multiple times in the pipeline (currently using cv::warpAffine).

Ideally I would like a single API - so not mixing OpenCV with visionworks or VPI, but I appreciate this may not be possible now.

What is your recommendation?
Is VPI fast enough now (September 2020)?
Are there plans to extend VPI with more functions (liek JPG encode or affine warp?)

Many thanks

1 Like


It’s recommended to use VPI since VisionWorks won’t be updated anymore.

For JPEG encoder, VPI can wrap CUDA buffer into a VPIImage.
So it is possible to integrate with GStreamer and use its encoder/decoder as the IO interface.

For affine warping, VPI do support perspective warping as below:

This function can become an affine warping if the matrix is constructed as affine matrix.


Thanks for the prompt reply. I note from the link that the perspective warp is only implemented on PVA, and is only available for NV12 format.

Is there a roadmap to extend this to CPU & CUDA, and to support more image formats?


Yes. Perspective warp with CPU or CUDA is in our road map.
And this will allow the function to support more image format since there are some limitation in the PVA.

Currently, you can add a convert before and after the warping function like this:

vpiSubmitImageFormatConverter(streamConv, frameBGR, imgInput, VPI_CONVERSION_CAST, 1, 0);
vpiSubmitPerspectiveImageWarp(warp, imgInput, xform, imgOutput, VPI_INTERP_LINEAR, VPI_BOUNDARY_COND_ZERO, 0)
vpiSubmitImageFormatConverter(streamConv, imgOutput, frameBGR, VPI_CONVERSION_CAST, 1, 0);


OK, many thanks

One more question (sorry!).

If I am using VPI and I want to do simple per-element or scalar arithmetic like this…

VPIImage image1, image2, image3, outputImage;

outputImage = ( image1 * image2 * 5 ) / ( image3 + 7 );

Is this possible?


Sorry that VPI doesn’t support arithmetic operations.
For this request, please check our npp library below: