Name
distance_cc_min_pointsdistance_cc_min_pointsDistanceCcMinPointsDistanceCcMinPoints — Calculate the minimum distance between two contours and the points used for
the calculation.
Herror distance_cc_min_points(const Hobject Contour1, const Hobject Contour2, const char* Mode, double* DistanceMin, double* Row1, double* Column1, double* Row2, double* Column2)
Herror T_distance_cc_min_points(const Hobject Contour1, const Hobject Contour2, const Htuple Mode, Htuple* DistanceMin, Htuple* Row1, Htuple* Column1, Htuple* Row2, Htuple* Column2)
void DistanceCcMinPoints(const HObject& Contour1, const HObject& Contour2, const HTuple& Mode, HTuple* DistanceMin, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2)
HTuple HXLDCont::DistanceCcMinPoints(const HXLDCont& Contour2, const HString& Mode, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2) const
double HXLDCont::DistanceCcMinPoints(const HXLDCont& Contour2, const HString& Mode, double* Row1, double* Column1, double* Row2, double* Column2) const
double HXLDCont::DistanceCcMinPoints(const HXLDCont& Contour2, const char* Mode, double* Row1, double* Column1, double* Row2, double* Column2) const
static void HOperatorSet.DistanceCcMinPoints(HObject contour1, HObject contour2, HTuple mode, out HTuple distanceMin, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2)
HTuple HXLDCont.DistanceCcMinPoints(HXLDCont contour2, string mode, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2)
double HXLDCont.DistanceCcMinPoints(HXLDCont contour2, string mode, out double row1, out double column1, out double row2, out double column2)
distance_cc_min_pointsdistance_cc_min_pointsDistanceCcMinPointsDistanceCcMinPointsDistanceCcMinPoints calculates the minimum distance between
Contour1Contour1Contour1Contour1contour1 and Contour2Contour2Contour2Contour2contour2.
The minimum distance is returned in DistanceMinDistanceMinDistanceMinDistanceMindistanceMin.
In comparison to distance_cc_mindistance_cc_minDistanceCcMinDistanceCcMinDistanceCcMin, this operator also returns the
points on the contours that provide the minimum distance.
The point on Contour1Contour1Contour1Contour1contour1 is returned in Row1Row1Row1Row1row1 and
Column1Column1Column1Column1column1; the point on Contour2Contour2Contour2Contour2contour2 is returned in
Row2Row2Row2Row2row2 and Column2Column2Column2Column2column2.
The parameter ModeModeModeModemode sets the type of computing the distance.
'fast_point_to_segment'"fast_point_to_segment""fast_point_to_segment""fast_point_to_segment""fast_point_to_segment" calculates the distance between the line
segments adjacent to the closest contour points, and
'point_to_segment'"point_to_segment""point_to_segment""point_to_segment""point_to_segment" determines the actual minimum distance between
the contour segments.
While 'fast_point_to_segment'"fast_point_to_segment""fast_point_to_segment""fast_point_to_segment""fast_point_to_segment" is an efficient algorithm
with a complexity of n*log(n), 'point_to_segment'"point_to_segment""point_to_segment""point_to_segment""point_to_segment" has
quadratic complexity and thus takes a longer time to execute,
especially for contours with many line segments.
Both iconic input parameters must contain the same number of contours.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on internal data level.
Distance calculation mode.
Default value:
'fast_point_to_segment'
"fast_point_to_segment"
"fast_point_to_segment"
"fast_point_to_segment"
"fast_point_to_segment"
List of values: 'fast_point_to_segment'"fast_point_to_segment""fast_point_to_segment""fast_point_to_segment""fast_point_to_segment", 'point_to_segment'"point_to_segment""point_to_segment""point_to_segment""point_to_segment"
Minimum distance between the two contours.
gen_contour_polygon_rounded_xld(Cont1, [0,100,100,0,0], [0,0,100,100,0],
[50,50,50,50,50], 0.5);
gen_contour_polygon_rounded_xld(Cont2, [41,91,91,41,41], [41,41,91,91,41],
[25,25,25,25,25], 0.5);
distance_cc_min_points(Cont1, Cont2, "fast_point_to_segment", &distance_min,
&Row1, &Column1, &Row2, &Column2);
distance_cc_min_pointsdistance_cc_min_pointsDistanceCcMinPointsDistanceCcMinPointsDistanceCcMinPoints returns 2 (H_MSG_TRUE).
distance_scdistance_scDistanceScDistanceScDistanceSc,
distance_pcdistance_pcDistancePcDistancePcDistancePc,
distance_ccdistance_ccDistanceCcDistanceCcDistanceCc,
distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXldDistanceContoursXld,
distance_cc_mindistance_cc_minDistanceCcMinDistanceCcMinDistanceCcMin
distance_srdistance_srDistanceSrDistanceSrDistanceSr,
distance_prdistance_prDistancePrDistancePrDistancePr
Foundation