如何利用halcon多图片中的多个圆快速标注半径?
*兄弟你上张图来要代码呀。
*核心代码:
fit_circle_contour_xld (Contour, 'atukey', -1, 2, 0, 3, 2, Row, Column, Radius, StartPhi, EndPhi, PointOrder)
*圆心:Row, Column
*半径:Radius
*画圆
gen_circle_contour_xld(ContCircle, Row, Column, Radius, StartPhi, EndPhi, PointOrder, 1)
*或
tuple_length(Row, Length)
for Index := 0 to Length-1 by 1
dev_set_draw('margin')
gen_circle(Circle, Row[Index], Column[Index], Radius[Index])
*圆心坐标点写半径值
set_tposition(WindowHandle, Row[Index], Column[Index])
write_string(WindowHandle, Radius[Index])
endfor