![]() |
The OpenVX Specification
a73e458
|
Convolves the input with the client supplied convolution matrix [R00047].
The client can supply a vx_int16 typed convolution matrix \( C_{m,n} \). Outputs will be in the VX_DF_IMAGE_S16 format unless a VX_DF_IMAGE_U8 image is explicitly provided [R00048]. If values would have been out of range of U8 for VX_DF_IMAGE_U8, the values are clamped to 0 or 255 [R00049].
\begin{eqnarray} k_0 &=& \frac{m}{2} \\ l_0 &=& \frac{n}{2} \\ sum &=& \sum_{k=0,l=0}^{k=m-1,l=n-1} input(x+k_0-k, y+l_0-l) C_{k,l} \end{eqnarray}
This translates into the C declaration:
For VX_DF_IMAGE_U8 output, an additional step is taken [R00050]:
\[ output(x,y) = \begin{cases} \cr 0 & \text{if } sum < 0 \cr 255 & \text{if } sum / scale > 255 \cr sum / scale & \text{otherwise} \end{cases} \]
For VX_DF_IMAGE_S16 output, the summation is simply set to the output [R00051]
\[ output(x,y) = sum / scale \]
The overflow policy used is VX_CONVERT_POLICY_SATURATE [R00052].
Functions | |
| vx_node VX_API_CALL | vxConvolveNode (vx_graph graph, vx_image input, vx_convolution conv, vx_image output) |
| [Graph] Creates a custom convolution node. More... | |
| vx_node VX_API_CALL vxConvolveNode | ( | vx_graph | graph, |
| vx_image | input, | ||
| vx_convolution | conv, | ||
| vx_image | output | ||
| ) |
[Graph] Creates a custom convolution node.
| [in] | graph | The reference to the graph [R00247]. |
| [in] | input | The input image in VX_DF_IMAGE_U8 format [R00248]. |
| [in] | conv | The vx_int16 convolution matrix [R00249]. |
| [out] | output | The output image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format [R00250]. |
vx_node [R00251]. | vx_node | A node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus |