The OpenVX Specification
dba1aa3
|
Performs a perspective transform on an image.
This kernel performs an perspective transform with a 3x3 Matrix \( M \) with this method of pixel coordinate translation:
\begin{eqnarray} x0 &=& M_{1,1}*x + M_{1,2}*y + M_{1,3} \\ y0 &=& M_{2,1}*x + M_{2,2}*y + M_{2,3} \\ z0 &=& M_{3,1}*x + M_{3,2}*y + M_{3,3} \\ output(x,y) &=& input(\frac{x0}{z0},\frac{y0}{z0}) \end{eqnarray}
This translates into the C declaration:
Functions | |
vx_status VX_API_CALL | vxuWarpPerspective (vx_context context, vx_image input, vx_matrix matrix, vx_enum type, vx_image output) |
[Immediate] Performs an Perspective warp on an image. More... | |
vx_node VX_API_CALL | vxWarpPerspectiveNode (vx_graph graph, vx_image input, vx_matrix matrix, vx_enum type, vx_image output) |
[Graph] Creates a Perspective Warp Node. More... | |
vx_node VX_API_CALL vxWarpPerspectiveNode | ( | vx_graph | graph, |
vx_image | input, | ||
vx_matrix | matrix, | ||
vx_enum | type, | ||
vx_image | output | ||
) |
[Graph] Creates a Perspective Warp Node.
[in] | graph | The reference to the graph. |
[in] | input | The input VX_DF_IMAGE_U8 image. |
[in] | matrix | The perspective matrix. Must be 3x3 of type VX_TYPE_FLOAT32 . |
[in] | type | The interpolation type from vx_interpolation_type_e . VX_INTERPOLATION_AREA is not supported. |
[out] | output | The output VX_DF_IMAGE_U8 image with the same dimensions as the input image. |
VX_NODE_BORDER
value VX_BORDER_UNDEFINED
and VX_BORDER_CONSTANT
are supported. vx_node
. vx_node | A node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus |
vx_status VX_API_CALL vxuWarpPerspective | ( | vx_context | context, |
vx_image | input, | ||
vx_matrix | matrix, | ||
vx_enum | type, | ||
vx_image | output | ||
) |
[Immediate] Performs an Perspective warp on an image.
[in] | context | The reference to the overall context. |
[in] | input | The input VX_DF_IMAGE_U8 image. |
[in] | matrix | The perspective matrix. Must be 3x3 of type VX_TYPE_FLOAT32. |
[in] | type | The interpolation type from vx_interpolation_type_e. VX_INTERPOLATION_AREA is not supported. |
[out] | output | The output VX_DF_IMAGE_U8 image. |
vx_status_e
enumeration. VX_SUCCESS | Success |
* | An error occurred. See vx_status_e . |