![]() |
VisionWorks Toolkit ReferenceDecember 18, 2015 | 1.2 Release |
OpenCV and NPP Interop Sample user guide.
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.
./nvx_sample_opencv_npp_interop [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.
Usage:
./nvx_sample_opencv_npp_interop --img1=PATH_TO_IMG1 --img2=PATH_TO_IMG2
Usage:
./nvx_sample_opencv_npp_interop --img1=PATH_TO_IMG1 --img2=PATH_TO_IMG2
Space
to pause/resume the sample.ESC
to close the sample.