line_positionline_positionLinePositionLinePositionline_position (算子名称)
名称
line_positionline_positionLinePositionLinePositionline_position — Calculate the center of gravity, length, and orientation of a line.
参数签名
Herror line_position(double RowBegin, double ColBegin, double RowEnd, double ColEnd, double* RowCenter, double* ColCenter, double* Length, double* Phi)
Herror T_line_position(const Htuple RowBegin, const Htuple ColBegin, const Htuple RowEnd, const Htuple ColEnd, Htuple* RowCenter, Htuple* ColCenter, Htuple* Length, Htuple* Phi)
void LinePosition(const HTuple& RowBegin, const HTuple& ColBegin, const HTuple& RowEnd, const HTuple& ColEnd, HTuple* RowCenter, HTuple* ColCenter, HTuple* Length, HTuple* Phi)
static void HMisc::LinePosition(const HTuple& RowBegin, const HTuple& ColBegin, const HTuple& RowEnd, const HTuple& ColEnd, HTuple* RowCenter, HTuple* ColCenter, HTuple* Length, HTuple* Phi)
static void HMisc::LinePosition(double RowBegin, double ColBegin, double RowEnd, double ColEnd, double* RowCenter, double* ColCenter, double* Length, double* Phi)
static void HOperatorSet.LinePosition(HTuple rowBegin, HTuple colBegin, HTuple rowEnd, HTuple colEnd, out HTuple rowCenter, out HTuple colCenter, out HTuple length, out HTuple phi)
static void HMisc.LinePosition(HTuple rowBegin, HTuple colBegin, HTuple rowEnd, HTuple colEnd, out HTuple rowCenter, out HTuple colCenter, out HTuple length, out HTuple phi)
static void HMisc.LinePosition(double rowBegin, double colBegin, double rowEnd, double colEnd, out double rowCenter, out double colCenter, out double length, out double phi)
def line_position(row_begin: MaybeSequence[Union[int, float]], col_begin: MaybeSequence[Union[int, float]], row_end: MaybeSequence[Union[int, float]], col_end: MaybeSequence[Union[int, float]]) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float]]
def line_position_s(row_begin: MaybeSequence[Union[int, float]], col_begin: MaybeSequence[Union[int, float]], row_end: MaybeSequence[Union[int, float]], col_end: MaybeSequence[Union[int, float]]) -> Tuple[float, float, float, float]
描述
该算子 line_positionline_positionLinePositionLinePositionLinePositionline_position returns the center
(RowCenterRowCenterRowCenterRowCenterrowCenterrow_center, ColCenterColCenterColCenterColCentercolCentercol_center), the (Euclidean) length
(LengthLengthLengthLengthlengthlength) and the orientation (-pi/2 < PhiPhiPhiPhiphiphi <=
pi/2)
of the given lines. If more than one line is to be treated the line
and column indices can be passed as tuples. In this case the output
parameters, of course, are also tuples.
The routine is applied, for example, to model lines in order to
determine search regions for the edge detection
(detect_edge_segmentsdetect_edge_segmentsDetectEdgeSegmentsDetectEdgeSegmentsDetectEdgeSegmentsdetect_edge_segments).
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
RowBeginRowBeginRowBeginRowBeginrowBeginrow_begin (input_control) line.begin.y(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinates of the starting points of the
input lines.
ColBeginColBeginColBeginColBegincolBegincol_begin (input_control) line.begin.x(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinates of the starting points of the
input lines.
RowEndRowEndRowEndRowEndrowEndrow_end (input_control) line.end.y(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinates of the ending points of the
input lines.
ColEndColEndColEndColEndcolEndcol_end (input_control) line.end.x(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinates of the ending points of the
input lines.
RowCenterRowCenterRowCenterRowCenterrowCenterrow_center (output_control) point.y(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Row coordinates of the centers of gravity of the
input lines.
ColCenterColCenterColCenterColCentercolCentercol_center (output_control) point.x(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Column coordinates of the centers of gravity of the
input lines.
LengthLengthLengthLengthlengthlength (output_control) real(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Euclidean length of the input lines.
PhiPhiPhiPhiphiphi (output_control) angle.rad(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Orientation of the input lines.
结果
line_positionline_positionLinePositionLinePositionLinePositionline_position always 返回值 2 (
H_MSG_TRUE)
.
可能的前置算子
sobel_ampsobel_ampSobelAmpSobelAmpSobelAmpsobel_amp,
edges_imageedges_imageEdgesImageEdgesImageEdgesImageedges_image,
thresholdthresholdThresholdThresholdThresholdthreshold,
hysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThresholdHysteresisThresholdhysteresis_threshold,
split_skeleton_regionsplit_skeleton_regionSplitSkeletonRegionSplitSkeletonRegionSplitSkeletonRegionsplit_skeleton_region,
split_skeleton_linessplit_skeleton_linesSplitSkeletonLinesSplitSkeletonLinesSplitSkeletonLinessplit_skeleton_lines
可能的后置算子
set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width,
disp_linedisp_lineDispLineDispLineDispLinedisp_line
可替代算子
line_orientationline_orientationLineOrientationLineOrientationLineOrientationline_orientation
参考其它
line_orientationline_orientationLineOrientationLineOrientationLineOrientationline_orientation,
detect_edge_segmentsdetect_edge_segmentsDetectEdgeSegmentsDetectEdgeSegmentsDetectEdgeSegmentsdetect_edge_segments
模块
Foundation