1 <!-- Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. -->
3 @defgroup nvx_sample_opencv_npp_interop OpenCV and NPP Interop Sample App
4 @brief OpenCV and NPP Interop Sample user guide.
8 <a name=
"Introduction">
11 `nvx_sample_opencv_npp_interop` shows the interoperability of VisionWorks with other libraries,
12 such as OpenCV and NPP.
14 This sample accepts 2 images as input, blurs them, and performs alpha blending between them.
16 The sample uses OpenCV library
for loading the input images and displaying the result image.
17 The images loaded by OpenCV are imported into the VisionWorks framework
using the `
vxCreateImageFromHandle`
function.
18 For alpha blending, the NPP library is used. The alpha blending operation is implemented as User Defined Kernel.
19 For blurring standard `Gaussian3x3` kernel is used.
21 The full pipeline is implemented as the following graph:
25 [Gaussian3x3] [Gaussian3x3]
33 For detailed information about User Defined Kernels, see @ref group_user_kernels.
35 `nvx_sample_opencv_npp_interop` is installed in the following directory:
37 /usr/share/visionworks/sources/samples/opencv_npp_interop
39 For the steps to build sample applications, see the @ref nvx_samples_and_demos_user_guides section
for your OS.
42 ## Executing the OpenCV and NPP Interoperability Sample ##
44 ./nvx_sample_opencv_npp_interop [options]
46 ### Command Line Options ###
48 The `[--img1]` and `[--img2]` options specify the 2 images to perform alpha blending.
49 The input images must be of the same size. Input images can be ommitted; in that
case,
50 the demo will use images from
default data set.
55 - Description: Specifies the first image to perform alpha blending.
58 `./nvx_sample_opencv_npp_interop --img1=PATH_TO_IMG1 --img2=PATH_TO_IMG2`
63 - Description: Specifies the second image to perform alpha blending.
66 `./nvx_sample_opencv_npp_interop --img1=PATH_TO_IMG1 --img2=PATH_TO_IMG2`
68 #### \-h, \--help ####
69 - Description: Prints the help message.
71 ### Operational Keys ###
72 - Use `Space` to pause/resume the sample.
73 - Use `ESC` to close the sample.
vx_image VX_API_CALL vxCreateImageFromHandle(vx_context context, vx_df_image color, vx_imagepatch_addressing_t addrs[], void *ptrs[], vx_enum import_type)
Creates a reference to an image object that was externally allocated.