ClassesClassesClassesClasses | | | | Operators

get_contour_angle_xldT_get_contour_angle_xldGetContourAngleXldget_contour_angle_xldGetContourAngleXldGetContourAngleXld (Operator)

Name

get_contour_angle_xldT_get_contour_angle_xldGetContourAngleXldget_contour_angle_xldGetContourAngleXldGetContourAngleXld — Calculate the direction of an XLD contour for each contour point.

Signature

get_contour_angle_xld(Contour : : AngleMode, CalcMode, Lookaround : Angles)

Herror T_get_contour_angle_xld(const Hobject Contour, const Htuple AngleMode, const Htuple CalcMode, const Htuple Lookaround, Htuple* Angles)

Herror get_contour_angle_xld(Hobject Contour, const HTuple& AngleMode, const HTuple& CalcMode, const HTuple& Lookaround, HTuple* Angles)

HTuple HXLDCont::GetContourAngleXld(const HTuple& AngleMode, const HTuple& CalcMode, const HTuple& Lookaround) const

void GetContourAngleXld(const HObject& Contour, const HTuple& AngleMode, const HTuple& CalcMode, const HTuple& Lookaround, HTuple* Angles)

HTuple HXLDCont::GetContourAngleXld(const HString& AngleMode, const HString& CalcMode, Hlong Lookaround) const

HTuple HXLDCont::GetContourAngleXld(const char* AngleMode, const char* CalcMode, Hlong Lookaround) const

void HOperatorSetX.GetContourAngleXld(
[in] IHUntypedObjectX* Contour, [in] VARIANT AngleMode, [in] VARIANT CalcMode, [in] VARIANT Lookaround, [out] VARIANT* Angles)

VARIANT HXLDContX.GetContourAngleXld(
[in] BSTR AngleMode, [in] BSTR CalcMode, [in] Hlong Lookaround)

static void HOperatorSet.GetContourAngleXld(HObject contour, HTuple angleMode, HTuple calcMode, HTuple lookaround, out HTuple angles)

HTuple HXLDCont.GetContourAngleXld(string angleMode, string calcMode, int lookaround)

Description

get_contour_angle_xldget_contour_angle_xldGetContourAngleXldget_contour_angle_xldGetContourAngleXldGetContourAngleXld calculates for each point of the XLD contour ContourContourContourContourContourcontour the direction of its tangent. Two modes for the output values can be chosen: By passing 'abs'"abs""abs""abs""abs""abs" for AngleModeAngleModeAngleModeAngleModeAngleModeangleMode, the resulting angles are returned relative to the horizontal axis as angles between 0 and (counter-clockwise). By passing 'rel'"rel""rel""rel""rel""rel", the angle difference to the previous contour point is returned. In this case the range of values is between and , where negative values indicate a right turn and positive values indicate a left turn.

There are three different ways of calculating the tangent direction (CalcModeCalcModeCalcModeCalcModeCalcModecalcMode) of the contour point i using the contour points in the interval from i - Lookaround to i + Lookaround. By using 'range'"range""range""range""range""range", the angle of the line segment between the first and last point of the interval is used. For 'mean'"mean""mean""mean""mean""mean", the average of all angles between consecutive points of the contour is used. Finally, for 'regress'"regress""regress""regress""regress""regress", the direction of the regression line (the least squares fit of a line to the contour points in the interval) is used. LookaroundLookaroundLookaroundLookaroundLookaroundlookaround is a measure of how strongly the contour is smoothed. The angles are returned in AnglesAnglesAnglesAnglesAnglesangles in radians.

Parallelization

Parameters

ContourContourContourContourContourcontour (input_object)  xld_cont objectHXLDContHXLDContHXLDContHXLDContXHobject

Input contour.

AngleModeAngleModeAngleModeAngleModeAngleModeangleMode (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Return type of the angles.

Default value: 'abs' "abs" "abs" "abs" "abs" "abs"

List of values: 'abs'"abs""abs""abs""abs""abs", 'rel'"rel""rel""rel""rel""rel"

CalcModeCalcModeCalcModeCalcModeCalcModecalcMode (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Method for computing the angles.

Default value: 'range' "range" "range" "range" "range" "range"

List of values: 'mean'"mean""mean""mean""mean""mean", 'range'"range""range""range""range""range", 'regress'"regress""regress""regress""regress""regress"

LookaroundLookaroundLookaroundLookaroundLookaroundlookaround (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of points to take into account.

Default value: 3

Restriction: Lookaround > 0

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

Direction of the tangent to the contour points.

Possible Predecessors

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXld, lines_gausslines_gaussLinesGausslines_gaussLinesGaussLinesGauss, lines_facetlines_facetLinesFacetlines_facetLinesFacetLinesFacet, edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix

See also

get_contour_xldget_contour_xldGetContourXldget_contour_xldGetContourXldGetContourXld, get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldget_contour_attrib_xldGetContourAttribXldGetContourAttribXld

Module

Foundation


ClassesClassesClassesClasses | | | | Operators