line_positionline_positionLinePositionLinePosition (Operator)
Name
line_positionline_positionLinePositionLinePosition
— Calculate the center of gravity, length, and orientation of a line.
Signature
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)
Description
The operator line_positionline_positionLinePositionLinePositionLinePosition
returns the center
(RowCenterRowCenterRowCenterRowCenterrowCenter
, ColCenterColCenterColCenterColCentercolCenter
), the (Euclidean) length
(LengthLengthLengthLengthlength
) and the orientation (-pi/2 < PhiPhiPhiPhiphi
<=
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_segmentsDetectEdgeSegmentsDetectEdgeSegmentsDetectEdgeSegments
).
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
RowBeginRowBeginRowBeginRowBeginrowBegin
(input_control) line.begin.y(-array) →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinates of the starting points of the
input lines.
ColBeginColBeginColBeginColBegincolBegin
(input_control) line.begin.x(-array) →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinates of the starting points of the
input lines.
RowEndRowEndRowEndRowEndrowEnd
(input_control) line.end.y(-array) →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinates of the ending points of the
input lines.
ColEndColEndColEndColEndcolEnd
(input_control) line.end.x(-array) →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinates of the ending points of the
input lines.
RowCenterRowCenterRowCenterRowCenterrowCenter
(output_control) point.y(-array) →
HTupleHTupleHtuple (real) (double) (double) (double)
Row coordinates of the centers of gravity of the
input lines.
ColCenterColCenterColCenterColCentercolCenter
(output_control) point.x(-array) →
HTupleHTupleHtuple (real) (double) (double) (double)
Column coordinates of the centers of gravity of the
input lines.
LengthLengthLengthLengthlength
(output_control) real(-array) →
HTupleHTupleHtuple (real) (double) (double) (double)
Euclidean length of the input lines.
PhiPhiPhiPhiphi
(output_control) angle.rad(-array) →
HTupleHTupleHtuple (real) (double) (double) (double)
Orientation of the input lines.
Result
line_positionline_positionLinePositionLinePositionLinePosition
always returns the value 2 (H_MSG_TRUE).
Possible Predecessors
sobel_ampsobel_ampSobelAmpSobelAmpSobelAmp
,
edges_imageedges_imageEdgesImageEdgesImageEdgesImage
,
thresholdthresholdThresholdThresholdThreshold
,
hysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThresholdHysteresisThreshold
,
split_skeleton_regionsplit_skeleton_regionSplitSkeletonRegionSplitSkeletonRegionSplitSkeletonRegion
,
split_skeleton_linessplit_skeleton_linesSplitSkeletonLinesSplitSkeletonLinesSplitSkeletonLines
Possible Successors
set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidth
,
disp_linedisp_lineDispLineDispLineDispLine
Alternatives
line_orientationline_orientationLineOrientationLineOrientationLineOrientation
See also
line_orientationline_orientationLineOrientationLineOrientationLineOrientation
,
detect_edge_segmentsdetect_edge_segmentsDetectEdgeSegmentsDetectEdgeSegmentsDetectEdgeSegments
Module
Foundation