hough_line_trans_dir — 使用局部梯度方向计算直线的霍夫变换。
hough_line_trans_dir(ImageDir : HoughImage : DirectionUncertainty, AngleResolution : )
算子 hough_line_trans_dir calculates the Hough transform for
lines in those regions passed in the domain of ImageDir.
To do so, the angles and the lengths of the lines' normal vectors are
registered in the parameter space (the so-called Hough or accumulator
space).
In contrast to hough_line_trans, additionally the edge direction in
ImageDir (e.g., returned by sobel_dir or
edges_image) is taken into account. This results in a more efficient
computation and in a reduction of the noise in the Hough space.
The parameter DirectionUncertainty describes how much the edge
direction of the individual points within a line is allowed to vary. For
example, with DirectionUncertainty = 10 a horizontal
line (i.e., edge direction = 0 degrees) may contain points with an edge
direction between -10 and +10 degrees. The higher
DirectionUncertainty is chosen, the higher the computation time
will be. For DirectionUncertainty = 180
hough_line_trans_dir shows the same behavior as
hough_line_trans, i.e., the edge direction is ignored.
DirectionUncertainty should be chosen at least as high as the
step width of the edge direction stored in ImageDir. The minimum
step width is 2 degrees (defined by the image type 'direction').
The result is stored in a newly generated UINT2-Image
(HoughImage), where the x-axis (i.e., columns) represents the
angle between the normal vector and the x-axis of the original image, and the
y-axis (i.e., rows) represents the distance of the line from the origin.
The angle ranges from -90 to 180 degrees and will be stored with a
resolution of 1 / AngleResolution, which means that one pixel
in x-direction is equivalent to 1 / AngleResolution degrees
and that the HoughImage has a width of
270 * AngleResolution
+ 1 pixels. The height of the HoughImage corresponds to the
distance between the lower right corner of the surrounding rectangle
of the input region and the origin.
The local maxima in the result image are equivalent to the parameter values of the lines in the original image.
ImageDir (输入对象) singlechannelimage → object (direction)
Image containing the edge direction. The edges must be described by the image domain.
HoughImage (输出对象) image → object (uint2)
Hough transform.
DirectionUncertainty (输入控制) angle.deg → (integer)
Uncertainty of the edge direction (in degrees).
默认值: 2
值范围:
2
≤
DirectionUncertainty
≤
180
最小增量: 2
AngleResolution (输入控制) integer → (integer)
Resolution in the angle area (in 1/degrees).
默认值: 4
值列表: 1, 2, 4, 8
算子 hough_line_trans_dir 在输入不为空时返回值 2 ( H_MSG_TRUE )。The behavior in case of empty input is set via the operator
set_system('no_object_result',<Result>)。如有必要,则抛出异常。
edges_image,
sobel_dir,
threshold,
hysteresis_threshold,
nonmax_suppression_dir,
reduce_domain
binomial_filter,
gauss_filter,
threshold,
local_max,
plateaus_center
hough_line_trans,
hough_lines,
hough_lines_dir
基础