Operators |
dist_rectangle2_contour_points_xld — Compute the distances of all contour points to a rectangle.
dist_rectangle2_contour_points_xld(Contour : : ClippingEndPoints, Row, Column, Phi, Length1, Length2 : Distances)
dist_rectangle2_contour_points_xld determines the Euclidean distances between the points of a contour Contour and a rectangle of arbitrary orientation specified by the center (Row, Column), the orientation Phi, and the half edge lengths Length1 and Length2. The angle Phi must be given in radians and specifies the angle between the horizontal axis and the edge with the half length Length1 in the mathematically positive direction (counterclockwise).
Depending on the processing used to create Contour, the start and end points of a contour may contain positional errors. In this case, the operator fit_rectangle2_contour_xld is typically called with the parameter ClippingEndPoints set to a value greater than zero to exclude points at the beginning and the end of the contour from the computation. To compute the distances of the same set of points as used in the fitting process, ClippingEndPoints should be set to the same value as in fit_rectangle2_contour_xld.
Input contour.
Number of points at the beginning and the end of the contours to be ignored for the computation of distances.
Default value: 0
Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Restriction: ClippingEndPoints >= 0
Row coordinate of the center of the rectangle.
Column coordinate of the center of the rectangle.
Orientation of the main axis of the rectangle [rad].
First radius (half length) of the rectangle.
Restriction: Length1 > 0
Second radius (half width) of the rectangle.
Restriction: Length2 >= 0
Distances of the contour points to the rectangle.
dist_rectangle2_contour_points_xld returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.
Foundation
Operators |