VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Detailed Description

The Hough Circles primitive finds circles in a binary image using a modification of the Hough transform.

The primitive uses the following identifiers:

See also
[11]

Functions

vx_node nvxHoughCirclesNode (vx_graph graph, vx_image edges, vx_image dx, vx_image dy, vx_array circles, vx_scalar s_num_detections, vx_float32 dp, vx_float32 minDist, vx_uint32 minRadius, vx_uint32 maxRadius, vx_uint32 acc_threshold)
 [Graph] Detects circles in a binary image. More...
 
vx_status nvxuHoughCircles (vx_context context, vx_image edges, vx_image dx, vx_image dy, vx_array circles, vx_scalar s_num_detections, vx_float32 dp, vx_float32 minDist, vx_uint32 minRadius, vx_uint32 maxRadius, vx_uint32 acc_threshold)
 [Immediate] Detects circles in a binary image. More...
 

Function Documentation

vx_node nvxHoughCirclesNode ( vx_graph  graph,
vx_image  edges,
vx_image  dx,
vx_image  dy,
vx_array  circles,
vx_scalar  s_num_detections,
vx_float32  dp,
vx_float32  minDist,
vx_uint32  minRadius,
vx_uint32  maxRadius,
vx_uint32  acc_threshold 
)

[Graph] Detects circles in a binary image.

Parameters
[in]graphSpecifies the graph.
[in]edgesSpecifies the input binary image with edges (for example, output from Canny Edge Detector). Only VX_DF_IMAGE_U8 format is supported.
[in]dxSpecifies the input image with horizontal derivatives (for example, output from Sobel 3x3). Only VX_DF_IMAGE_S16 format is supported. It must have the same size as edges image.
[in]dySpecifies the input image with vertical derivatives (for example, output from Sobel 3x3). Only VX_DF_IMAGE_S16 format is supported. It must have the same size as edges image.
[out]circlesSpecifies the output array with detected circles. Each circle is encoded as a nvx_point3f_t (x, y, radius). The array capacity must be explicitly provided, even for virtual arrays.
[out]s_num_detectionsOptional output scalar that holds the total number of detected circles. Can be used to check if circles has enough capacity to hold all the detected circles. Must be a VX_TYPE_UINT32 scalar.
[in]dpInverse ratio of the accumulator resolution to the image resolution. For example, if dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has the width and height twice as small as the input image. It must be greater or equal than 1.
[in]minDistMinimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is too large, some circles may be missed. It must be a positive value.
[in]minRadiusMinimum circle radius.
[in]maxRadiusMaximum circle radius. It must not be less than minRadius.
[in]acc_thresholdThe accumulator threshold for the circle centers at the detection stage. The smaller the threshold is, the more false circles may be detected. Circles corresponding to the larger accumulator values are returned first.
Returns
A valid node reference or an error object (use vxGetStatus).
See also
Hough Circles
vx_status nvxuHoughCircles ( vx_context  context,
vx_image  edges,
vx_image  dx,
vx_image  dy,
vx_array  circles,
vx_scalar  s_num_detections,
vx_float32  dp,
vx_float32  minDist,
vx_uint32  minRadius,
vx_uint32  maxRadius,
vx_uint32  acc_threshold 
)

[Immediate] Detects circles in a binary image.

Parameters
[in]contextSpecifies the context.
[in]edgesSpecifies the input binary image with edges (for example, output from Canny Edge Detector). Only VX_DF_IMAGE_U8 format is supported.
[in]dxSpecifies the input image with horizontal derivatives (for example, output from Sobel 3x3). Only VX_DF_IMAGE_S16 format is supported. It must have the same size as edges image.
[in]dySpecifies the input image with vertical derivatives (for example, output from Sobel 3x3). Only VX_DF_IMAGE_S16 format is supported. It must have the same size as edges image.
[out]circlesSpecifies the output array with detected circles. Each circle is encoded as a nvx_point3f_t (x, y, radius). The array capacity must be explicitly provided, even for virtual arrays.
[out]s_num_detectionsOptional output scalar that holds the total number of detected circles. Can be used to check if circles has enough capacity to hold all the detected circles. It must be a VX_TYPE_UINT32 scalar.
[in]dpInverse ratio of the accumulator resolution to the image resolution. For example, if dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has the width and height twice as small as the input image. It must be greater or equal than 1.
[in]minDistMinimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is too large, some circles may be missed. It must be a positive value.
[in]minRadiusMinimum circle radius.
[in]maxRadiusMaximum circle radius. It must not be less than minRadius.
[in]acc_thresholdThe accumulator threshold for the circle centers at the detection stage. The smaller the threshold is, the more false circles may be detected. Circles corresponding to the larger accumulator values are returned first.
Returns
A vx_status enumerator.
Return values
VX_SUCCESSNo errors.
VX_ERROR_INVALID_REFERENCESupplied parameters are not a valid references.
VX_ERROR_INVALID_PARAMETERSSupplied parameters are not valid.
VX_ERROR_INVALID_SCOPESupplied parameters are virtual objects, that cannot be used in immediate mode.
VX_FAILUREInternal error in primitive implementation; check the log for detailed information. (Framework: Log).
See also
Hough Circles