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.
[Graph] Creates a Phase node.
- Parameters
-
[in] | graph | The reference to the graph. |
[in] | grad_x | The input x image. This must be in VX_DF_IMAGE_S16 format. |
[in] | grad_y | The input y image. This must be in VX_DF_IMAGE_S16 format. |
[out] | orientation | The 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_node | A node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus |
[Immediate] Invokes an immediate Phase.
- Parameters
-
[in] | context | The reference to the overall context. |
[in] | grad_x | The input x image. This must be in VX_DF_IMAGE_S16 format. |
[in] | grad_y | The input y image. This must be in VX_DF_IMAGE_S16 format. |
[out] | orientation | The phase image. This will be in VX_DF_IMAGE_U8 format. |
- Returns
- A
vx_status_e
enumeration.
- Return values
-