-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvx_kernels.h
401 lines (327 loc) · 14.3 KB
/
vx_kernels.h
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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
/*
* Copyright (c) 2012-2017 The Khronos Group Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#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
* \ingroup group_kernel
*/
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 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,
VX_KERNEL_MAX_1_0, /*!< \internal Used for VX1.0 bounds checking in the conformance test. */
/* kernel added in OpenVX 1.1 */
/*! \brief The Laplacian Image Pyramid Kernel.
* \see group_vision_function_laplacian_pyramid
*/
VX_KERNEL_LAPLACIAN_PYRAMID = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x2A,
/*! \brief The Laplacian Pyramid Reconstruct Kernel.
* \see group_vision_function_laplacian_pyramid
*/
VX_KERNEL_LAPLACIAN_RECONSTRUCT = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x2B,
/*! \brief The Non Linear Filter Kernel.
* \see group_vision_function_nonlinear_filter
*/
VX_KERNEL_NON_LINEAR_FILTER = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x2C,
VX_KERNEL_MAX_1_1, /*!< \internal Used for VX1.1 bounds checking in the conformance test. */
/* kernel added in OpenVX 1.2 */
/*! \brief The Match Template Kernel.
* \see group_vision_match_template
*/
VX_KERNEL_MATCH_TEMPLATE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x2D,
/*! \brief The LBP Kernel.
* \see group_lbp
*/
VX_KERNEL_LBP = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x2E,
/*! \brief The hough lines probability Kernel.
* \see group_vision_hough_lines_p
*/
VX_KERNEL_HOUGH_LINES_P = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x2F,
/*! \brief The tensor multiply Kernel.
* \see group_vision_function_tensor_multiply
*/
VX_KERNEL_TENSOR_MULTIPLY = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x30,
/*! \brief The tensor add Kernel.
* \see group_vision_function_tensor_add
*/
VX_KERNEL_TENSOR_ADD = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x31,
/*! \brief The tensor subtract Kernel.
* \see group_vision_function_tensor_subtract
*/
VX_KERNEL_TENSOR_SUBTRACT = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x32,
/*! \brief The tensor table look up Kernel.
* \see group_vision_function_tensor_tablelookup
*/
VX_KERNEL_TENSOR_TABLE_LOOKUP = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x33,
/*! \brief The tensor transpose Kernel.
* \see group_vision_function_tensor_transpose
*/
VX_KERNEL_TENSOR_TRANSPOSE = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x34,
/*! \brief The tensor convert depth Kernel.
* \see group_vision_function_tensor_convert_depth
*/
VX_KERNEL_TENSOR_CONVERT_DEPTH = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x35,
/*! \brief The tensor matrix multiply Kernel.
* \see group_vision_function_tensor_matrix_multiply
*/
VX_KERNEL_TENSOR_MATRIX_MULTIPLY = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x36,
/*! \brief The data object copy kernel.
* \see group_vision_function_copy
*/
VX_KERNEL_COPY = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x37,
/*! \brief The non-max suppression kernel.
* \see group_vision_function_nms
*/
VX_KERNEL_NON_MAX_SUPPRESSION = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x38,
/*! \brief The scalar operation kernel.
* \see group_control_flow
*/
VX_KERNEL_SCALAR_OPERATION = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x39,
/*! \brief The HOG features kernel.
* \see group_vision_function_hog
*/
VX_KERNEL_HOG_FEATURES = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x3A,
/*! \brief The HOG Cells kernel.
* \see group_vision_function_hog
*/
VX_KERNEL_HOG_CELLS = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x3B,
/*! \brief The bilateral filter kernel.
* \see group_vision_function_bilateral_filter
*/
VX_KERNEL_BILATERAL_FILTER = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x3C,
/*! \brief The select kernel.
* \see group_control_flow
*/
VX_KERNEL_SELECT = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x3D,
/* insert new kernels here */
VX_KERNEL_MAX_1_2, /*!< \internal Used for VX1.2 bounds checking in the conformance test. */
/*! \brief The max kernel.
* \see group_vision_function_max
*/
VX_KERNEL_MAX = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x3E,
/*! \brief The min kernel.
* \see group_vision_function_min
*/
VX_KERNEL_MIN = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x3F,
};
#ifdef __cplusplus
}
#endif
#endif /* _OPEN_VISION_LIBRARY_KERNELS_H_ */