ClassesClassesClassesClasses | | | | Operators

orientation_points_xldorientation_points_xldOrientationPointsXldorientation_points_xldOrientationPointsXldOrientationPointsXld (Operator)

Name

orientation_points_xldorientation_points_xldOrientationPointsXldorientation_points_xldOrientationPointsXldOrientationPointsXld — Orientation of contours or polygons treated as point clouds.

Signature

orientation_points_xld(XLD : : : Phi)

Herror orientation_points_xld(const Hobject XLD, double* Phi)

Herror T_orientation_points_xld(const Hobject XLD, Htuple* Phi)

Herror orientation_points_xld(Hobject XLD, double* Phi)

Herror orientation_points_xld(Hobject XLD, HTuple* Phi)

double HXLD::OrientationPointsXld() const

HTuple HXLDArray::OrientationPointsXld() const

void OrientationPointsXld(const HObject& XLD, HTuple* Phi)

HTuple HXLD::OrientationPointsXld() const

void HOperatorSetX.OrientationPointsXld(
[in] IHUntypedObjectX* XLD, [out] VARIANT* Phi)

VARIANT HXLDX.OrientationPointsXld()

VARIANT HXLDContX.OrientationPointsXld()

VARIANT HXLDPolyX.OrientationPointsXld()

VARIANT HXLDParaX.OrientationPointsXld()

VARIANT HXLDModParaX.OrientationPointsXld()

VARIANT HXLDExtParaX.OrientationPointsXld()

static void HOperatorSet.OrientationPointsXld(HObject XLD, out HTuple phi)

HTuple HXLD.OrientationPointsXld()

Description

The operator orientation_points_xldorientation_points_xldOrientationPointsXldorientation_points_xldOrientationPointsXldOrientationPointsXld calculates the orientation of the point clouds given by the contours or polygons XLDXLDXLDXLDXLDXLD (i.e., the order of the points in the contour or polygon is not taken into account). The orientation Phi is calculated the same way as in elliptic_axis_points_xldelliptic_axis_points_xldEllipticAxisPointsXldelliptic_axis_points_xldEllipticAxisPointsXldEllipticAxisPointsXld. If the contour or polygon is closed (end point = start point), the end point of the contour or polygon is not taken into account to avoid that it receives twice the weight of the other points.

In addition, the contour point p_{m} with maximum distance to the center of gravity c is calculated. If the angle between the vector and the vector given by Phi is greater than , the value of is added to the angle. If XLDXLDXLDXLDXLDXLD consists of only two points, PhiPhiPhiPhiPhiphi is given by the direction from the first point towards the second point.

orientation_points_xldorientation_points_xldOrientationPointsXldorientation_points_xldOrientationPointsXldOrientationPointsXld should be used if the contour XLDXLDXLDXLDXLDXLD intersects itself or if it is not possible to close the contour using a line from end to start point without self-intersection, because in this case orientation_xldorientation_xldOrientationXldorientation_xldOrientationXldOrientationXld does not produce useful results. To test whether the contours or polygons intersect themselves, test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXld can be used.

If more than one contour or polygon is passed, the values of the orientations are stored in a tuple in the same order as the respective contours or polygons in XLDXLDXLDXLDXLDXLD.

Parallelization

Parameters

XLDXLDXLDXLDXLDXLD (input_object)  xld(-array) objectHXLDHXLDHXLDHXLDXHobject

Contours or polygons to be examined.

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

Orientation of the contours or polygons (radians).

Assertion: - pi < Phi && Phi <= pi

Possible Predecessors

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXld, edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix, threshold_sub_pixthreshold_sub_pixThresholdSubPixthreshold_sub_pixThresholdSubPixThresholdSubPix, gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXld

Alternatives

orientation_xldorientation_xldOrientationXldorientation_xldOrientationXldOrientationXld, elliptic_axis_points_xldelliptic_axis_points_xldEllipticAxisPointsXldelliptic_axis_points_xldEllipticAxisPointsXldEllipticAxisPointsXld, smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2Xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2Xld

See also

moments_region_2ndmoments_region_2ndMomentsRegion2ndmoments_region_2ndMomentsRegion2ndMomentsRegion2nd

Module

Foundation


ClassesClassesClassesClasses | | | | Operators