The OpenVX Specification  2b213f9
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
vxu.h
1 /*
2  * Copyright (c) 2012-2016 The Khronos Group Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and/or associated documentation files (the
6  * "Materials"), to deal in the Materials without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sublicense, and/or sell copies of the Materials, and to
9  * permit persons to whom the Materials are furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included
13  * in all copies or substantial portions of the Materials.
14  *
15  * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
16  * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
17  * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
18  * https://www.khronos.org/registry/
19  *
20  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
27  */
28 
29 #ifndef _OPENVX_UTILITY_H_
30 #define _OPENVX_UTILITY_H_
31 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
50 VX_API_ENTRY vx_status VX_API_CALL vxuColorConvert(vx_context context, vx_image input, vx_image output);
51 
62 VX_API_ENTRY vx_status VX_API_CALL vxuChannelExtract(vx_context context, vx_image input, vx_enum channel, vx_image output);
63 
76 VX_API_ENTRY vx_status VX_API_CALL vxuChannelCombine(vx_context context, vx_image plane0, vx_image plane1, vx_image plane2, vx_image plane3, vx_image output);
77 
88 VX_API_ENTRY vx_status VX_API_CALL vxuSobel3x3(vx_context context, vx_image input, vx_image output_x, vx_image output_y);
89 
100 VX_API_ENTRY vx_status VX_API_CALL vxuMagnitude(vx_context context, vx_image grad_x, vx_image grad_y, vx_image mag);
101 
112 VX_API_ENTRY vx_status VX_API_CALL vxuPhase(vx_context context, vx_image grad_x, vx_image grad_y, vx_image orientation);
113 
124 VX_API_ENTRY vx_status VX_API_CALL vxuScaleImage(vx_context context, vx_image src, vx_image dst, vx_enum type);
125 
136 VX_API_ENTRY vx_status VX_API_CALL vxuTableLookup(vx_context context, vx_image input, vx_lut lut, vx_image output);
137 
147 VX_API_ENTRY vx_status VX_API_CALL vxuHistogram(vx_context context, vx_image input, vx_distribution distribution);
148 
158 VX_API_ENTRY vx_status VX_API_CALL vxuEqualizeHist(vx_context context, vx_image input, vx_image output);
159 
170 VX_API_ENTRY vx_status VX_API_CALL vxuAbsDiff(vx_context context, vx_image in1, vx_image in2, vx_image out);
171 
182 VX_API_ENTRY vx_status VX_API_CALL vxuMeanStdDev(vx_context context, vx_image input, vx_float32 *mean, vx_float32 *stddev);
183 
196 VX_API_ENTRY vx_status VX_API_CALL vxuThreshold(vx_context context, vx_image input, vx_threshold thresh, vx_image output);
197 
207 VX_API_ENTRY vx_status VX_API_CALL vxuIntegralImage(vx_context context, vx_image input, vx_image output);
208 
218 VX_API_ENTRY vx_status VX_API_CALL vxuErode3x3(vx_context context, vx_image input, vx_image output);
219 
229 VX_API_ENTRY vx_status VX_API_CALL vxuDilate3x3(vx_context context, vx_image input, vx_image output);
230 
240 VX_API_ENTRY vx_status VX_API_CALL vxuMedian3x3(vx_context context, vx_image input, vx_image output);
241 
251 VX_API_ENTRY vx_status VX_API_CALL vxuBox3x3(vx_context context, vx_image input, vx_image output);
252 
262 VX_API_ENTRY vx_status VX_API_CALL vxuGaussian3x3(vx_context context, vx_image input, vx_image output);
263 
276 VX_API_ENTRY vx_status VX_API_CALL vxuNonLinearFilter(vx_context context, vx_enum function, vx_image input, vx_matrix mask, vx_image output);
277 
278 
290 VX_API_ENTRY vx_status VX_API_CALL vxuConvolve(vx_context context, vx_image input, vx_convolution conv, vx_image output);
291 
301 VX_API_ENTRY vx_status VX_API_CALL vxuGaussianPyramid(vx_context context, vx_image input, vx_pyramid gaussian);
302 
314 VX_API_ENTRY vx_status VX_API_CALL vxuLaplacianPyramid(vx_context context, vx_image input, vx_pyramid laplacian, vx_image output);
315 
327 VX_API_ENTRY vx_status VX_API_CALL vxuLaplacianReconstruct(vx_context context, vx_pyramid laplacian, vx_image input,
328  vx_image output);
329 
339 VX_API_ENTRY vx_status VX_API_CALL vxuAccumulateImage(vx_context context, vx_image input, vx_image accum);
340 
351 VX_API_ENTRY vx_status VX_API_CALL vxuAccumulateWeightedImage(vx_context context, vx_image input, vx_scalar alpha, vx_image accum);
352 
363 VX_API_ENTRY vx_status VX_API_CALL vxuAccumulateSquareImage(vx_context context, vx_image input, vx_scalar shift, vx_image accum);
364 
379 VX_API_ENTRY vx_status VX_API_CALL vxuMinMaxLoc(vx_context context, vx_image input,
380  vx_scalar minVal, vx_scalar maxVal,
381  vx_array minLoc, vx_array maxLoc,
382  vx_scalar minCount, vx_scalar maxCount);
383 
395 VX_API_ENTRY vx_status VX_API_CALL vxuConvertDepth(vx_context context, vx_image input, vx_image output, vx_enum policy, vx_int32 shift);
396 
412  vx_int32 gradient_size, vx_enum norm_type,
413  vx_image output);
414 
425 VX_API_ENTRY vx_status VX_API_CALL vxuHalfScaleGaussian(vx_context context, vx_image input, vx_image output, vx_int32 kernel_size);
426 
437 VX_API_ENTRY vx_status VX_API_CALL vxuAnd(vx_context context, vx_image in1, vx_image in2, vx_image out);
438 
449 VX_API_ENTRY vx_status VX_API_CALL vxuOr(vx_context context, vx_image in1, vx_image in2, vx_image out);
450 
461 VX_API_ENTRY vx_status VX_API_CALL vxuXor(vx_context context, vx_image in1, vx_image in2, vx_image out);
462 
472 VX_API_ENTRY vx_status VX_API_CALL vxuNot(vx_context context, vx_image input, vx_image output);
473 
487 VX_API_ENTRY vx_status VX_API_CALL vxuMultiply(vx_context context, vx_image in1, vx_image in2, vx_float32 scale, vx_enum overflow_policy, vx_enum rounding_policy, vx_image out);
488 
500 VX_API_ENTRY vx_status VX_API_CALL vxuAdd(vx_context context, vx_image in1, vx_image in2, vx_enum policy, vx_image out);
501 
513 VX_API_ENTRY vx_status VX_API_CALL vxuSubtract(vx_context context, vx_image in1, vx_image in2, vx_enum policy, vx_image out);
514 
527 VX_API_ENTRY vx_status VX_API_CALL vxuWarpAffine(vx_context context, vx_image input, vx_matrix matrix, vx_enum type, vx_image output);
528 
541 VX_API_ENTRY vx_status VX_API_CALL vxuWarpPerspective(vx_context context, vx_image input, vx_matrix matrix, vx_enum type, vx_image output);
542 
560 VX_API_ENTRY vx_status VX_API_CALL vxuHarrisCorners(vx_context context,
561  vx_image input,
562  vx_scalar strength_thresh,
563  vx_scalar min_distance,
564  vx_scalar sensitivity,
565  vx_int32 gradient_size,
566  vx_int32 block_size,
567  vx_array corners,
568  vx_scalar num_corners);
569 
570 
584 VX_API_ENTRY vx_status VX_API_CALL vxuFastCorners(vx_context context, vx_image input, vx_scalar strength_thresh, vx_bool nonmax_suppression, vx_array corners, vx_scalar num_corners);
585 
610  vx_pyramid old_images,
611  vx_pyramid new_images,
612  vx_array old_points,
613  vx_array new_points_estimates,
614  vx_array new_points,
615  vx_enum termination,
616  vx_scalar epsilon,
617  vx_scalar num_iterations,
618  vx_scalar use_initial_estimate,
619  vx_size window_dimension);
620 
631 VX_API_ENTRY vx_status VX_API_CALL vxuRemap(vx_context context,
632  vx_image input,
633  vx_remap table,
634  vx_enum policy,
635  vx_image output);
636 
637 #ifdef __cplusplus
638 }
639 #endif
640 
641 #endif
struct _vx_image * vx_image
An opaque reference to an image.
Definition: vx_types.h:190
vx_status VX_API_CALL vxuAnd(vx_context context, vx_image in1, vx_image in2, vx_image out)
[Immediate] Computes the bitwise and between two images.
vx_bool
A Boolean value. This allows 0 to be FALSE, as it is in C, and any non-zero to be TRUE...
Definition: vx_types.h:301
vx_status VX_API_CALL vxuWarpPerspective(vx_context context, vx_image input, vx_matrix matrix, vx_enum type, vx_image output)
[Immediate] Performs an Perspective warp on an image.
vx_status VX_API_CALL vxuConvertDepth(vx_context context, vx_image input, vx_image output, vx_enum policy, vx_int32 shift)
[Immediate] Converts the input images bit-depth into the output image.
vx_status VX_API_CALL vxuPhase(vx_context context, vx_image grad_x, vx_image grad_y, vx_image orientation)
[Immediate] Invokes an immediate Phase.
vx_status VX_API_CALL vxuEqualizeHist(vx_context context, vx_image input, vx_image output)
[Immediate] Equalizes the Histogram of a grayscale image.
struct _vx_array * vx_array
The Array Object. Array is a strongly-typed container for other data structures.
Definition: vx_types.h:283
vx_status VX_API_CALL vxuMedian3x3(vx_context context, vx_image input, vx_image output)
[Immediate] Computes a median filter on the image by a 3x3 window.
vx_status VX_API_CALL vxuNonLinearFilter(vx_context context, vx_enum function, vx_image input, vx_matrix mask, vx_image output)
[Immediate] Creates a Non-linear Filter Node.
size_t vx_size
A wrapper of size_t to keep the naming convention uniform.
Definition: vx_types.h:165
int32_t vx_enum
Sets the standard enumeration type size to be a fixed quantity.
Definition: vx_types.h:160
vx_status VX_API_CALL vxuConvolve(vx_context context, vx_image input, vx_convolution conv, vx_image output)
[Immediate] Computes a convolution on the input image with the supplied matrix.
struct _vx_threshold * vx_threshold
The Threshold Object. A thresholding object contains the types and limit values of the thresholding r...
Definition: vx_types.h:266
vx_status VX_API_CALL vxuNot(vx_context context, vx_image input, vx_image output)
[Immediate] Computes the bitwise not of an image.
struct _vx_distribution * vx_distribution
The Distribution object. This has a user-defined number of bins over a user-defined range (within a u...
Definition: vx_types.h:247
vx_status VX_API_CALL vxuDilate3x3(vx_context context, vx_image input, vx_image output)
[Immediate] Dilates an image by a 3x3 window.
int32_t vx_int32
A 32-bit signed value.
Definition: vx_types.h:117
vx_status VX_API_CALL vxuLaplacianPyramid(vx_context context, vx_image input, vx_pyramid laplacian, vx_image output)
[Immediate] Computes a Laplacian pyramid from an input image.
float vx_float32
A 32-bit float value.
Definition: vx_types.h:137
vx_status VX_API_CALL vxuOr(vx_context context, vx_image in1, vx_image in2, vx_image out)
[Immediate] Computes the bitwise inclusive-or between two images.
vx_enum vx_status
A formal status type with known fixed size.
Definition: vx_types.h:428
struct _vx_context * vx_context
An opaque reference to the implementation context.
Definition: vx_types.h:226
vx_status VX_API_CALL vxuAccumulateSquareImage(vx_context context, vx_image input, vx_scalar shift, vx_image accum)
[Immediate] Computes a squared accumulation.
vx_status VX_API_CALL vxuXor(vx_context context, vx_image in1, vx_image in2, vx_image out)
[Immediate] Computes the bitwise exclusive-or between two images.
vx_status VX_API_CALL vxuAccumulateWeightedImage(vx_context context, vx_image input, vx_scalar alpha, vx_image accum)
[Immediate] Computes a weighted accumulation.
vx_status VX_API_CALL vxuRemap(vx_context context, vx_image input, vx_remap table, vx_enum policy, vx_image output)
[Immediate] Remaps an output image from an input image.
vx_status VX_API_CALL vxuHarrisCorners(vx_context context, vx_image input, vx_scalar strength_thresh, vx_scalar min_distance, vx_scalar sensitivity, vx_int32 gradient_size, vx_int32 block_size, vx_array corners, vx_scalar num_corners)
[Immediate] Computes the Harris Corners over an image and produces the array of scored points...
vx_status VX_API_CALL vxuWarpAffine(vx_context context, vx_image input, vx_matrix matrix, vx_enum type, vx_image output)
[Immediate] Performs an Affine warp on an image.
vx_status VX_API_CALL vxuTableLookup(vx_context context, vx_image input, vx_lut lut, vx_image output)
[Immediate] Processes the image through the LUT.
vx_status VX_API_CALL vxuMeanStdDev(vx_context context, vx_image input, vx_float32 *mean, vx_float32 *stddev)
[Immediate] Computes the mean value and standard deviation.
vx_status VX_API_CALL vxuOpticalFlowPyrLK(vx_context context, vx_pyramid old_images, vx_pyramid new_images, vx_array old_points, vx_array new_points_estimates, vx_array new_points, vx_enum termination, vx_scalar epsilon, vx_scalar num_iterations, vx_scalar use_initial_estimate, vx_size window_dimension)
[Immediate] Computes an optical flow on two images.
vx_status VX_API_CALL vxuMagnitude(vx_context context, vx_image grad_x, vx_image grad_y, vx_image mag)
[Immediate] Invokes an immediate Magnitude.
vx_status VX_API_CALL vxuScaleImage(vx_context context, vx_image src, vx_image dst, vx_enum type)
[Immediate] Scales an input image to an output image.
struct _vx_pyramid * vx_pyramid
The Image Pyramid object. A set of scaled images.
Definition: vx_types.h:259
vx_status VX_API_CALL vxuAdd(vx_context context, vx_image in1, vx_image in2, vx_enum policy, vx_image out)
[Immediate] Performs arithmetic addition on pixel values in the input images.
vx_status VX_API_CALL vxuMinMaxLoc(vx_context context, vx_image input, vx_scalar minVal, vx_scalar maxVal, vx_array minLoc, vx_array maxLoc, vx_scalar minCount, vx_scalar maxCount)
[Immediate] Computes the minimum and maximum values of the image.
vx_status VX_API_CALL vxuHistogram(vx_context context, vx_image input, vx_distribution distribution)
[Immediate] Generates a distribution from an image.
#define VX_API_CALL
Defines calling convention for OpenVX API.
Definition: vx_types.h:68
vx_status VX_API_CALL vxuHalfScaleGaussian(vx_context context, vx_image input, vx_image output, vx_int32 kernel_size)
[Immediate] Performs a Gaussian Blur on an image then half-scales it. The interpolation mode used is ...
vx_status VX_API_CALL vxuChannelCombine(vx_context context, vx_image plane0, vx_image plane1, vx_image plane2, vx_image plane3, vx_image output)
[Immediate] Invokes an immediate Channel Combine.
vx_status VX_API_CALL vxuColorConvert(vx_context context, vx_image input, vx_image output)
[Immediate] Invokes an immediate Color Conversion.
vx_status VX_API_CALL vxuChannelExtract(vx_context context, vx_image input, vx_enum channel, vx_image output)
[Immediate] Invokes an immediate Channel Extract.
vx_status VX_API_CALL vxuErode3x3(vx_context context, vx_image input, vx_image output)
[Immediate] Erodes an image by a 3x3 window.
vx_status VX_API_CALL vxuLaplacianReconstruct(vx_context context, vx_pyramid laplacian, vx_image input, vx_image output)
[Immediate] Reconstructs an image from a Laplacian Image pyramid.
vx_status VX_API_CALL vxuMultiply(vx_context context, vx_image in1, vx_image in2, vx_float32 scale, vx_enum overflow_policy, vx_enum rounding_policy, vx_image out)
[Immediate] Performs elementwise multiplications on pixel values in the input images and a scale...
vx_status VX_API_CALL vxuSobel3x3(vx_context context, vx_image input, vx_image output_x, vx_image output_y)
[Immediate] Invokes an immediate Sobel 3x3.
vx_status VX_API_CALL vxuBox3x3(vx_context context, vx_image input, vx_image output)
[Immediate] Computes a box filter on the image by a 3x3 window.
struct _vx_convolution * vx_convolution
The Convolution Object. A user-defined convolution kernel of MxM elements.
Definition: vx_types.h:272
struct _vx_remap * vx_remap
The remap table Object. A remap table contains per-pixel mapping of output pixels to input pixels...
Definition: vx_types.h:278
vx_status VX_API_CALL vxuGaussianPyramid(vx_context context, vx_image input, vx_pyramid gaussian)
[Immediate] Computes a Gaussian pyramid from an input image.
vx_status VX_API_CALL vxuAccumulateImage(vx_context context, vx_image input, vx_image accum)
[Immediate] Computes an accumulation.
vx_status VX_API_CALL vxuThreshold(vx_context context, vx_image input, vx_threshold thresh, vx_image output)
[Immediate] Threshold's an input image and produces a VX_DF_IMAGE_U8 * boolean image.
vx_status VX_API_CALL vxuAbsDiff(vx_context context, vx_image in1, vx_image in2, vx_image out)
[Immediate] Computes the absolute difference between two images.
vx_status VX_API_CALL vxuGaussian3x3(vx_context context, vx_image input, vx_image output)
[Immediate] Computes a gaussian filter on the image by a 3x3 window.
vx_status VX_API_CALL vxuIntegralImage(vx_context context, vx_image input, vx_image output)
[Immediate] Computes the integral image of the input.
struct _vx_matrix * vx_matrix
The Matrix Object. An MxN matrix of some unit type.
Definition: vx_types.h:253
struct _vx_scalar * vx_scalar
An opaque reference to a scalar.
Definition: vx_types.h:183
vx_status VX_API_CALL vxuSubtract(vx_context context, vx_image in1, vx_image in2, vx_enum policy, vx_image out)
[Immediate] Performs arithmetic subtraction on pixel values in the input images.
vx_status VX_API_CALL vxuFastCorners(vx_context context, vx_image input, vx_scalar strength_thresh, vx_bool nonmax_suppression, vx_array corners, vx_scalar num_corners)
[Immediate] Computes corners on an image using FAST algorithm and produces the array of feature point...
struct _vx_lut * vx_lut
The Look-Up Table (LUT) Object.
Definition: vx_types.h:240
vx_status VX_API_CALL vxuCannyEdgeDetector(vx_context context, vx_image input, vx_threshold hyst, vx_int32 gradient_size, vx_enum norm_type, vx_image output)
[Immediate] Computes Canny Edges on the input image into the output image.