其他分享
首页 > 其他分享> > 拟合线/圆/矩形实例

拟合线/圆/矩形实例

作者:互联网

draw_point (WindowHandle, Row, Column)
gen_circle (Circle, Row, Column, 10.5)

draw_point (WindowHandle, Row1, Column1)
gen_circle (Circle, Row1, Column1, 10.5)

draw_point (WindowHandle, Row2, Column2)
gen_circle (Circle, Row2, Column2, 10.5)

draw_point (WindowHandle, Row3, Column3)
gen_circle (Circle, Row3, Column3, 10.5)

gen_contour_polygon_xld (Contour, [Row,Row1 ,Row2 ,Row3], [Column,Column1,Column2,Column3])

*拟合线
* fit_line_contour_xld(Contour, 'tukey', -1, 0, 5, 2, RowBegin, ColBegin, RowEnd, ColEnd, Nr, Nc, Dist)
* gen_region_line (RegionLines, RowBegin, ColBegin, RowEnd, ColEnd)
* disp_line (WindowHandle, RowBegin, ColBegin, RowEnd, ColEnd)

*拟合圆
* fit_circle_contour_xld (Contour, 'algebraic', -1, 0, 0, 3, 2, Row4, Column4, Radius, StartPhi, EndPhi, PointOrder)
* gen_circle (Circle1, Row4, Column4, Radius)

*拟合矩形
*注:在此需要本案中的点过少不能形成框形
fit_rectangle2_contour_xld (Contour, 'regression', -1, 0, 0, 3, 2, Row5, Column5, Phi, Length1, Length2, PointOrder1)
gen_rectangle2 (Rectangle, Row5, Column5, Phi, Length1, Length2)

标签:point,WindowHandle,contour,实例,Circle,拟合,circle,矩形,gen
来源: https://www.cnblogs.com/dingyd/p/12941478.html