The OpenVX Specification  dba1aa3

Detailed Description

Implements the Gradient Phase Computation Kernel. The output image dimensions should be the same as the dimensions of the input images.

This kernel takes two gradients in VX_DF_IMAGE_S16 format and computes the angles for each pixel and stores this in a VX_DF_IMAGE_U8 image.

\[ \phi = \tan^{-1}{\frac{grad_y(x,y)}{grad_x(x,y)}} \]

Where \( \phi \) is then translated to \( 0 \le \phi < {2}\pi \). Each \( \phi \) value is then mapped to the range 0 to 255 inclusive.

Functions

vx_node VX_API_CALL vxPhaseNode (vx_graph graph, vx_image grad_x, vx_image grad_y, vx_image orientation)
 [Graph] Creates a Phase node. More...
 
vx_status VX_API_CALL vxuPhase (vx_context context, vx_image grad_x, vx_image grad_y, vx_image orientation)
 [Immediate] Invokes an immediate Phase. More...
 

Function Documentation

vx_node VX_API_CALL vxPhaseNode ( vx_graph  graph,
vx_image  grad_x,
vx_image  grad_y,
vx_image  orientation 
)

[Graph] Creates a Phase node.

Parameters
[in]graphThe reference to the graph.
[in]grad_xThe input x image. This must be in VX_DF_IMAGE_S16 format.
[in]grad_yThe input y image. This must be in VX_DF_IMAGE_S16 format.
[out]orientationThe phase image. This is in VX_DF_IMAGE_U8 format, and must have the same dimensions as the input images.
See also
VX_KERNEL_PHASE
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 vxuPhase ( vx_context  context,
vx_image  grad_x,
vx_image  grad_y,
vx_image  orientation 
)

[Immediate] Invokes an immediate Phase.

Parameters
[in]contextThe reference to the overall context.
[in]grad_xThe input x image. This must be in VX_DF_IMAGE_S16 format.
[in]grad_yThe input y image. This must be in VX_DF_IMAGE_S16 format.
[out]orientationThe phase image. This will be in VX_DF_IMAGE_U8 format.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSSuccess
*An error occurred. See vx_status_e.