The OpenVX Specification  r28647
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Harris Corners

Detailed Description

Computes the Harris Corners of an image.

The Harris Corners are computed with several parameters

\begin{eqnarray} I &=& \text{input image} \\ T_c &=& \text{corner strength threshold} \\ r &=& \text{euclidean radius} \\ k &=& \text{sensitivity threshold} \\ w &=& \text{window size} \\ b &=& \text{block size} \\ \end{eqnarray}

The computation to find the corner values or scores can be summarized as:

\begin{eqnarray} G_x &=& Sobel_x(w, I) \\ G_y &=& Sobel_y(w, I) \\ A &=& window_{G_{x,y}}(x-b/2,y-b/2,x+b/2,y+b/2) \\ trace(A) &=& \sum^{A}{G_x^{2}} + \sum^{A}{G_y^{2}} \\ det(A) &=& \sum^{A}{G_x^{2}} \sum^{A}{G_y^{2}} - {\left(\sum^{A}{(G_x G_y)}\right)}^{2} \\ M_c(x,y) &=& det(A) - k*trace(A)^{2} \\ V_c(x,y) &=& \begin{cases} M_c(x,y) \text{ if } M_c(x,y) > T_c \\ 0 \text{ otherwise} \\ \end{cases} \end{eqnarray}

\[ \text{where } V_c \text{ is the thresholded corner value}. \]

The normalized Sobel kernels used for the gradient computation shall be as shown below:

\[ \mathbf{Sobel}_{y}(Normalized)= \frac{1}{16*255*b}*transpose({sobel}_{x}) \]

\[ \mathbf{Sobel}_{y}(Normalized)= \frac{1}{64*255*b}*transpose({sobel}_{x}) \]

\( V_c \) is then non-maximally suppressed using the following algorithm:

An implementation shall support all values of Euclidean distance \( r \) that satisfy:

 0 <= max_dist <= 30 

The feature set \(F\) is returned as a vx_array of vx_keypoint_t structs.

Functions

vx_node vxHarrisCornersNode (vx_graph graph, vx_image input, vx_scalar strength_thresh, vx_scalar min_distance, vx_scalar sensitivity, vx_int32 gradient_size, vx_int32 block_size, vx_array corners, vx_scalar num_corners)
 [Graph] Creates a Harris Corners Node. More...
 
vx_status vxuHarrisCorners (vx_context context, vx_image input, vx_scalar strength_thresh, vx_scalar min_distance, vx_scalar sensitivity, vx_int32 gradient_size, vx_int32 block_size, vx_array corners, vx_scalar num_corners)
 [Immediate] Computes the Harris Corners over an image and produces the array of scored points. More...
 

Function Documentation

vx_node vxHarrisCornersNode ( vx_graph  graph,
vx_image  input,
vx_scalar  strength_thresh,
vx_scalar  min_distance,
vx_scalar  sensitivity,
vx_int32  gradient_size,
vx_int32  block_size,
vx_array  corners,
vx_scalar  num_corners 
)

[Graph] Creates a Harris Corners Node.

Parameters
[in]graphThe reference to the graph.
[in]inputThe input VX_DF_IMAGE_U8 image.
[in]strength_threshThe VX_TYPE_FLOAT32 minimum threshold with which to eliminate Harris Corner scores (computed using the normalized Sobel kernel).
[in]min_distanceThe VX_TYPE_FLOAT32 radial Euclidean distance for non-maximum suppression.
[in]sensitivityThe VX_TYPE_FLOAT32 scalar sensitivity threshold \( k \) from the Harris-Stephens equation.
[in]gradient_sizeThe gradient window size to use on the input. The implementation must support at least 3, 5, and 7.
[in]block_sizeThe block window size used to compute the Harris Corner score. The implementation must support at least 3, 5, and 7.
[out]cornersThe array of VX_TYPE_KEYPOINT objects.
[out]num_cornersThe total number of detected corners in image (optional).
Returns
vx_node.
Return values
0Node could not be created.
*Node handle.
vx_status vxuHarrisCorners ( vx_context  context,
vx_image  input,
vx_scalar  strength_thresh,
vx_scalar  min_distance,
vx_scalar  sensitivity,
vx_int32  gradient_size,
vx_int32  block_size,
vx_array  corners,
vx_scalar  num_corners 
)

[Immediate] Computes the Harris Corners over an image and produces the array of scored points.

Parameters
[in]contextThe reference to the overall context.
[in]inputThe input VX_DF_IMAGE_U8 image.
[in]strength_threshThe VX_TYPE_FLOAT32 minimum threshold which to eliminate Harris Corner scores (computed using the normalized Sobel kernel).
[in]min_distanceThe VX_TYPE_FLOAT32 radial Euclidean distance for non-maximum suppression.
[in]sensitivityThe VX_TYPE_FLOAT32 scalar sensitivity threshold \( k \) from the Harris-Stephens equation.
[in]gradient_sizeThe gradient window size to use on the input. The implementation must support at least 3, 5, and 7.
[in]block_sizeThe block window size used to compute the harris corner score. The implementation must support at least 3, 5, and 7.
[out]cornersThe array of VX_TYPE_KEYPOINT structs.
[out]num_cornersThe total number of detected corners in image (optional).
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSSuccess
*An error occurred. See vx_status_e.