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 Lines primitive finds lines in a binary image using Hough transform.

The primitive uses the following identifiers:

Method

The primitive has these two modes:

Functions

vx_node nvxHoughLinesNode (vx_graph graph, vx_image input, vx_array output, vx_float32 rho, vx_float32 theta, vx_uint32 threshold, vx_scalar num_lines)
 [Graph] Finds lines on image using standard Hough transform. More...
 
vx_node nvxHoughSegmentsNode (vx_graph graph, vx_image input, vx_array output, vx_float32 rho, vx_float32 theta, vx_uint32 threshold, vx_uint32 minLineLength, vx_uint32 maxLineGap, vx_scalar num_segments)
 [Graph] Finds line segments in a binary image using the probabilistic Hough transform. More...
 
vx_status nvxuHoughLines (vx_context context, vx_image input, vx_array output, vx_float32 rho, vx_float32 theta, vx_uint32 threshold, vx_scalar num_lines)
 [Immediate] Finds lines on image using standard Hough transform. More...
 
vx_status nvxuHoughSegments (vx_context context, vx_image input, vx_array output, vx_float32 rho, vx_float32 theta, vx_uint32 threshold, vx_uint32 minLineLength, vx_uint32 maxLineGap, vx_scalar num_segments)
 [Immediate] Finds line segments in a binary image using the probabilistic Hough transform. More...
 

Function Documentation

vx_node nvxHoughLinesNode ( vx_graph  graph,
vx_image  input,
vx_array  output,
vx_float32  rho,
vx_float32  theta,
vx_uint32  threshold,
vx_scalar  num_lines 
)

[Graph] Finds lines on image using standard Hough transform.

Parameters
[in]graphSpecifies the graph.
[in]inputSpecifies the input image. Only VX_DF_IMAGE_U8 format is supported. The image width and height must be less than \( 2^{16} \).
[out]outputSpecifies the output lines list. Only NVX_TYPE_POINT3F item type is supported. The array capacity must be explicitly provided, even for virtual arrays.
[in]rhoSpecifies the distance resolution of the accumulator in pixels. It must be a positive value.
[in]thetaSpecifies the angle resolution of the accumulator in radians. It must be in range \( (0, \pi] \).
[in]thresholdSpecifies the accumulator threshold parameter. Only lines that get enough votes (> threshold) are returned.
[out]num_linesSpecifies the total number of detected lines in image (optional). It must be a VX_TYPE_UINT32 scalar.
Returns
A valid node reference or an error object (use vxGetStatus).
See also
Hough Lines
vx_status nvxuHoughLines ( vx_context  context,
vx_image  input,
vx_array  output,
vx_float32  rho,
vx_float32  theta,
vx_uint32  threshold,
vx_scalar  num_lines 
)

[Immediate] Finds lines on image using standard Hough transform.

Parameters
[in]contextSpecifies the context.
[in]inputSpecifies the input image (8-bit grayscale). Only VX_DF_IMAGE_U8 format is supported. The image width and height must be less than \( 2^{16} \).
[out]outputSpecifies the output lines list. Only NVX_TYPE_POINT3F item type is supported. The array capacity must be explicitly provided, even for virtual arrays.
[in]rhoSpecifies the distance resolution of the accumulator in pixels. It must be a positive value.
[in]thetaSpecifies the angle resolution of the accumulator in radians. It must be in range \( (0, \pi] \).
[in]thresholdSpecifies the accumulator threshold parameter. Only those lines are returned that get enough votes (> threshold).
[out]num_linesSpecifies the total number of detected lines in image (optional). It should be VX_TYPE_UINT32 scalar.
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 Lines
vx_node nvxHoughSegmentsNode ( vx_graph  graph,
vx_image  input,
vx_array  output,
vx_float32  rho,
vx_float32  theta,
vx_uint32  threshold,
vx_uint32  minLineLength,
vx_uint32  maxLineGap,
vx_scalar  num_segments 
)

[Graph] Finds line segments in a binary image using the probabilistic Hough transform.

Parameters
[in]graphSpecifies the graph.
[in]inputSpecifies the input image (8-bit grayscale). Only VX_DF_IMAGE_U8 format is supported. The image width and height must be less than \( 2^{16} \).
[out]outputSpecifies the output lines list. Only NVX_TYPE_POINT4F item type is supported. The array capacity must be explicitly provided, even for virtual arrays.
[in]rhoSpecifies the distance resolution of the accumulator in pixels. It must be a positive value.
[in]thetaSpecifies the angle resolution of the accumulator in radians. It must be in range \( (0, \pi] \).
[in]thresholdSpecifies the accumulator threshold parameter. Only lines that get enough votes (> threshold) are returned.
[in]minLineLengthSpecifies the minimum line length. Shorter segments are rejected.
[in]maxLineGapSpecifies the maximum allowed gap between points on the same line to link them.
[out]num_segmentsSpecifies the total number of detected segments in image (optional). It should be VX_TYPE_UINT32 scalar.
Returns
A valid node reference or an error object (use vxGetStatus).
See also
Hough Lines
vx_status nvxuHoughSegments ( vx_context  context,
vx_image  input,
vx_array  output,
vx_float32  rho,
vx_float32  theta,
vx_uint32  threshold,
vx_uint32  minLineLength,
vx_uint32  maxLineGap,
vx_scalar  num_segments 
)

[Immediate] Finds line segments in a binary image using the probabilistic Hough transform.

Parameters
[in]contextSpecifies the context.
[in]inputSpecifies the input image (8-bit grayscale). Only VX_DF_IMAGE_U8 format is supported. The image width and height must be less than \( 2^{16} \).
[out]outputSpecifies the output lines list. Only NVX_TYPE_POINT4F item type is supported. The array capacity must be explicitly provided, even for virtual arrays.
[in]rhoSpecifies the distance resolution of the accumulator in pixels. It must be a positive value.
[in]thetaSpecifies the angle resolution of the accumulator in radians. It must be in range \( (0, \pi] \).
[in]thresholdSpecifies the accumulator threshold parameter. Only lines that get enough votes (> threshold) are returned.
[in]minLineLengthSpecifies the minimum line length. Shorter segments are rejected.
[in]maxLineGapSpecifies the maximum allowed gap between points on the same line to link them.
[out]num_segmentsSpecifies the total number of detected segments in image (optional). It should be VX_TYPE_UINT32 scalar.
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 log for detailed information (Framework: Log).
See also
Hough Lines