The OpenVX Specification  dba1aa3
Non-Maxima Suppression

Detailed Description

Find local maxima in an image, or otherwise suppress pixels that are not local maxima.

The input to the Non-Maxima Suppressor is either a VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 image. In the case of a VX_DF_IMAGE_S16 image, suppressed pixels shall take the value of INT16_MIN.

An optional mask image may be used to restrict the suppression to a region-of-interest. If a mask pixel is non-zero, then the associated pixel in the input is completely ignored and not considered during suppression; that is, it is not suppressed and not considered as part of any suppression window.

A pixel with coordinates \((x,y)\) is kept if and only if it is greater than or equal to its top left neighbours; and greater than its bottom right neighbours. For example, for a window size of 3, \(P(x,y)\) is retained if the following condition holds:

\begin{eqnarray*} P(x,y) \geq P(x-1,y-1) \; and \; P(x,y) \geq P(x,y-1) \; and \\ P(x,y) \geq P(x+1,y-1) \; and \; P(x,y) \geq P(x-1,y) \; and \\ P(x,y) > P(x+1,y) \; and \; P(x,y) >P(x-1,y+1) \; and \\ P(x,y) >P(x,y+1) \; and \; P(x,y) >P(x+1,y+1) \end{eqnarray*}

Functions

vx_node VX_API_CALL vxNonMaxSuppressionNode (vx_graph graph, vx_image input, vx_image mask, vx_int32 win_size, vx_image output)
 [Graph] Creates a Non-Maxima Suppression node. More...
 
vx_status VX_API_CALL vxuNonMaxSuppression (vx_context context, vx_image input, vx_image mask, vx_int32 win_size, vx_image output)
 [Immediate] Performs Non-Maxima Suppression on an image, producing an image of the same type. More...
 

Function Documentation

vx_node VX_API_CALL vxNonMaxSuppressionNode ( vx_graph  graph,
vx_image  input,
vx_image  mask,
vx_int32  win_size,
vx_image  output 
)

[Graph] Creates a Non-Maxima Suppression node.

Parameters
[in]graphThe reference to the graph.
[in]inputThe input image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format.
[in]mask[optional] Constrict suppression to a ROI. The mask image is of type VX_DF_IMAGE_U8 and must be the same dimensions as the input image.
[in]win_sizeThe size of window over which to perform the localized non-maxima suppression. Must be odd, and less than or equal to the smallest dimension of the input image.
[out]outputThe output image, of the same type and size as the input, that has been non-maxima suppressed.
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 vxuNonMaxSuppression ( vx_context  context,
vx_image  input,
vx_image  mask,
vx_int32  win_size,
vx_image  output 
)

[Immediate] Performs Non-Maxima Suppression on an image, producing an image of the same type.

Parameters
[in]contextThe reference to the overall context.
[in]inputThe input image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format.
[in]mask[optional] Constrict suppression to a ROI. The mask image is of type VX_DF_IMAGE_U8 and must be the same dimensions as the input image.
[in]win_sizeThe size of window over which to perform the localized non-maxima suppression. Must be odd, and less than or equal to the smallest dimension of the input image.
[out]outputThe output image, of the same type as the input, that has been non-maxima suppressed.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSSuccess
*An error occurred. See vx_status_e.