The OpenVX Specification  dba1aa3
Warp Affine

Detailed Description

Performs an affine transform on an image.

This kernel performs an affine transform with a 2x3 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} \\ output(x,y) &=& input(x0,y0) \end{eqnarray}

This translates into the C declaration:

// x0 = a x + b y + c;
// y0 = d x + e y + f;
vx_float32 mat[3][2] = {
{a, d}, // 'x' coefficients
{b, e}, // 'y' coefficients
{c, f}, // 'offsets'
};
vx_matrix matrix = vxCreateMatrix(context, VX_TYPE_FLOAT32, 2, 3);

Functions

vx_status VX_API_CALL vxuWarpAffine (vx_context context, vx_image input, vx_matrix matrix, vx_enum type, vx_image output)
 [Immediate] Performs an Affine warp on an image. More...
 
vx_node VX_API_CALL vxWarpAffineNode (vx_graph graph, vx_image input, vx_matrix matrix, vx_enum type, vx_image output)
 [Graph] Creates an Affine Warp Node. More...
 

Function Documentation

vx_node VX_API_CALL vxWarpAffineNode ( vx_graph  graph,
vx_image  input,
vx_matrix  matrix,
vx_enum  type,
vx_image  output 
)

[Graph] Creates an Affine Warp Node.

Parameters
[in]graphThe reference to the graph.
[in]inputThe input VX_DF_IMAGE_U8 image.
[in]matrixThe affine matrix. Must be 2x3 of type VX_TYPE_FLOAT32.
[in]typeThe interpolation type from vx_interpolation_type_e. VX_INTERPOLATION_AREA is not supported.
[out]outputThe output VX_DF_IMAGE_U8 image and the same dimensions as the input image.
Note
The border modes VX_NODE_BORDER value VX_BORDER_UNDEFINED and VX_BORDER_CONSTANT are supported.
Returns
vx_node.
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus
vx_status VX_API_CALL vxuWarpAffine ( vx_context  context,
vx_image  input,
vx_matrix  matrix,
vx_enum  type,
vx_image  output 
)

[Immediate] Performs an Affine warp on an image.

Parameters
[in]contextThe reference to the overall context.
[in]inputThe input VX_DF_IMAGE_U8 image.
[in]matrixThe affine matrix. Must be 2x3 of type VX_TYPE_FLOAT32.
[in]typeThe interpolation type from vx_interpolation_type_e. VX_INTERPOLATION_AREA is not supported.
[out]outputThe output VX_DF_IMAGE_U8 image.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSSuccess
*An error occurred. See vx_status_e.