The OpenVX Specification
dba1aa3
|
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... | |
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.
[in] | graph | The reference to the graph. |
[in] | input | The 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_size | The 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] | output | The output image, of the same type and size as the input, that has been non-maxima suppressed. |
vx_node
. vx_node | A 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.
[in] | context | The reference to the overall context. |
[in] | input | The 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_size | The 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] | output | The output image, of the same type as the input, that has been non-maxima suppressed. |
vx_status_e
enumeration. VX_SUCCESS | Success |
* | An error occurred. See vx_status_e . |