Herror ::hough_line_trans (
    Hobject Region,
    Hobject *HoughImage,
    const HTuple &AngleResolution
)
HImage HRegion::HoughLineTrans (
    const HTuple &AngleResolution
) const

Produce the Hough transform for lines within regions.

The operator ::hough_line_trans calculates the Hough transform for lines in those regions transmitted by Region. Thereby the angles and the lengths of the lines´ normal vectors are registered in the parameter space (the Hough- or accumulator space respectively). This means that the parameterization is executed according to the HNF.

The result is registered in a newly generated Int2-Image (HoughImage), whereby the x-axis is equivalent to the angle between the normal vector and the x-axis (in the original image), and the y-axis is equivalent to the distance of the line from the origin.

The angle ranges from -90 to 180 degrees and will be registered with a resolution of 1 / AngleResolution, which means that one pixel in x-direction is equivalent to 1 / AngleResolution and that the HoughImage has a width of 270 * AngleResolution + 1 pixel. The height of the HoughImage corresponds to the diagonal of the surrounding rectangle of the input region.

The maxima in the result image are equivalent to the parameter values of the lines in the original image.


Parameters

Region (input_object)
region -> Hobject: HRegion
Binary edge image in which lines are to be detected.

HoughImage (output_object)
image -> Hobject * : HImage ( int2 )
Hough transform for lines.

AngleResolution (input_control)
integer -> HTuple.long
Adjusting the resolution in the angle area.
Default value: 4
List of values: 1, 2, 4, 8


Result

The operator ::hough_line_trans returns the value H_MSG_TRUE if the input is not empty. The behavior in case of empty input (no input regions available) is set via the operator ::set_system('no_object_result',<Result>), the behavior in case of empty region is set via ::set_system('empty_region_result',<Result>). If necessary an exception handling is raised.


Possible Predecessors

::threshold, ::skeleton


Possible Successors

::threshold, ::local_max


See also

::hough_circle_trans, ::gen_region_hline


Module

Region processing



Copyright © 1996-2002 MVTec Software GmbH