The OpenVX Specification  r31169
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Detailed Description

Implements the Gradient Phase Computation Kernel.

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 output)
 [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.
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  output 
)

[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]outputThe 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.