Herror ::length_xld (
    Hobject XLD,
    double *Length
)
Herror ::length_xld (
    Hobject XLD,
    HTuple *Length
)

Length of contours or polygons.

::length_xld calculates the length of the contours or polygons XLD. The length is calculated as the sum of the euclidian distances of successive points on the contour or polygon. If more than one contour or polygon is passed the results are stored as tuples in which the index of a value corresponds to the index of the respective contour or polygon in XLD.


Parameters

XLD (input_object)
xld(-array) -> Hobject: HXLD(Array)
Contours or polygons to be examined.

Length (output_control)
real(-array) -> (HTuple.) double *
Length of the contour or polygon.
Assertion: Length >= 0


Complexity

Let n be the number of points of the contour or polygon. Then the run time is O(n).


Result

::length_xld returns H_MSG_TRUE if the input is not empty. If the input is empty the behaviour can be set via ::set_system('no_object_result',<Result>). If necessary, an exception is raised.


Possible Predecessors

::gen_contours_skeleton_xld, ::smooth_contours_xld, ::gen_polygons_xld


See also

::area_center_xld, ::moments_any_xld, ::moments_xld, ::contlength


Module

Sub-pixel operators



Copyright © 1996-2002 MVTec Software GmbH