The OpenVX Specification  a73e458
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 [R00060]:

\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, returning the same results as using the following algorithm [R00064]:

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

 0 <= max_dist <= 30 

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


vx_node VX_API_CALL 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...

Function Documentation

◆ vxHarrisCornersNode()

vx_node VX_API_CALL 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.

[in]graphThe reference to the graph [R00357].
[in]inputThe input VX_DF_IMAGE_U8 image [R00358].
[in]strength_threshThe VX_TYPE_FLOAT32 minimum threshold with which to eliminate Harris Corner scores (computed using the normalized Sobel kernel) [R00359].
[in]min_distanceThe VX_TYPE_FLOAT32 radial Euclidean distance for non-maximum suppression [R00360].
[in]sensitivityThe VX_TYPE_FLOAT32 scalar sensitivity threshold \( k \) from the Harris-Stephens equation [R00361].
[in]gradient_sizeThe gradient window size to use on the input [R00362]. The implementation must support at least 3, 5, and 7.
[in]block_sizeThe block window size used to compute the Harris Corner score [R00363]. The implementation must support at least 3, 5, and 7.
[out]cornersThe array of VX_TYPE_KEYPOINT objects [R00364]. The order of the keypoints in this array is implementation dependent.
[out]num_cornersThe total number of detected corners in image [R00365](optional). Use a VX_TYPE_SIZE scalar [R00366].
vx_node [R00367].
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus