dist_ellipse_contour_points_xld — Compute the distances of all contour points to an ellipse.
The operator dist_ellipse_contour_points_xld determines the distances between points of a contour Contour and an ellipse specified by the center (Row, Column), the orientation of the main axis Phi, the length of the larger half axis Radius1, and the length of the smaller half axis Radius2.
The distance measure is the geometric distance, sometimes also called orthogonal distance. The distances Distances are returned for all points of the contour. Normally, the distance is a positive value. In this case DistanceMode equal to 'unsigned' must be chosen. If this option is switched to 'signed' the distances can take positive or negative sign, depending on whether the contour points lie outside or inside the ellipse respectively.
Because of artefacts in the preprocessing, the start and end points of a contour might be faulty. In this case, the operator fit_ellipse_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. In order to get the geometric distances of the same set of points as used in the fitting process ClippingEndPoints should take the same value.
Mode for unsigned or signed distance values.
Default value: 'unsigned'
List of values: 'signed', 'unsigned'
Number of points at the beginning and the end of the contours to be ignored for the computation of distances.
Default value: 0
Restriction: ClippingEndPoints >= 0
Row coordinate of the center of the ellipse.
Column coordinate of the center of the ellipse.
Orientation of the main axis in radian.
Restriction: Phi >= 0 && Phi <= 6.283185307
Length of the larger half axis.
Restriction: Radius1 > 0
Length of the smaller half axis.
Restriction: Radius2 >= 0 && Radius2 <= Radius1
Distances of the contour points to the ellipse.
dist_ellipse_contour_points_xld returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.