Beruflich Dokumente
Kultur Dokumente
Custom Convolution
Vision Functions
Detailed Description
The client can supply a vx_int16 typed convolution matrix Cm,n . Outputs will be in the
VX_DF_IMAGE_S16 format unless a VX_DF_IMAGE_U8 image is explicitly provided. If values
would have been out of range of U8 for VX_DF_IMAGE_U8, the values are clamped to 0 or
255.
m
k0 =
2
n
l0 =
2
k=m1,l=n1
sum = input(x + k0 k, y + l0 l)Ck,l
k=0,l=0
Note
The above equation for this function is dierent than an equivalent operation
suggested by the OpenCV Filter2D function.
output(x, y) =
0 ifsum < 0
255 ifsum/scale > 255
sum/scale otherwise
For VX_DF_IMAGE_S16 output, the summation is simply set to the output
output(x, y) = sum/scale
Functions
vx_node vxConvolveNode (vx_graph graph, vx_image input, vx_convolution
conv, vx_image output)
[Graph] Creates a custom convolution node. More...
Function Documentation
Parameters
[in] graph The reference to the graph.
[in] input The input image in VX_DF_IMAGE_U8 format.
[in] conv The vx_int16 convolution matrix.
[out] output The output image in VX_DF_IMAGE_S16 format.
Returns
vx_node.
Return values
0 Node could not be created.
* Node handle.
[Immediate] Computes a convolution on the input image with the supplied matrix.
Parameters
[in] context The reference to the overall context.
[in] input The input image in VX_DF_IMAGE_U8 format.
[in] matrix The convolution matrix.
[out] output The output image in VX_DF_IMAGE_S16 format.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESS Success
* An error occurred. See vx_status_e.