本帖最后由 qweqwq 于 2019-9-10 16:21 编辑
*读图
read_image (Image4, 'D:/测试图/bigwindow/ (1).bmp')
*画圆
draw_spoke (Image4, Regions, 200000, 30, 110, 30, ROIRows, ROICols, Direct)
*找圆
spoke (Image37, Regions1, 30, 60, 15, 1, 20, 'negative', 'max', ROIRows, ROICols, Direct, ResultRow, ResultColumn, ArcType)
pts_to_best_circle (Circle1, ResultRow, ResultColumn, ArcType, 15, RowCenter1, ColCenter1, Radius1,StartPhi,EndPhi,PointOrder,ArcAngle)
*圆心生成十字叉
gen_cross_contour_xld (Cross1, RowCenter1, ColCenter1, 50, 0)
就很常规的写法啊,这是halcon13写的,其他版本窗口句柄可能要改一下,我也是刚学,
然后那几个外部封装算子,论坛有分享:
https://www.51halcon.com/forum.p ... &extra=page%3D1
|