Copyright 2013-2018 The Khronos Group Inc.
This specification is protected by copyright laws and contains material proprietary to Khronos. Except as described by these terms, it or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Khronos.
This specification has been created under the Khronos Intellectual Property Rights Policy, which is Attachment A of the Khronos Group Membership Agreement available at www.khronos.org/files/member_agreement.pdf. Khronos Group grants a conditional copyright license to use and reproduce the unmodified specification for any purpose, without fee or royalty, EXCEPT no licenses to any patent, trademark or other intellectual property rights are granted under these terms. Parties desiring to implement the specification and make use of Khronos trademarks in relation to that implementation, and receive reciprocal patent license protection under the Khronos IP Policy must become Adopters and confirm the implementation as conformant under the process defined by Khronos for this specification; see https://www.khronos.org/adopters.
Khronos makes no, and expressly disclaims any, representations or warranties, express or implied, regarding this specification, including, without limitation: merchantability, fitness for a particular purpose, non-infringement of any intellectual property, correctness, accuracy, completeness, timeliness, and reliability. Under no circumstances will Khronos, or any of its Promoters, Contributors or Members, or their respective partners, officers, directors, employees, agents or representatives be liable for any damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these materials.
Khronos and OpenVX are trademarks of The Khronos Group Inc. OpenCL is a trademark of Apple Inc., used under license by Khronos. All other product names, trademarks, and/or company names are used solely for identification and belong to their respective owners.
- Contributors
-
-
Erik Rainey, Amazon
-
Frank Brill, Cadence
-
Jesse Villarrea, Texas Instruments
-
1. Extension Specification
This extension is intended to define the subset of behaviors and data types of the signed 16-bit support for OpenVX™.
1.1. Changes to the OpenVX 1.1 Specification
The S16 extension enhances the input and output types per each kernel defined in the OpenVX 1.1 standard. The table below indicates the changes to each kernel for input and output.
Input and output argument types should be the same (e.g. input S16 and output S16) unless stated otherwise in the function description. In cases where having S16 inputs could lead to the overflow of S16 outputs, the behavior is analogous to what is currently in the standard for when the inputs are U8.
In the main standard, where the input is U8 and the output is also U8, then the output is converted according to the overflow policy in the function definition. Analogously, for this extension, where the inputs and outputs are both S16, the output is converted as necessary according to the overflow policy in the function definition.
In the main standard, where the input can be U8 and the output S16, the zero-extended answer is just written into the output. Analogously, for this extension, where the input can be S16 and the output S32, the sign-bit-extended result is written to the output.
1.2. Inputs
Vision Function | U8 | U16 | S16 | U32 | S32 | F32 | color |
---|---|---|---|---|---|---|---|
AbsDiff |
1.0 |
1.0.1 |
|||||
Accumulate |
1.0 |
ext |
|||||
AccumulateSquared |
1.0 |
ext |
|||||
AccumulateWeighted |
1.0 |
ext |
|||||
Add |
1.0 |
1.0 |
|||||
And |
1.0 |
ext |
|||||
Box3x3 |
1.0 |
ext |
|||||
CannyEdgeDetector |
1.0 |
ext |
|||||
ChannelCombine |
1.0 |
||||||
ChannelExtract |
1.0 |
||||||
ColorConvert |
1.0 |
||||||
ConvertDepth |
1.0 |
ext |
1.0 |
ext |
ext |
||
Convolve |
1.0 |
ext |
|||||
Dilate3x3 |
1.0 |
||||||
EqualizeHistogram |
1.0 |
ext |
|||||
Erode3x3 |
1.0 |
||||||
FastCorners |
1.0 |
ext |
|||||
Gaussian3x3 |
1.0 |
ext |
|||||
HarrisCorners |
1.0 |
ext |
|||||
HalfScaleGaussian |
1.0 |
ext |
|||||
Histogram |
1.0 |
ext |
|||||
IntegralImage |
1.0 |
||||||
TableLookup |
1.0 |
1.1 |
|||||
LaplacianPyramid |
1.1 |
||||||
LaplacianReconstruct |
1.1 |
||||||
Magnitude |
1.0 |
||||||
MeanStdDev |
1.0 |
ext |
|||||
Median3x3 |
1.0 |
ext |
|||||
MinMaxLoc |
1.0 |
1.0 |
|||||
Multiply |
1.0 |
1.0 |
|||||
NonLinearFilter |
1.1 |
||||||
Not |
1.0 |
ext |
|||||
OpticalFlowPyrLK |
1.0 |
ext |
|||||
Or |
1.0 |
ext |
|||||
Phase |
1.0 |
||||||
GaussianPyramid |
1.0 |
ext |
|||||
Remap |
1.0 |
ext |
|||||
ScaleImage |
1.0 |
ext |
|||||
Sobel3x3 |
1.0 |
ext |
|||||
Subtract |
1.0 |
1.0 |
|||||
Threshold |
1.0 |
ext |
|||||
WarpAffine |
1.0 |
ext |
|||||
WarpPerspective |
1.0 |
ext |
|||||
Xor |
1.0 |
ext |
1.3. Outputs
Vision Function | U8 | U16 | S16 | U32 | S32 | F32 | color |
---|---|---|---|---|---|---|---|
AbsDiff |
1.0 |
ext |
1.0.1 |
||||
Accumulate |
1.0 |
ext |
|||||
AccumulateSquared |
1.0 |
ext |
|||||
AccumulateWeighted |
1.0 |
ext |
|||||
Add |
1.0 |
1.0 |
ext |
||||
And |
1.0 |
ext |
|||||
Box3x3 |
1.0 |
ext |
|||||
CannyEdgeDetector |
1.0 |
ext |
|||||
ChannelCombine |
1.0 |
||||||
ChannelExtract |
1.0 |
||||||
ColorConvert |
1.0 |
||||||
ConvertDepth |
1.0 |
ext |
1.0 |
ext |
ext |
||
Convolve |
1.0 |
1.0 |
ext |
||||
Dilate3x3 |
1.0 |
||||||
EqualizeHistogram |
1.0 |
ext |
|||||
Erode3x3 |
1.0 |
||||||
FastCorners |
1.0 |
||||||
Gaussian3x3 |
1.0 |
ext |
|||||
HarrisCorners |
1.0 |
||||||
HalfScaleGaussian |
1.0 |
ext |
|||||
Histogram |
1.0 |
||||||
IntegralImage |
1.0 |
||||||
TableLookup |
1.0 |
1.1 |
|||||
LaplacianPyramid |
1.1 |
||||||
LaplacianReconstruct |
1.1 |
||||||
Magnitude |
1.0 |
||||||
MeanStdDev |
1.0 |
||||||
Median3x3 |
1.0 |
ext |
|||||
MinMaxLoc |
1.0 |
1.0 |
1.0 |
||||
Multiply |
1.0 |
1.0 |
ext |
||||
NonLinearFilter |
1.1 |
||||||
Not |
1.0 |
ext |
|||||
OpticalFlowPyrLK |
|||||||
Or |
1.0 |
ext |
|||||
Phase |
1.0 |
||||||
GaussianPyramid |
1.0 |
ext |
|||||
Remap |
1.0 |
ext |
|||||
ScaleImage |
1.0 |
ext |
|||||
Sobel3x3 |
1.0 |
ext |
|||||
Subtract |
1.0 |
1.0 |
ext |
||||
Threshold |
1.0 |
ext |
|||||
WarpAffine |
1.0 |
ext |
|||||
WarpPerspective |
1.0 |
ext |
|||||
Xor |
1.0 |
ext |
1.4. Vision Functions
The following sections describe additional changes and clarifications to existing kernel definitions beyond those already described in sections Inputs and Outputs.
1.4.1. Bitwise Operations
Referring to: AND, EXCLUSIVE OR, INCLUSIVE OR, and NOT.
All bit-wise operations on signed operands are executed in twos-complement representation of the values.
1.4.2. Custom Convolution
The current spec says if the input type is U8 and the output type is S16, then the output is simply the sum/scale. However, if the output type is U8, then the output saturates on both ends: 0 if sum/scale < 0, and 255 if sum/scale > 255. Analogously, S16 outputs should saturate to -32768 if sum/scale < -32768, and 32767 if sum/scale > 32767, and just sum/scale otherwise.
For VX_DF_IMAGE_S16
output, an additional step is taken:
For VX_DF_IMAGE_S32
output, the summation is simply set to the output
-
output(x,y) = sum / scale
1.4.3. Fast Corners
When the input image is of type VX_DF_IMAGE_S16
, the value of the
intensity difference threshold strength_thresh.
of type VX_TYPE_FLOAT32
must be within:
-
UINT16_MIN
< t <UINT16_MAX