VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OpenCV and NPP Interop Sample App

OpenCV and NPP Interop Sample user guide.

Introduction

nvx_sample_opencv_npp_interop shows the interoperability of VisionWorks with other libraries, such as OpenCV and NPP.

This sample accepts 2 images as input, blurs them, and performs alpha blending between them.

The sample uses OpenCV library for loading the input images and displaying the result image. The images loaded by OpenCV are imported into the VisionWorks framework using the vxCreateImageFromHandle function. For alpha blending, the NPP library is used. The alpha blending operation is implemented as User Defined Kernel. For blurring standard Gaussian3x3 kernel is used.

The full pipeline is implemented as the following graph:

   (image1)        (image2)
      |               |
[Gaussian3x3]   [Gaussian3x3]
      |               |
      +-------+-------+
              |
         [AlphaComp]
              |
          (output)

For detailed information about User Defined Kernels, see Framework: User Kernels.

nvx_sample_opencv_npp_interop is installed in the following directory:

/usr/share/visionworks/sources/samples/opencv_npp_interop

For the steps to build sample applications, see the Sample and Demos User Guides section for your OS.

Executing the OpenCV and NPP Interoperability Sample

./nvx_sample_opencv_npp_interop [options]

Command Line Options

The [--img1] and [--img2] options specify the 2 images to perform alpha blending. The input images must be of the same size. Input images can be ommitted; in that case, the demo will use images from default data set.

--img1

--img2

-h, --help

Operational Keys