The OpenVX Specification  r31169
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
vxu.h
1 /*
2  * Copyright (c) 2012-2015 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  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
22  */
23 
24 #ifndef _OPENVX_UTILITY_H_
25 #define _OPENVX_UTILITY_H_
26 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
45 VX_API_ENTRY vx_status VX_API_CALL vxuColorConvert(vx_context context, vx_image input, vx_image output);
46 
57 VX_API_ENTRY vx_status VX_API_CALL vxuChannelExtract(vx_context context, vx_image input, vx_enum channel, vx_image output);
58 
71 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);
72 
83 VX_API_ENTRY vx_status VX_API_CALL vxuSobel3x3(vx_context context, vx_image input, vx_image output_x, vx_image output_y);
84 
95 VX_API_ENTRY vx_status VX_API_CALL vxuMagnitude(vx_context context, vx_image grad_x, vx_image grad_y, vx_image output);
96 
107 VX_API_ENTRY vx_status VX_API_CALL vxuPhase(vx_context context, vx_image grad_x, vx_image grad_y, vx_image output);
108 
119 VX_API_ENTRY vx_status VX_API_CALL vxuScaleImage(vx_context context, vx_image src, vx_image dst, vx_enum type);
120 
131 VX_API_ENTRY vx_status VX_API_CALL vxuTableLookup(vx_context context, vx_image input, vx_lut lut, vx_image output);
132 
142 VX_API_ENTRY vx_status VX_API_CALL vxuHistogram(vx_context context, vx_image input, vx_distribution distribution);
143 
153 VX_API_ENTRY vx_status VX_API_CALL vxuEqualizeHist(vx_context context, vx_image input, vx_image output);
154 
165 VX_API_ENTRY vx_status VX_API_CALL vxuAbsDiff(vx_context context, vx_image in1, vx_image in2, vx_image out);
166 
177 VX_API_ENTRY vx_status VX_API_CALL vxuMeanStdDev(vx_context context, vx_image input, vx_float32 *mean, vx_float32 *stddev);
178 
190 VX_API_ENTRY vx_status VX_API_CALL vxuThreshold(vx_context context, vx_image input, vx_threshold thresh, vx_image output);
191 
201 VX_API_ENTRY vx_status VX_API_CALL vxuIntegralImage(vx_context context, vx_image input, vx_image output);
202 
212 VX_API_ENTRY vx_status VX_API_CALL vxuErode3x3(vx_context context, vx_image input, vx_image output);
213 
223 VX_API_ENTRY vx_status VX_API_CALL vxuDilate3x3(vx_context context, vx_image input, vx_image output);
224 
234 VX_API_ENTRY vx_status VX_API_CALL vxuMedian3x3(vx_context context, vx_image input, vx_image output);
235 
245 VX_API_ENTRY vx_status VX_API_CALL vxuBox3x3(vx_context context, vx_image input, vx_image output);
246 
256 VX_API_ENTRY vx_status VX_API_CALL vxuGaussian3x3(vx_context context, vx_image input, vx_image output);
257 
269 VX_API_ENTRY vx_status VX_API_CALL vxuConvolve(vx_context context, vx_image input, vx_convolution matrix, vx_image output);
270 
280 VX_API_ENTRY vx_status VX_API_CALL vxuGaussianPyramid(vx_context context, vx_image input, vx_pyramid gaussian);
281 
291 VX_API_ENTRY vx_status VX_API_CALL vxuAccumulateImage(vx_context context, vx_image input, vx_image accum);
292 
303 VX_API_ENTRY vx_status VX_API_CALL vxuAccumulateWeightedImage(vx_context context, vx_image input, vx_scalar scale, vx_image accum);
304 
315 VX_API_ENTRY vx_status VX_API_CALL vxuAccumulateSquareImage(vx_context context, vx_image input, vx_scalar shift, vx_image accum);
316 
331 VX_API_ENTRY vx_status VX_API_CALL vxuMinMaxLoc(vx_context context, vx_image input,
332  vx_scalar minVal, vx_scalar maxVal,
333  vx_array minLoc, vx_array maxLoc,
334  vx_scalar minCount, vx_scalar maxCount);
335 
347 VX_API_ENTRY vx_status VX_API_CALL vxuConvertDepth(vx_context context, vx_image input, vx_image output, vx_enum policy, vx_int32 shift);
348 
361 VX_API_ENTRY vx_status VX_API_CALL vxuCannyEdgeDetector(vx_context context, vx_image input, vx_threshold hyst,
362  vx_int32 gradient_size, vx_enum norm_type,
363  vx_image output);
364 
375 VX_API_ENTRY vx_status VX_API_CALL vxuHalfScaleGaussian(vx_context context, vx_image input, vx_image output, vx_int32 kernel_size);
376 
387 VX_API_ENTRY vx_status VX_API_CALL vxuAnd(vx_context context, vx_image in1, vx_image in2, vx_image out);
388 
399 VX_API_ENTRY vx_status VX_API_CALL vxuOr(vx_context context, vx_image in1, vx_image in2, vx_image out);
400 
411 VX_API_ENTRY vx_status VX_API_CALL vxuXor(vx_context context, vx_image in1, vx_image in2, vx_image out);
412 
422 VX_API_ENTRY vx_status VX_API_CALL vxuNot(vx_context context, vx_image input, vx_image output);
423 
437 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);
438 
450 VX_API_ENTRY vx_status VX_API_CALL vxuAdd(vx_context context, vx_image in1, vx_image in2, vx_enum policy, vx_image out);
451 
463 VX_API_ENTRY vx_status VX_API_CALL vxuSubtract(vx_context context, vx_image in1, vx_image in2, vx_enum policy, vx_image out);
464 
477 VX_API_ENTRY vx_status VX_API_CALL vxuWarpAffine(vx_context context, vx_image input, vx_matrix matrix, vx_enum type, vx_image output);
478 
491 VX_API_ENTRY vx_status VX_API_CALL vxuWarpPerspective(vx_context context, vx_image input, vx_matrix matrix, vx_enum type, vx_image output);
492 
510 VX_API_ENTRY vx_status VX_API_CALL vxuHarrisCorners(vx_context context,
511  vx_image input,
512  vx_scalar strength_thresh,
513  vx_scalar min_distance,
514  vx_scalar sensitivity,
515  vx_int32 gradient_size,
516  vx_int32 block_size,
517  vx_array corners,
518  vx_scalar num_corners);
519 
520 
534 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);
535 
559 VX_API_ENTRY vx_status VX_API_CALL vxuOpticalFlowPyrLK(vx_context context,
560  vx_pyramid old_images,
561  vx_pyramid new_images,
562  vx_array old_points,
563  vx_array new_points_estimates,
564  vx_array new_points,
565  vx_enum termination,
566  vx_scalar epsilon,
567  vx_scalar num_iterations,
568  vx_scalar use_initial_estimate,
569  vx_size window_dimension);
570 
581 VX_API_ENTRY vx_status VX_API_CALL vxuRemap(vx_context context,
582  vx_image input,
583  vx_remap table,
584  vx_enum policy,
585  vx_image output);
586 
587 #ifdef __cplusplus
588 }
589 #endif
590 
591 #endif
struct _vx_image * vx_image
An opaque reference to an image.
Definition: vx_types.h:166
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:272
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 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:259
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.
size_t vx_size
A wrapper of size_t to keep the naming convention uniform.
Definition: vx_types.h:146
int32_t vx_enum
Sets the standard enumeration type size to be a fixed quantity.
Definition: vx_types.h:141
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:242
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:223
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:100
float vx_float32
A 32-bit float value.
Definition: vx_types.h:118
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:401
struct _vx_context * vx_context
An opaque reference to the implementation context.
Definition: vx_types.h:202
vx_status VX_API_CALL vxuPhase(vx_context context, vx_image grad_x, vx_image grad_y, vx_image output)
[Immediate] Invokes an immediate Phase.
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 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 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:235
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.
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.
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 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 vxuConvolve(vx_context context, vx_image input, vx_convolution matrix, vx_image output)
[Immediate] Computes a convolution on the input image with the supplied matrix.
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:248
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:254
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 vxuMagnitude(vx_context context, vx_image grad_x, vx_image grad_y, vx_image output)
[Immediate] Invokes an immediate Magnitude.
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.
vx_status VX_API_CALL vxuAccumulateWeightedImage(vx_context context, vx_image input, vx_scalar scale, vx_image accum)
[Immediate] Computes a weighted accumulation.
struct _vx_matrix * vx_matrix
The Matrix Object. An MxN matrix of some unit type.
Definition: vx_types.h:229
struct _vx_scalar * vx_scalar
An opaque reference to a scalar.
Definition: vx_types.h:159
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:216
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.