forked from rgiduthuri/openvx_tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvx_kernels.h
More file actions
297 lines (246 loc) · 11 KB
/
vx_kernels.h
File metadata and controls
297 lines (246 loc) · 11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
/*
* Copyright (c) 2012-2015 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
#ifndef _OPENVX_KERNELS_H_
#define _OPENVX_KERNELS_H_
/*!
* \file
* \brief The list of supported kernels in the OpenVX standard.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*! \brief The standard list of available libraries */
enum vx_library_e {
/*! \brief The base set of kernels as defined by Khronos. */
VX_LIBRARY_KHR_BASE = 0x0,
};
/*!
* \brief The standard list of available vision kernels.
*
* Each kernel listed here can be used with the <tt>\ref vxGetKernelByEnum</tt> call.
* When programming the parameters, use
* \arg <tt>\ref VX_INPUT</tt> for [in]
* \arg <tt>\ref VX_OUTPUT</tt> for [out]
* \arg <tt>\ref VX_BIDIRECTIONAL</tt> for [in,out]
*
* When programming the parameters, use
* \arg <tt>\ref VX_TYPE_IMAGE</tt> for a <tt>\ref vx_image</tt> in the size field of <tt>\ref vxGetParameterByIndex</tt> or <tt>\ref vxSetParameterByIndex</tt> * \arg <tt>\ref VX_TYPE_ARRAY</tt> for a <tt>\ref vx_array</tt> in the size field of <tt>\ref vxGetParameterByIndex</tt> or <tt>\ref vxSetParameterByIndex</tt> * \arg or other appropriate types in \ref vx_type_e.
* \ingroup group_kernel
*/
enum vx_kernel_e {
/*!
* \brief The invalid kernel is used to for conformance failure in relation to
* some kernel operation (Get/Release).
* \details If the kernel is executed it shall always return an error.
* The kernel has no parameters. To address by name use "org.khronos.openvx.invalid".
*/
VX_KERNEL_INVALID = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x0,
/*!
* \brief The Color Space conversion kernel.
* \details The conversions are based on the <tt>\ref vx_df_image_e</tt> code in the images.
* \see group_vision_function_colorconvert
*/
VX_KERNEL_COLOR_CONVERT = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x1,
/*!
* \brief The Generic Channel Extraction Kernel.
* \details This kernel can remove individual color channels from an interleaved
* or semi-planar, planar, sub-sampled planar image. A client could extract
* a red channel from an interleaved RGB image or do a Luma extract from a
* YUV format.
* \see group_vision_function_channelextract
*/
VX_KERNEL_CHANNEL_EXTRACT = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x2,
/*!
* \brief The Generic Channel Combine Kernel.
* \details This kernel combine multiple individual planes into a single
* multiplanar image of the type specified in the output image.
* \see group_vision_function_channelcombine
*/
VX_KERNEL_CHANNEL_COMBINE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x3,
/*! \brief The Sobel 3x3 Filter Kernel.
* \see group_vision_function_sobel3x3
*/
VX_KERNEL_SOBEL_3x3 = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x4,
/*!
* \brief The Magnitude Kernel.
* \details This kernel produces a magnitude plane from two input gradients.
* \see group_vision_function_magnitude
*/
VX_KERNEL_MAGNITUDE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x5,
/*!
* \brief The Phase Kernel.
* \details This kernel produces a phase plane from two input gradients.
* \see group_vision_function_phase
*/
VX_KERNEL_PHASE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x6,
/*!
* \brief The Scale Image Kernel.
* \details This kernel provides resizing of an input image to an output image.
* The scaling factor is determined but the relative sizes of the input and
* output.
* \see group_vision_function_scale_image
*/
VX_KERNEL_SCALE_IMAGE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x7,
/*! \brief The Table Lookup kernel
* \see group_vision_function_lut
*/
VX_KERNEL_TABLE_LOOKUP = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x8,
/*! \brief The Histogram Kernel.
* \see group_vision_function_histogram
*/
VX_KERNEL_HISTOGRAM = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x9,
/*! \brief The Histogram Equalization Kernel.
* \see group_vision_function_equalize_hist
*/
VX_KERNEL_EQUALIZE_HISTOGRAM = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0xA,
/*! \brief The Absolute Difference Kernel.
* \see group_vision_function_absdiff
*/
VX_KERNEL_ABSDIFF = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0xB,
/*! \brief The Mean and Standard Deviation Kernel.
* \see group_vision_function_meanstddev
*/
VX_KERNEL_MEAN_STDDEV = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0xC,
/*! \brief The Threshold Kernel.
* \see group_vision_function_threshold
*/
VX_KERNEL_THRESHOLD = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0xD,
/*! \brief The Integral Image Kernel.
* \see group_vision_function_integral_image
*/
VX_KERNEL_INTEGRAL_IMAGE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0xE,
/*! \brief The dilate kernel.
* \see group_vision_function_dilate_image
*/
VX_KERNEL_DILATE_3x3 = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0xF,
/*! \brief The erode kernel.
* \see group_vision_function_erode_image
*/
VX_KERNEL_ERODE_3x3 = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x10,
/*! \brief The median image filter.
* \see group_vision_function_median_image
*/
VX_KERNEL_MEDIAN_3x3 = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x11,
/*! \brief The box filter kernel.
* \see group_vision_function_box_image
*/
VX_KERNEL_BOX_3x3 = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x12,
/*! \brief The gaussian filter kernel.
* \see group_vision_function_gaussian_image
*/
VX_KERNEL_GAUSSIAN_3x3 = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x13,
/*! \brief The custom convolution kernel.
* \see group_vision_function_custom_convolution
*/
VX_KERNEL_CUSTOM_CONVOLUTION = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x14,
/*! \brief The gaussian image pyramid kernel.
* \see group_vision_function_gaussian_pyramid
*/
VX_KERNEL_GAUSSIAN_PYRAMID = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x15,
/*! \brief The accumulation kernel.
* \see group_vision_function_accumulate
*/
VX_KERNEL_ACCUMULATE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x16,
/*! \brief The weigthed accumulation kernel.
* \see group_vision_function_accumulate_weighted
*/
VX_KERNEL_ACCUMULATE_WEIGHTED = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x17,
/*! \brief The squared accumulation kernel.
* \see group_vision_function_accumulate_square
*/
VX_KERNEL_ACCUMULATE_SQUARE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x18,
/*! \brief The min and max location kernel.
* \see group_vision_function_minmaxloc
*/
VX_KERNEL_MINMAXLOC = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x19,
/*! \brief The bit-depth conversion kernel.
* \see group_vision_function_convertdepth
*/
VX_KERNEL_CONVERTDEPTH = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x1A,
/*! \brief The Canny Edge Detector.
* \see group_vision_function_canny
*/
VX_KERNEL_CANNY_EDGE_DETECTOR = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x1B,
/*! \brief The Bitwise And Kernel.
* \see group_vision_function_and
*/
VX_KERNEL_AND = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x1C,
/*! \brief The Bitwise Inclusive Or Kernel.
* \see group_vision_function_or
*/
VX_KERNEL_OR = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x1D,
/*! \brief The Bitwise Exclusive Or Kernel.
* \see group_vision_function_xor
*/
VX_KERNEL_XOR = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x1E,
/*! \brief The Bitwise Not Kernel.
* \see group_vision_function_not
*/
VX_KERNEL_NOT = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x1F,
/*! \brief The Pixelwise Multiplication Kernel.
* \see group_vision_function_mult
*/
VX_KERNEL_MULTIPLY = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x20,
/*! \brief The Addition Kernel.
* \see group_vision_function_add
*/
VX_KERNEL_ADD = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x21,
/*! \brief The Subtraction Kernel.
* \see group_vision_function_sub
*/
VX_KERNEL_SUBTRACT = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x22,
/*! \brief The Warp Affine Kernel.
* \see group_vision_function_warp_affine
*/
VX_KERNEL_WARP_AFFINE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x23,
/*! \brief The Warp Perspective Kernel.
* \see group_vision_function_warp_perspective
*/
VX_KERNEL_WARP_PERSPECTIVE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x24,
/*! \brief The Harris Corners Kernel.
* \see group_vision_function_harris
*/
VX_KERNEL_HARRIS_CORNERS = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x25,
/*! \brief The FAST Corners Kernel.
* \see group_vision_function_fast
*/
VX_KERNEL_FAST_CORNERS = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x26,
/*! \brief The Optical Flow Pyramid (LK) Kernel.
* \see group_vision_function_opticalflowpyrlk
*/
VX_KERNEL_OPTICAL_FLOW_PYR_LK = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x27,
/*! \brief The Remap Kernel.
* \see group_vision_function_remap
*/
VX_KERNEL_REMAP = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x28,
/*! \brief The Half Scale Gaussian Kernel.
* \see group_vision_function_scale_image
*/
VX_KERNEL_HALFSCALE_GAUSSIAN = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x29,
/* insert new kernels here */
VX_KERNEL_MAX_1_0, /*!< \internal Used for bounds checking in the conformance test. */
};
#ifdef __cplusplus
}
#endif
#endif /* _OPEN_VISION_LIBRARY_KERNELS_H_ */