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]
|
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...
|
|
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] | graph | Specifies the graph. |
[in] | edges | Specifies the input binary image with edges (for example, output from Canny Edge Detector). Only VX_DF_IMAGE_U8 format is supported. |
[in] | dx | Specifies 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] | dy | Specifies 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] | circles | Specifies 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_detections | Optional 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] | dp | Inverse 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] | minDist | Minimum 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] | minRadius | Minimum circle radius. |
[in] | maxRadius | Maximum circle radius. It must not be less than minRadius. |
[in] | acc_threshold | The 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] | context | Specifies the context. |
[in] | edges | Specifies the input binary image with edges (for example, output from Canny Edge Detector). Only VX_DF_IMAGE_U8 format is supported. |
[in] | dx | Specifies 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] | dy | Specifies 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] | circles | Specifies 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_detections | Optional 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] | dp | Inverse 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] | minDist | Minimum 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] | minRadius | Minimum circle radius. |
[in] | maxRadius | Maximum circle radius. It must not be less than minRadius. |
[in] | acc_threshold | The 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_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | Supplied parameters are not a valid references. |
VX_ERROR_INVALID_PARAMETERS | Supplied parameters are not valid. |
VX_ERROR_INVALID_SCOPE | Supplied parameters are virtual objects, that cannot be used in immediate mode. |
VX_FAILURE | Internal error in primitive implementation; check the log for detailed information. (Framework: Log). |
- See also
- Hough Circles