这里把XLD轮廓转化为2维多边形,采用CGAL中多边形集合运算相关算法来实现该功能,例如对于计算轮廓交集,使用CGAL::intersection()来计算,CGAL::join()计算并集,CGAL::difference()计算差集,对于对称差集则可以根据差集进行转换。 //多边形轮廓计算交集Polygon_2P;for(inti=0;i<num1;++i){P.push_back(Point_2(pts1...
可以使用gen_line_contour_xld函数根据直线的起点和方向向量生成直线的XLD(Extended Line Description)表示,或者使用其他适合表示直线的方法。然而,对于计算交点,我们实际上只需要直线的起点和方向向量。 查找Halcon中计算两条直线交点的函数或方法: Halcon提供了intersection_line_line函数来计算两条直线的交点。这个函数接...
intersection_line_contour_xldcalculates the intersection points of a line and an XLDContour. The line is defined by the points (LineRow1,LineColumn1) and (LineRow2,LineColumn2). The intersection points, if any, are returned in (Row,Column). If a part of the XLD contour lies on the li...
计算圆或圆弧与XLD轮廓的交点。 29.intersection_circles 计算两个圆或圆弧的交点。 30.intersection_contours_xld 计算两个XLD轮廓的交点。 31.intersection_line_circle 计算直线与圆或圆弧的交点。 32.intersection_line_contour_xld 计算直线和XLD轮廓的交点 33.intersection_lines 计算两条直线的交点。 34.intersect...
14. elliptic_axis_xld 功能:轮廓(contour)或多变形(polygon)的等价椭圆参数。 15. fit_circle_contour_xld 功能:根据圆周近似获取XLD轮廓(contour)。 16. fit_ellipse_contour_xld 功能:根据椭圆或椭圆弧近似获取XLD轮廓(contour)。 17. fit_line_contour_xld ...
intersection (ObjectSelected, RegionLine, Region_FP) get_region_points (Region_FP, Rows_FP, Columns_FP) FP_R[Index-1]:=Rows_FP[0] FP_C[Index-1]:=Columns_FP[0] endfor gen_region_points (Region_Points, FP_R, FP_C) dilation_circle (Region_Points, Region_Points, 1) ...
gen_cross_contour_xld (Cross_EP, Row2_Measure_01_0, Column2_Measure_01_0, 20, 0.785398) if(IsChooseBackGround) intersection (Region_Holes, Region_MeasureC, Region_LineShow) Res:=Width_Measure_01_0 else difference (Region_MeasureC, Region_Holes, Region_LineShow) ...
intersection(Region1, Region2 : RegionIntersection : : ) 作用:获得两区域的交集 区域方向有关的算子: line_orientation( : : RowBegin, ColBegin, RowEnd, ColEnd : Phi) 作用:计算直线方向 orientation_region(Regions : : : Phi) 作用:计算区域方向(弧度值) ...
LineColEnd :=[] count_obj(SortedContours, Number)forIndex:=1to Number by1select_obj(SortedContours, ObjectSelected, Index) fit_line_contour_xld(ObjectSelected,'tukey', -1,0,5,2, RowBegin, ColBegin, RowEnd, ColEnd, Nr, Nc, Dist) ...
功能:根据区域创建XLD轮廓(contour)。 5. gen_contours_skeleton_xld 功能:将框架转换为XLD轮廓(contour)。 6. gen_cross_contour_xld 功能:根据每个输入点交叉的形状创键一个XLD轮廓(contour)。 7. gen_ellipse_contour_xld 功能:根据相应的椭圆弧创建一个XLD轮廓(contour)。