Herror ::hough_lines (
Hobject RegionIn,
const HTuple &AngleResolution,
const HTuple &Threshold,
const HTuple &AngleGap,
const HTuple &DistGap,
HTuple *Angle,
HTuple *Dist
)
HTuple HRegion::HoughLines (
const HTuple &AngleResolution,
const HTuple &Threshold,
const HTuple &AngleGap,
const HTuple &DistGap,
HTuple *Dist
) const
Detect lines in edge images with the help of the Hough transform and
returns it in HNF.
The operator ::hough_lines allows the selection of linelike
structures in a region, whereby it is not necessary that the individual
points of a line are connected. This process
is based on the Hough transform. The lines are returned in HNF, that is
by the direction and length of their normal vector.
The parameter AngleResolution defines the degree of exactness
concerning the determination of the angles. It amounts to 1 /
AngleResolution degree. The parameter Threshold
determines by how many points of the original region a line's hypothesis
has to be supported at least in order to be taken over into the output.
The parameters AngleGap and DistGap define a
neighborhood of the points in the Hough image in order to determine the
local maxima. The lines are returned in HNF.
Parameters
RegionIn (input_object)
|
region -> Hobject: HRegion
|
|
Binary edge image in which the lines are to be
detected. |
AngleResolution (input_control)
|
integer -> HTuple.long
|
|
Adjusting the resolution in the angle area. |
|
Default value: 4 |
|
List of values: 1, 2, 4, 8 |
Threshold (input_control)
|
integer -> HTuple.long
|
|
Threshold value in the Hough image. |
|
Default value: 100 |
|
Typical range of values: 1 <= Threshold |
AngleGap (input_control)
|
integer -> HTuple.long
|
|
Minimal distance of two maxima in the Hough image
(direction: angle). |
|
Default value: 5 |
|
Typical range of values: 0 <= AngleGap |
DistGap (input_control)
|
integer -> HTuple.long
|
|
Minimal distance of two maxima in the Hough image
(direction: distance). |
|
Default value: 5 |
|
Typical range of values: 0 <= DistGap |
Angle (output_control)
|
hesseline.angle.rad-array -> HTuple.double *
|
|
Angles (in radians) of the detected lines' normal
vectors. |
|
Typical range of values: -1.5707963 <= Angle <= 3.1415927 |
Dist (output_control)
|
hesseline.distance-array -> HTuple.double *
|
|
Distance of the detected lines from the origin. |
|
Typical range of values: -1.5707963 <= Dist <= 3.1415927 |
|
Number of elements: Dist == Angle |
Result
The operator ::hough_lines 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
::select_matching_lines
See also
::hough_line_trans,
::gen_region_hline,
::hough_circles
Module
Region processing
Copyright © 1996-2002 MVTec Software GmbH