select_matching_linesselect_matching_linesSelectMatchingLinesSelectMatchingLinesselect_matching_lines(算子)
名称
select_matching_linesselect_matching_linesSelectMatchingLinesSelectMatchingLinesselect_matching_lines — 从一组线(在 HNF 中)中选择最适合区域的线。
签名
Herror select_matching_lines(const Hobject RegionIn, Hobject* RegionLines, double AngleIn, double DistIn, const Hlong LineWidth, const Hlong Thresh, double* AngleOut, double* DistOut)
Herror T_select_matching_lines(const Hobject RegionIn, Hobject* RegionLines, const Htuple AngleIn, const Htuple DistIn, const Htuple LineWidth, const Htuple Thresh, Htuple* AngleOut, Htuple* DistOut)
void SelectMatchingLines(const HObject& RegionIn, HObject* RegionLines, const HTuple& AngleIn, const HTuple& DistIn, const HTuple& LineWidth, const HTuple& Thresh, HTuple* AngleOut, HTuple* DistOut)
HRegion HRegion::SelectMatchingLines(const HTuple& AngleIn, const HTuple& DistIn, Hlong LineWidth, Hlong Thresh, HTuple* AngleOut, HTuple* DistOut) const
HRegion HRegion::SelectMatchingLines(double AngleIn, double DistIn, Hlong LineWidth, Hlong Thresh, double* AngleOut, double* DistOut) const
static void HOperatorSet.SelectMatchingLines(HObject regionIn, out HObject regionLines, HTuple angleIn, HTuple distIn, HTuple lineWidth, HTuple thresh, out HTuple angleOut, out HTuple distOut)
HRegion HRegion.SelectMatchingLines(HTuple angleIn, HTuple distIn, int lineWidth, int thresh, out HTuple angleOut, out HTuple distOut)
HRegion HRegion.SelectMatchingLines(double angleIn, double distIn, int lineWidth, int thresh, out double angleOut, out double distOut)
def select_matching_lines(region_in: HObject, angle_in: MaybeSequence[float], dist_in: MaybeSequence[float], line_width: int, thresh: int) -> Tuple[HObject, Sequence[float], Sequence[float]]
def select_matching_lines_s(region_in: HObject, angle_in: MaybeSequence[float], dist_in: MaybeSequence[float], line_width: int, thresh: int) -> Tuple[HObject, float, float]
描述
Lines which fit best into a region can be selected from a set of lines which
are available in HNF with the help of the operator
select_matching_linesselect_matching_linesSelectMatchingLinesSelectMatchingLinesSelectMatchingLinesselect_matching_lines; the region itself is also transmitted
as a parameter (RegionInRegionInRegionInRegionInregionInregion_in). The width of the lines can be
indicated by the parameter LineWidthLineWidthLineWidthLineWidthlineWidthline_width. The selected lines will
be returned in HNF and as regions (RegionLinesRegionLinesRegionLinesRegionLinesregionLinesregion_lines).
The lines are selected iteratively in a loop: At first, the line showing
the greatest overlap with the input region is selected from the set of
input lines. This line will then be taken over into the output set whereby
all points belonging to that line will not be considered in the further
steps determining overlaps. The loop will be left when the maximum overlap
value of the region and the lines falls below a certain threshold value
(ThreshThreshThreshThreshthreshthresh). The selected lines will be returned
as regions as well as in HNF.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
RegionInRegionInRegionInRegionInregionInregion_in (输入对象) region → objectHRegionHObjectHRegionHobject
Region in which the lines are to be matched.
RegionLinesRegionLinesRegionLinesRegionLinesregionLinesregion_lines (输出对象) region(-array) → objectHRegionHObjectHRegionHobject *
Region array containing the matched lines.
AngleInAngleInAngleInAngleInangleInangle_in (输入控制) hesseline.angle.rad(-array) → HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)
Angles (in radians) of the normal vectors of the
input lines.
值范围:
-1.5707963
≤
AngleIn
AngleIn
AngleIn
AngleIn
angleIn
angle_in
≤
3.1415927
DistInDistInDistInDistIndistIndist_in (输入控制) hesseline.distance(-array) → HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)
Distances of the input lines form the origin.
元素数量:
DistIn == AngleIn
LineWidthLineWidthLineWidthLineWidthlineWidthline_width (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Widths of the lines.
默认值:
7
值范围:
1
≤
LineWidth
LineWidth
LineWidth
LineWidth
lineWidth
line_width
ThreshThreshThreshThreshthreshthresh (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Threshold value for the number of line points in
the region.
默认值:
100
值范围:
1
≤
Thresh
Thresh
Thresh
Thresh
thresh
thresh
AngleOutAngleOutAngleOutAngleOutangleOutangle_out (输出控制) hesseline.angle.rad(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Angles (in radians) of the normal vectors of the
selected
lines.
元素数量:
AngleOut <= AngleIn
值范围:
-1.5707963
≤
AngleOut
AngleOut
AngleOut
AngleOut
angleOut
angle_out
≤
3.1415927
DistOutDistOutDistOutDistOutdistOutdist_out (输出控制) hesseline.distance(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Distances of the selected lines from the origin.
元素数量:
DistOut == AngleOut
值范围:
0
≤
DistOut
DistOut
DistOut
DistOut
distOut
dist_out
结果
算子 select_matching_linesselect_matching_linesSelectMatchingLinesSelectMatchingLinesSelectMatchingLinesselect_matching_lines 在输入不为空时返回值 2 (H_MSG_TRUE)。当输入为空(无可用输入区域)时,可设置行为通过算子 set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>),
the behavior in case of empty region is set via
set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>)。如有必要,则抛出异常。
可能的前趋
hough_lineshough_linesHoughLinesHoughLinesHoughLineshough_lines
模块
基础