ClassesClassesClassesClasses | | | | Operators

line_positionline_positionLinePositionline_positionLinePositionLinePosition (Operator)

Name

line_positionline_positionLinePositionline_positionLinePositionLinePosition — Calculate the center of gravity, length, and orientation of a line.

Signature

line_position( : : RowBegin, ColBegin, RowEnd, ColEnd : RowCenter, ColCenter, Length, Phi)

Herror line_position(const Hlong RowBegin, const Hlong ColBegin, const Hlong RowEnd, const Hlong 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)

Herror line_position(const HTuple& RowBegin, const HTuple& ColBegin, const HTuple& RowEnd, const HTuple& ColEnd, double* RowCenter, double* ColCenter, double* Length, double* Phi)

Herror 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(Hlong RowBegin, Hlong ColBegin, Hlong RowEnd, Hlong ColEnd, double* RowCenter, double* ColCenter, double* Length, double* Phi)

void HOperatorSetX.LinePosition(
[in] VARIANT RowBegin, [in] VARIANT ColBegin, [in] VARIANT RowEnd, [in] VARIANT ColEnd, [out] VARIANT* RowCenter, [out] VARIANT* ColCenter, [out] VARIANT* Length, [out] VARIANT* Phi)

VARIANT HMiscX.LinePosition(
[in] VARIANT RowBegin, [in] VARIANT ColBegin, [in] VARIANT RowEnd, [in] VARIANT ColEnd, [out] VARIANT* ColCenter, [out] VARIANT* Length, [out] VARIANT* 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(int rowBegin, int colBegin, int rowEnd, int colEnd, out double rowCenter, out double colCenter, out double length, out double phi)

Description

The operator line_positionline_positionLinePositionline_positionLinePositionLinePosition returns the center (RowCenterRowCenterRowCenterRowCenterRowCenterrowCenter, ColCenterColCenterColCenterColCenterColCentercolCenter), 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_segmentsDetectEdgeSegmentsdetect_edge_segmentsDetectEdgeSegmentsDetectEdgeSegments).

Parallelization

Parameters

RowBeginRowBeginRowBeginRowBeginRowBeginrowBegin (input_control)  line.begin.y(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Row coordinates of the starting points of the input lines.

ColBeginColBeginColBeginColBeginColBegincolBegin (input_control)  line.begin.x(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Column coordinates of the starting points of the input lines.

RowEndRowEndRowEndRowEndRowEndrowEnd (input_control)  line.end.y(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Row coordinates of the ending points of the input lines.

ColEndColEndColEndColEndColEndcolEnd (input_control)  line.end.x(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Column coordinates of the ending points of the input lines.

RowCenterRowCenterRowCenterRowCenterRowCenterrowCenter (output_control)  point.y(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Row coordinates of the centers of gravity of the input lines.

ColCenterColCenterColCenterColCenterColCentercolCenter (output_control)  point.x(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Column coordinates of the centers of gravity of the input lines.

LengthLengthLengthLengthLengthlength (output_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Euclidean length of the input lines.

PhiPhiPhiPhiPhiphi (output_control)  angle.rad(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Orientation of the input lines.

Result

line_positionline_positionLinePositionline_positionLinePositionLinePosition always returns the value 2 (H_MSG_TRUE).

Possible Predecessors

sobel_ampsobel_ampSobelAmpsobel_ampSobelAmpSobelAmp, edges_imageedges_imageEdgesImageedges_imageEdgesImageEdgesImage, thresholdthresholdThresholdthresholdThresholdThreshold, hysteresis_thresholdhysteresis_thresholdHysteresisThresholdhysteresis_thresholdHysteresisThresholdHysteresisThreshold, split_skeleton_regionsplit_skeleton_regionSplitSkeletonRegionsplit_skeleton_regionSplitSkeletonRegionSplitSkeletonRegion, split_skeleton_linessplit_skeleton_linesSplitSkeletonLinessplit_skeleton_linesSplitSkeletonLinesSplitSkeletonLines

Possible Successors

set_line_widthset_line_widthSetLineWidthset_line_widthSetLineWidthSetLineWidth, disp_linedisp_lineDispLinedisp_lineDispLineDispLine

Alternatives

line_orientationline_orientationLineOrientationline_orientationLineOrientationLineOrientation, select_linesselect_linesSelectLinesselect_linesSelectLinesSelectLines, partition_linespartition_linesPartitionLinespartition_linesPartitionLinesPartitionLines

See also

line_orientationline_orientationLineOrientationline_orientationLineOrientationLineOrientation, select_linesselect_linesSelectLinesselect_linesSelectLinesSelectLines, partition_linespartition_linesPartitionLinespartition_linesPartitionLinesPartitionLines, detect_edge_segmentsdetect_edge_segmentsDetectEdgeSegmentsdetect_edge_segmentsDetectEdgeSegmentsDetectEdgeSegments

Module

Foundation


ClassesClassesClassesClasses | | | | Operators