The OpenVX Specification  r28647
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
vx_api.h
1 /*
2  * Copyright (c) 2012-2014 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_API_H_
25 #define _OPENVX_API_H_
26 
34 #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
35 #if defined(VX_BUILDING)
36 #if defined(__GNUC__)
37 #define VX_API __attribute__((dllexport))
38 #else
39 #define VX_API __declspec(dllexport)
40 #endif
41 #else
42 #if defined(__GNUC__)
43 #define VX_API __attribute__((dllimport))
44 #else
45 #define VX_API __declspec(dllimport)
46 #endif
47 #endif
48 #else
49 #if (__GNUC__ >= 4)
50 #define VX_API __attribute__((visibility("default")))
51 #else
52 #define VX_API
53 #endif
54 #endif
55 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
66 /*==============================================================================
67  CONTEXT
68  =============================================================================*/
69 
80 
95 VX_API vx_status vxReleaseContext(vx_context *context);
96 
103 VX_API vx_context vxGetContext(vx_reference reference);
104 
117 VX_API vx_status vxQueryContext(vx_context context, vx_enum attribute, void *ptr, vx_size size);
118 
131 VX_API vx_status vxSetContextAttribute(vx_context context, vx_enum attribute, void *ptr, vx_size size);
132 
144 VX_API vx_status vxHint(vx_context context, vx_reference reference, vx_enum hint);
145 
157 VX_API vx_status vxDirective(vx_context context, vx_reference reference, vx_enum directive);
158 
177 VX_API vx_status vxGetStatus(vx_reference reference);
178 
193 VX_API vx_enum vxRegisterUserStruct(vx_context context, vx_size size);
194 
195 /*==============================================================================
196  IMAGE
197  =============================================================================*/
198 
209 VX_API vx_image vxCreateImage(vx_context context, vx_uint32 width, vx_uint32 height, vx_df_image color);
210 
222 
249 VX_API vx_image vxCreateUniformImage(vx_context context, vx_uint32 width, vx_uint32 height, vx_df_image color, void *value);
250 
279 VX_API vx_image vxCreateVirtualImage(vx_graph graph, vx_uint32 width, vx_uint32 height, vx_df_image color);
280 
295 VX_API vx_image vxCreateImageFromHandle(vx_context context, vx_df_image color, vx_imagepatch_addressing_t addrs[], void *ptrs[], vx_enum import_type);
296 
309 VX_API vx_status vxQueryImage(vx_image image, vx_enum attribute, void *ptr, vx_size size);
310 
322 VX_API vx_status vxSetImageAttribute(vx_image image, vx_enum attribute, void *out, vx_size size);
323 
333 VX_API vx_status vxReleaseImage(vx_image *image);
334 
344  vx_rectangle_t *rect,
345  vx_uint32 plane_index);
346 
374  vx_rectangle_t *rect,
375  vx_uint32 plane_index,
377  void **ptr,
378  vx_enum usage);
379 
405  vx_rectangle_t *rect,
406  vx_uint32 plane_index,
408  void *ptr);
409 
420 VX_API void *vxFormatImagePatchAddress1d(void *ptr, vx_uint32 index, vx_imagepatch_addressing_t *addr);
421 
434 
454 
455 /*==============================================================================
456  KERNEL
457  =============================================================================*/
458 
478 VX_API vx_status vxLoadKernels(vx_context context, vx_char *module);
479 
491 VX_API vx_kernel vxGetKernelByName(vx_context context, vx_char *name);
492 
504 VX_API vx_kernel vxGetKernelByEnum(vx_context context, vx_enum kernel);
505 
519 VX_API vx_status vxQueryKernel(vx_kernel kernel, vx_enum attribute, void *ptr, vx_size size);
520 
530 VX_API vx_status vxReleaseKernel(vx_kernel *kernel);
531 
551 VX_API vx_kernel vxAddKernel(vx_context context,
553  vx_enum enumeration,
554  vx_kernel_f func_ptr,
555  vx_uint32 numParams,
559  vx_kernel_deinitialize_f deinit);
560 
570 VX_API vx_status vxFinalizeKernel(vx_kernel kernel);
571 
584 VX_API vx_status vxAddParameterToKernel(vx_kernel kernel, vx_uint32 index, vx_enum dir, vx_enum data_type, vx_enum state);
585 
597 VX_API vx_status vxRemoveKernel(vx_kernel kernel);
598 
609 VX_API vx_status vxSetKernelAttribute(vx_kernel kernel, vx_enum attribute, void *ptr, vx_size size);
610 
620 
621 /*==============================================================================
622  GRAPH
623  =============================================================================*/
624 
631 VX_API vx_graph vxCreateGraph(vx_context context);
632 
645 VX_API vx_status vxReleaseGraph(vx_graph *graph);
646 
671 VX_API vx_status vxVerifyGraph(vx_graph graph);
672 
689 VX_API vx_status vxProcessGraph(vx_graph graph);
690 
701 VX_API vx_status vxScheduleGraph(vx_graph graph);
702 
711 VX_API vx_status vxWaitGraph(vx_graph graph);
712 
721 VX_API vx_status vxQueryGraph(vx_graph graph, vx_enum attribute, void *ptr, vx_size size);
722 
731 VX_API vx_status vxSetGraphAttribute(vx_graph graph, vx_enum attribute, void *ptr, vx_size size);
732 
743 VX_API vx_status vxAddParameterToGraph(vx_graph graph, vx_parameter parameter);
744 
758 
768 
778 VX_API vx_bool vxIsGraphVerified(vx_graph graph);
779 
780 /*==============================================================================
781  NODE
782  =============================================================================*/
783 
797 VX_API vx_node vxCreateGenericNode(vx_graph graph, vx_kernel kernel);
798 
809 VX_API vx_status vxQueryNode(vx_node node, vx_enum attribute, void *ptr, vx_size size);
810 
825 VX_API vx_status vxSetNodeAttribute(vx_node node, vx_enum attribute, void *ptr, vx_size size);
826 
836 VX_API vx_status vxReleaseNode(vx_node *node);
837 
843 VX_API void vxRemoveNode(vx_node *node);
844 
859 
868 
869 /*==============================================================================
870  PARAMETER
871  =============================================================================*/
872 
880 
891 
901 
911 
920 VX_API vx_status vxQueryParameter(vx_parameter param, vx_enum attribute, void *ptr, vx_size size);
921 
922 /*==============================================================================
923  SCALAR
924  =============================================================================*/
925 
936 VX_API vx_scalar vxCreateScalar(vx_context context, vx_enum data_type, void *ptr);
937 
947 VX_API vx_status vxReleaseScalar(vx_scalar *scalar);
948 
957 VX_API vx_status vxQueryScalar(vx_scalar scalar, vx_enum attribute, void *ptr, vx_size size);
958 
972 VX_API vx_status vxAccessScalarValue(vx_scalar ref, void *ptr);
973 
987 VX_API vx_status vxCommitScalarValue(vx_scalar ref, void *ptr);
988 
989 /*==============================================================================
990  REFERENCE
991  =============================================================================*/
992 
1001 VX_API vx_status vxQueryReference(vx_reference ref, vx_enum attribute, void *ptr, vx_size size);
1002 
1003 /*==============================================================================
1004  DELAY
1005  =============================================================================*/
1006 
1015 VX_API vx_status vxQueryDelay(vx_delay delay, vx_enum attribute, void *ptr, vx_size size);
1016 
1026 VX_API vx_status vxReleaseDelay(vx_delay *delay);
1027 
1038 VX_API vx_delay vxCreateDelay(vx_context context,
1039  vx_reference exemplar,
1040  vx_size count);
1041 
1054 
1065 VX_API vx_status vxAgeDelay(vx_delay delay);
1066 
1067 
1068 /*==============================================================================
1069  LOGGING
1070  =============================================================================*/
1071 
1080 VX_API void vxAddLogEntry(vx_reference ref, vx_status status, const char *message, ...);
1081 
1089 VX_API void vxRegisterLogCallback(vx_context context, vx_log_callback_f callback, vx_bool reentrant);
1090 
1091 /*==============================================================================
1092  LUT
1093  =============================================================================*/
1094 
1105 VX_API vx_lut vxCreateLUT(vx_context context, vx_enum data_type, vx_size count);
1106 
1116 VX_API vx_status vxReleaseLUT(vx_lut *lut);
1117 
1126 VX_API vx_status vxQueryLUT(vx_lut lut, vx_enum attribute, void *ptr, vx_size size);
1127 
1147 VX_API vx_status vxAccessLUT(vx_lut lut, void **ptr, vx_enum usage);
1148 
1162 VX_API vx_status vxCommitLUT(vx_lut lut, void *ptr);
1163 
1164 /*==============================================================================
1165  DISTRIBUTION
1166  =============================================================================*/
1167 
1176 VX_API vx_distribution vxCreateDistribution(vx_context context, vx_size numBins, vx_size offset, vx_size range);
1177 
1187 VX_API vx_status vxReleaseDistribution(vx_distribution *distribution);
1188 
1197 VX_API vx_status vxQueryDistribution(vx_distribution distribution, vx_enum attribute, void *ptr, vx_size size);
1198 
1212 VX_API vx_status vxAccessDistribution(vx_distribution distribution, void **ptr, vx_enum usage);
1213 
1222 VX_API vx_status vxCommitDistribution(vx_distribution distribution, void * ptr);
1223 
1224 /*==============================================================================
1225  THRESHOLD
1226  =============================================================================*/
1227 
1238 VX_API vx_threshold vxCreateThreshold(vx_context c, vx_enum thresh_type, vx_enum data_type);
1239 
1249 VX_API vx_status vxReleaseThreshold(vx_threshold *thresh);
1250 
1259 VX_API vx_status vxSetThresholdAttribute(vx_threshold thresh, vx_enum attribute, void *ptr, vx_size size);
1260 
1269 VX_API vx_status vxQueryThreshold(vx_threshold thresh, vx_enum attribute, void *ptr, vx_size size);
1270 
1271 /*==============================================================================
1272  MATRIX
1273  =============================================================================*/
1274 
1283 VX_API vx_matrix vxCreateMatrix(vx_context c, vx_enum data_type, vx_size columns, vx_size rows);
1284 
1294 VX_API vx_status vxReleaseMatrix(vx_matrix *mat);
1295 
1304 VX_API vx_status vxQueryMatrix(vx_matrix mat, vx_enum attribute, void *ptr, vx_size size);
1305 
1315 VX_API vx_status vxAccessMatrix(vx_matrix mat, void *array);
1316 
1326 VX_API vx_status vxCommitMatrix(vx_matrix mat, void *array);
1327 
1328 /*==============================================================================
1329  CONVOLUTION
1330  =============================================================================*/
1331 
1343 VX_API vx_convolution vxCreateConvolution(vx_context context, vx_size columns, vx_size rows);
1344 
1355 
1364 VX_API vx_status vxQueryConvolution(vx_convolution conv, vx_enum attribute, void *ptr, vx_size size);
1365 
1374 VX_API vx_status vxSetConvolutionAttribute(vx_convolution conv, vx_enum attribute, void *ptr, vx_size size);
1375 
1386 
1397 
1398 /*==============================================================================
1399  PYRAMID
1400  =============================================================================*/
1401 
1417 VX_API vx_pyramid vxCreatePyramid(vx_context context, vx_size levels, vx_float32 scale, vx_uint32 width, vx_uint32 height, vx_df_image format);
1418 
1448 VX_API vx_pyramid vxCreateVirtualPyramid(vx_graph graph, vx_size levels, vx_float32 scale, vx_uint32 width, vx_uint32 height, vx_df_image format);
1449 
1450 
1461 
1470 VX_API vx_status vxQueryPyramid(vx_pyramid pyr, vx_enum attribute, void *ptr, vx_size size);
1471 
1480 VX_API vx_image vxGetPyramidLevel(vx_pyramid pyr, vx_uint32 index);
1481 
1482 /*==============================================================================
1483  REMAP
1484  =============================================================================*/
1485 
1497 VX_API vx_remap vxCreateRemap(vx_context context,
1498  vx_uint32 src_width,
1499  vx_uint32 src_height,
1500  vx_uint32 dst_width,
1501  vx_uint32 dst_height);
1502 
1512 VX_API vx_status vxReleaseRemap(vx_remap *table);
1513 
1523 VX_API vx_status vxSetRemapPoint(vx_remap table,
1524  vx_uint32 dst_x, vx_uint32 dst_y,
1525  vx_float32 src_x, vx_float32 src_y);
1526 
1536 VX_API vx_status vxGetRemapPoint(vx_remap table,
1537  vx_uint32 dst_x, vx_uint32 dst_y,
1538  vx_float32 *src_x, vx_float32 *src_y);
1539 
1548 VX_API vx_status vxQueryRemap(vx_remap r, vx_enum attribute, void *ptr, vx_size size);
1549 
1550 /*==============================================================================
1551  ARRAY
1552  =============================================================================*/
1553 
1574 VX_API vx_array vxCreateArray(vx_context context, vx_enum item_type, vx_size capacity);
1575 
1605 VX_API vx_array vxCreateVirtualArray(vx_graph graph, vx_enum item_type, vx_size capacity);
1606 
1617 VX_API vx_status vxReleaseArray(vx_array *arr);
1618 
1635 VX_API vx_status vxQueryArray(vx_array arr, vx_enum attribute, void *ptr, vx_size size);
1636 
1660 VX_API vx_status vxAddArrayItems(vx_array arr, vx_size count, void *ptr, vx_size stride);
1661 
1675 VX_API vx_status vxTruncateArray(vx_array arr, vx_size new_num_items);
1676 
1699 VX_API vx_status vxAccessArrayRange(vx_array arr, vx_size start, vx_size end, vx_size *stride, void **ptr, vx_enum usage);
1700 
1719 VX_API vx_status vxCommitArrayRange(vx_array arr, vx_size start, vx_size end, void *ptr);
1720 
1728 #define vxFormatArrayPointer(ptr, index, stride) \
1729  (&(((vx_uint8*)(ptr))[(index) * (stride)]))
1730 
1739 #define vxArrayItem(type, ptr, index, stride) \
1740  (*(type *)(vxFormatArrayPointer((ptr), (index), (stride))))
1741 
1742 /*==============================================================================
1743  META FORMAT
1744  =============================================================================*/
1745 
1759 VX_API vx_status vxSetMetaFormatAttribute(vx_meta_format meta, vx_enum attribute, void *ptr, vx_size size);
1760 
1761 #ifdef __cplusplus
1762 }
1763 #endif
1764 
1765 #endif
1766 
struct _vx_image * vx_image
An opaque reference to an image.
Definition: vx_types.h:144
vx_image 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.
vx_context vxCreateContext()
Creates a vx_context.
struct _vx_delay * vx_delay
The delay object. This is like a ring buffer of objects that is maintained by the OpenVX implementati...
Definition: vx_types.h:188
vx_status vxAgeDelay(vx_delay delay)
Ages the internal delay ring by one. This means that once this API is called the reference from index...
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:250
vx_status vxRemoveKernel(vx_kernel kernel)
Removes a non-finalized vx_kernel from the vx_context. Once a vx_kernel has been finalized it cannot ...
vx_status vxAccessArrayRange(vx_array arr, vx_size start, vx_size end, vx_size *stride, void **ptr, vx_enum usage)
Grants access to a sub-range of an Array.
vx_status vxAddParameterToGraph(vx_graph graph, vx_parameter parameter)
Adds the given parameter extracted from a vx_node to the graph.
vx_status vxQueryImage(vx_image image, vx_enum attribute, void *ptr, vx_size size)
Retrieves various attributes of an image.
vx_status vxQueryKernel(vx_kernel kernel, vx_enum attribute, void *ptr, vx_size size)
This allows the client to query the kernel to get information about the number of parameters...
vx_status vxReleaseMatrix(vx_matrix *mat)
Releases a reference to a matrix object. The object may not be garbage collected until its total refe...
vx_status vxReleaseParameter(vx_parameter *param)
Releases a reference to a parameter object. The object may not be garbage collected until its total r...
vx_status vxSetNodeAttribute(vx_node node, vx_enum attribute, void *ptr, vx_size size)
Allows a user to set attribute of a node before Graph Validation.
vx_remap vxCreateRemap(vx_context context, vx_uint32 src_width, vx_uint32 src_height, vx_uint32 dst_width, vx_uint32 dst_height)
Creates a remap table object.
vx_status(* vx_kernel_f)(vx_node node, vx_reference *parameters, vx_uint32 num)
The pointer to the Host side kernel.
Definition: vx_types.h:1162
vx_status vxQueryReference(vx_reference ref, vx_enum attribute, void *ptr, vx_size size)
Queries any reference type for some basic information (count, type).
vx_matrix vxCreateMatrix(vx_context c, vx_enum data_type, vx_size columns, vx_size rows)
Creates a reference to a matrix object.
vx_status vxCommitImagePatch(vx_image image, vx_rectangle_t *rect, vx_uint32 plane_index, vx_imagepatch_addressing_t *addr, void *ptr)
This allows the User to commit a rectangular patch (subset) of an image from a single plane...
vx_status vxReleaseLUT(vx_lut *lut)
Releases a reference to a LUT object. The object may not be garbage collected until its total referen...
struct _vx_array * vx_array
The Array Object. Array is a strongly-typed container for other data structures.
Definition: vx_types.h:237
void vxAddLogEntry(vx_reference ref, vx_status status, const char *message,...)
Adds a line to the log.
vx_status vxQueryDelay(vx_delay delay, vx_enum attribute, void *ptr, vx_size size)
Queries a vx_delay object attribute.
vx_enum vxRegisterUserStruct(vx_context context, vx_size size)
Registers user-defined structures to the context.
void vxRemoveNode(vx_node *node)
Removes a Node from its parent Graph and releases it.
int16_t vx_int16
A 16-bit signed value.
Definition: vx_types.h:73
vx_reference vxGetReferenceFromDelay(vx_delay delay, vx_int32 index)
Retrieves a reference from a delay object.
size_t vx_size
A wrapper of size_t to keep the naming convention uniform.
Definition: vx_types.h:124
vx_status vxTruncateArray(vx_array arr, vx_size new_num_items)
Truncates an Array (remove items from the end).
vx_status vxReleaseImage(vx_image *image)
Releases a reference to an image object. The object may not be garbage collected until its total refe...
vx_kernel vxGetKernelByEnum(vx_context context, vx_enum kernel)
Obtains a reference to the kernel using the vx_kernel_e enumeration.
int32_t vx_enum
Sets the standard enumeration type size to be a fixed quantity.
Definition: vx_types.h:119
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:220
vx_image vxGetPyramidLevel(vx_pyramid pyr, vx_uint32 index)
Retrieves a level of the pyramid as a vx_image, which can be used elsewhere in OpenVX.
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:201
vx_parameter vxGetParameterByIndex(vx_node node, vx_uint32 index)
Retrieves a vx_parameter from a vx_node.
vx_status vxAccessScalarValue(vx_scalar ref, void *ptr)
Gets the scalar value out of a reference.
vx_status vxQueryDistribution(vx_distribution distribution, vx_enum attribute, void *ptr, vx_size size)
Queries a Distribution object.
vx_convolution vxCreateConvolution(vx_context context, vx_size columns, vx_size rows)
Creates a reference to a convolution matrix object.
void * vxFormatImagePatchAddress2d(void *ptr, vx_uint32 x, vx_uint32 y, vx_imagepatch_addressing_t *addr)
Accesses a specific pixel at a 2d coordinate in an image patch.
void(* vx_log_callback_f)(vx_context context, vx_reference ref, vx_status status, vx_char string[])
The log callback function.
Definition: vx_types.h:1407
vx_image vxCreateImageFromROI(vx_image img, vx_rectangle_t *rect)
Creates an image from another image given a rectangle. This second reference refers to the data in th...
struct _vx_parameter * vx_parameter
An opaque reference to a single parameter.
Definition: vx_types.h:159
int32_t vx_int32
A 32-bit signed value.
Definition: vx_types.h:78
vx_status vxQueryNode(vx_node node, vx_enum attribute, void *ptr, vx_size size)
Allows a user to query information out of a node.
The addressing image patch structure is used by the Host only to address pixels in an image patch...
Definition: vx_types.h:1273
vx_context vxGetContext(vx_reference reference)
Retrieves the context from any reference from within a context.
vx_status vxCommitDistribution(vx_distribution distribution, void *ptr)
Sets the Distribution back to the memory. The memory must be a vx_uint32 array of a value at least as...
vx_status vxCommitMatrix(vx_matrix mat, void *array)
Sets the matrix data (copy)
vx_status vxSetImageAttribute(vx_image image, vx_enum attribute, void *out, vx_size size)
Allows setting attributes on the image.
vx_status(* vx_kernel_output_validate_f)(vx_node node, vx_uint32 index, vx_meta_format meta)
The user-defined kernel node output parameter validation function. The function only needs to fill in...
Definition: vx_types.h:1216
vx_kernel vxAddKernel(vx_context context, vx_char name[VX_MAX_KERNEL_NAME], vx_enum enumeration, vx_kernel_f func_ptr, vx_uint32 numParams, vx_kernel_input_validate_f input, vx_kernel_output_validate_f output, vx_kernel_initialize_f init, vx_kernel_deinitialize_f deinit)
Allows users to add custom kernels to the known kernel database in OpenVX at run-time. This would primarily be used by the module function vxPublishKernels.
char vx_char
An 8 bit ASCII character.
Definition: vx_types.h:43
float vx_float32
A 32-bit float value.
Definition: vx_types.h:96
vx_pyramid vxCreatePyramid(vx_context context, vx_size levels, vx_float32 scale, vx_uint32 width, vx_uint32 height, vx_df_image format)
Creates a reference to a pyramid object of the supplied number of levels.
vx_status vxReleaseKernel(vx_kernel *kernel)
Release the reference to the kernel. The object may not be garbage collected until its total referenc...
vx_pyramid vxCreateVirtualPyramid(vx_graph graph, vx_size levels, vx_float32 scale, vx_uint32 width, vx_uint32 height, vx_df_image format)
Creates a reference to a virtual pyramid object of the supplied number of levels. ...
vx_status vxReleaseDelay(vx_delay *delay)
Releases a reference to a delay object. The object may not be garbage collected until its total refer...
vx_status vxCommitArrayRange(vx_array arr, vx_size start, vx_size end, void *ptr)
Commits data back to the Array object.
vx_status vxReleaseScalar(vx_scalar *scalar)
Releases a reference to a scalar object. The object may not be garbage collected until its total refe...
vx_status vxReleaseRemap(vx_remap *table)
Releases a reference to a remap table object. The object may not be garbage collected until its total...
vx_enum vx_status
A formal status type with known fixed size.
Definition: vx_types.h:365
vx_status vxScheduleGraph(vx_graph graph)
Schedules a graph for future execution.
struct _vx_context * vx_context
An opaque reference to the implementation context.
Definition: vx_types.h:180
struct _vx_meta_format * vx_meta_format
This structure is used to extract meta data from a validation function. If the data object between no...
Definition: vx_types.h:263
vx_status vxReleaseConvolution(vx_convolution *conv)
Releases the reference to a convolution matrix. The object may not be garbage collected until its tot...
vx_status vxGetValidRegionImage(vx_image image, vx_rectangle_t *rect)
Retrieves the valid region of the image as a rectangle.
struct _vx_reference * vx_reference
A generic opaque reference to any object within OpenVX.
Definition: vx_types.h:112
vx_status vxCommitConvolutionCoefficients(vx_convolution conv, vx_int16 *array)
Sets the convolution data (copy),.
vx_nodecomplete_f vxRetrieveNodeCallback(vx_node node)
Retrieves the current node callback function pointer set on the node.
vx_status vxReleaseGraph(vx_graph *graph)
Releases a reference to a graph. The object may not be garbage collected until its total reference co...
vx_status vxReleaseArray(vx_array *arr)
Releases a reference of an Array object. The object may not be garbage collected until its total refe...
vx_array vxCreateArray(vx_context context, vx_enum item_type, vx_size capacity)
Creates a reference to an Array object.
vx_status vxAddArrayItems(vx_array arr, vx_size count, void *ptr, vx_size stride)
Adds items to the Array.
vx_status vxGetStatus(vx_reference reference)
Provides a generic API to return status values from Object constructors if they fail.
vx_size vxComputeImagePatchSize(vx_image image, vx_rectangle_t *rect, vx_uint32 plane_index)
This computes the size needed to retrieve an image patch from an image.
vx_status vxQueryConvolution(vx_convolution conv, vx_enum attribute, void *ptr, vx_size size)
Queries an attribute on the convolution matrix object.
uint32_t vx_df_image
Used to hold a VX_DF_IMAGE code to describe the pixel format and color space.
Definition: vx_types.h:129
vx_status vxQueryRemap(vx_remap r, vx_enum attribute, void *ptr, vx_size size)
Queries attributes from a Remap table.
vx_status vxReleaseContext(vx_context *context)
Releases the OpenVX object context.
vx_status vxProcessGraph(vx_graph graph)
This function causes the synchronous processing of a graph. If the graph has not been verified...
void vxRegisterLogCallback(vx_context context, vx_log_callback_f callback, vx_bool reentrant)
Registers a callback facility to the OpenVX implementation to receive error logs. ...
vx_parameter vxGetGraphParameterByIndex(vx_graph graph, vx_uint32 index)
Retrieves a vx_parameter from a vx_graph.
vx_bool vxIsGraphVerified(vx_graph graph)
Returns a Boolean to indicate the state of graph verification.
void * vxFormatImagePatchAddress1d(void *ptr, vx_uint32 index, vx_imagepatch_addressing_t *addr)
Accesses a specific indexed pixel in an image patch.
vx_status vxQueryArray(vx_array arr, vx_enum attribute, void *ptr, vx_size size)
Queries the Array for some specific information.
vx_status vxQueryScalar(vx_scalar scalar, vx_enum attribute, void *ptr, vx_size size)
Queries attributes from a scalar.
vx_status vxSetGraphAttribute(vx_graph graph, vx_enum attribute, void *ptr, vx_size size)
Allows the set to attributes on the Graph.
vx_status(* vx_kernel_initialize_f)(vx_node node, vx_reference *parameters, vx_uint32 num)
The pointer to the kernel initializer. If the host code requires a call to initialize data once all t...
Definition: vx_types.h:1173
vx_status vxAccessConvolutionCoefficients(vx_convolution conv, vx_int16 *array)
Gets the convolution data (copy).
struct _vx_pyramid * vx_pyramid
The Image Pyramid object. A set of scaled images.
Definition: vx_types.h:213
vx_node vxCreateGenericNode(vx_graph graph, vx_kernel kernel)
Creates a reference to a node object for a given kernel.
vx_status vxSetMetaFormatAttribute(vx_meta_format meta, vx_enum attribute, void *ptr, vx_size size)
Allows a user to set the attributes of a vx_meta_format object in a kernel output validator...
struct _vx_kernel * vx_kernel
An opaque reference to the descriptor of a kernel.
Definition: vx_types.h:152
vx_status vxAssignNodeCallback(vx_node node, vx_nodecomplete_f callback)
Assigns a callback to a node. If a callback already exists in this node, this function must return an...
vx_status vxAccessImagePatch(vx_image image, vx_rectangle_t *rect, vx_uint32 plane_index, vx_imagepatch_addressing_t *addr, void **ptr, vx_enum usage)
Allows the User to extract a rectangular patch (subset) of an image from a single plane...
vx_status vxQueryContext(vx_context context, vx_enum attribute, void *ptr, vx_size size)
Queries the context for some specific information.
vx_status vxWaitGraph(vx_graph graph)
Waits for a specific graph to complete.
vx_status vxFinalizeKernel(vx_kernel kernel)
This API is called after all parameters have been added to the kernel and the kernel is ready to be u...
The rectangle data structure that is shared with the users.
Definition: vx_types.h:1365
vx_status vxCommitLUT(vx_lut lut, void *ptr)
Commits the Lookup Table.
vx_status(* vx_kernel_deinitialize_f)(vx_node node, vx_reference *parameters, vx_uint32 num)
The pointer to the kernel deinitializer. If the host code requires a call to deinitialize data during...
Definition: vx_types.h:1184
vx_status vxAddParameterToKernel(vx_kernel kernel, vx_uint32 index, vx_enum dir, vx_enum data_type, vx_enum state)
Allows users to set the signatures of the custom kernel.
vx_status vxQueryMatrix(vx_matrix mat, vx_enum attribute, void *ptr, vx_size size)
Queries an attribute on the matrix object.
vx_status vxSetConvolutionAttribute(vx_convolution conv, vx_enum attribute, void *ptr, vx_size size)
Sets attributes on the convolution object.
vx_status vxHint(vx_context context, vx_reference reference, vx_enum hint)
Provides a generic API to give platform-specific hints to the implementation.
vx_kernel vxGetKernelByName(vx_context context, vx_char *name)
Obtains a reference to a kernel using a string to specify the name.
vx_status vxReleasePyramid(vx_pyramid *pyr)
Releases a reference to a pyramid object. The object may not be garbage collected until its total ref...
vx_status vxCommitScalarValue(vx_scalar ref, void *ptr)
Sets the scalar value in a reference.
vx_status vxGetRemapPoint(vx_remap table, vx_uint32 dst_x, vx_uint32 dst_y, vx_float32 *src_x, vx_float32 *src_y)
Retrieves the source pixel point from a destination pixel.
vx_status vxQueryLUT(vx_lut lut, vx_enum attribute, void *ptr, vx_size size)
Queries attributes from a LUT.
vx_status vxSetKernelAttribute(vx_kernel kernel, vx_enum attribute, void *ptr, vx_size size)
Sets kernel attributes.
struct _vx_convolution * vx_convolution
The Convolution Object. A user-defined convolution kernel of MxM elements.
Definition: vx_types.h:226
vx_status vxSetRemapPoint(vx_remap table, vx_uint32 dst_x, vx_uint32 dst_y, vx_float32 src_x, vx_float32 src_y)
Assigns a destination pixel mapping to the source pixel.
vx_status vxQueryThreshold(vx_threshold thresh, vx_enum attribute, void *ptr, vx_size size)
Queries an attribute on the threshold object.
#define VX_MAX_KERNEL_NAME
Defines the maximum string length of a kernel name to be added to OpenVX.
Definition: vx.h:41
vx_status vxReleaseThreshold(vx_threshold *thresh)
Releases a reference to a threshold object. The object may not be garbage collected until its total r...
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:232
vx_array vxCreateVirtualArray(vx_graph graph, vx_enum item_type, vx_size capacity)
Creates an opaque reference to a virtual Array with no direct user access.
uint32_t vx_uint32
A 32-bit unsigned value.
Definition: vx_types.h:58
vx_status vxAccessLUT(vx_lut lut, void **ptr, vx_enum usage)
Gets direct access to the LUT table data.
vx_distribution vxCreateDistribution(vx_context context, vx_size numBins, vx_size offset, vx_size range)
Creates a reference to a 1D Distribution with a start offset, valid range, and number of equally weig...
vx_parameter vxGetKernelParameterByIndex(vx_kernel kernel, vx_uint32 index)
Retrieves a vx_parameter from a vx_kernel.
vx_status vxDirective(vx_context context, vx_reference reference, vx_enum directive)
Provides a generic API to give platform-specific directives to the implementations.
vx_threshold vxCreateThreshold(vx_context c, vx_enum thresh_type, vx_enum data_type)
Creates a reference to a threshold object of a given type.
vx_lut vxCreateLUT(vx_context context, vx_enum data_type, vx_size count)
Creates LUT object of a given type.
vx_status vxSetThresholdAttribute(vx_threshold thresh, vx_enum attribute, void *ptr, vx_size size)
Sets attributes on the threshold object.
vx_action(* vx_nodecomplete_f)(vx_node node)
A callback to the client after a particular node has completed.
Definition: vx_types.h:380
vx_graph vxCreateGraph(vx_context context)
Creates an empty graph.
vx_status vxSetContextAttribute(vx_context context, vx_enum attribute, void *ptr, vx_size size)
Sets an attribute on the context.
struct _vx_graph * vx_graph
An opaque reference to a graph.
Definition: vx_types.h:173
vx_status vxReleaseDistribution(vx_distribution *distribution)
Releases a reference to a distribution object. The object may not be garbage collected until its tota...
vx_status vxVerifyGraph(vx_graph graph)
Verifies the state of the graph before it is executed. This is useful to catch programmer errors and ...
vx_status vxSetGraphParameterByIndex(vx_graph graph, vx_uint32 index, vx_reference value)
Sets a reference to the parameter on the graph. The implementation must set this parameter on the ori...
vx_status(* vx_kernel_input_validate_f)(vx_node node, vx_uint32 index)
The user-defined kernel node input parameter validation function.
Definition: vx_types.h:1200
struct _vx_node * vx_node
An opaque reference to a kernel node.
Definition: vx_types.h:166
vx_image vxCreateImage(vx_context context, vx_uint32 width, vx_uint32 height, vx_df_image color)
Creates an opaque reference to an image buffer.
vx_status vxSetParameterByIndex(vx_node node, vx_uint32 index, vx_reference value)
Sets the specified parameter data for a kernel on the node.
vx_status vxQueryParameter(vx_parameter param, vx_enum attribute, void *ptr, vx_size size)
Allows the client to query a parameter to determine its meta-information.
vx_delay vxCreateDelay(vx_context context, vx_reference exemplar, vx_size count)
Creates a Delay object.
struct _vx_matrix * vx_matrix
The Matrix Object. An MxN matrix of some unit type.
Definition: vx_types.h:207
struct _vx_scalar * vx_scalar
An opaque reference to a scalar.
Definition: vx_types.h:137
vx_status vxAccessMatrix(vx_matrix mat, void *array)
Gets the matrix data (copy).
vx_scalar vxCreateScalar(vx_context context, vx_enum data_type, void *ptr)
Creates a reference to a scalar object. Also see Node Parameters.
vx_image vxCreateVirtualImage(vx_graph graph, vx_uint32 width, vx_uint32 height, vx_df_image color)
Creates an opaque reference to an image buffer with no direct user access. This function allows setti...
vx_status vxReleaseNode(vx_node *node)
Releases a reference to a Node object. The object may not be garbage collected until its total refere...
vx_status vxQueryPyramid(vx_pyramid pyr, vx_enum attribute, void *ptr, vx_size size)
Queries an attribute from an image pyramid.
vx_status vxQueryGraph(vx_graph graph, vx_enum attribute, void *ptr, vx_size size)
Allows the user to query attributes of the Graph.
vx_status vxSetParameterByReference(vx_parameter parameter, vx_reference value)
Associates a parameter reference and a data reference with a kernel on a node.
struct _vx_lut * vx_lut
The Look-Up Table (LUT) Object.
Definition: vx_types.h:194
vx_status vxAccessDistribution(vx_distribution distribution, void **ptr, vx_enum usage)
Gets direct access to a Distribution in memory.
vx_status vxLoadKernels(vx_context context, vx_char *module)
Loads one or more kernels into the OpenVX context. This is the interface by which OpenVX is extensibl...
vx_image vxCreateUniformImage(vx_context context, vx_uint32 width, vx_uint32 height, vx_df_image color, void *value)
Creates a reference to an image object that has a singular, uniform value in all pixels.