halcon中测量圆弧尺寸
前言
主要测量一个圆弧块的尺寸,其中主要用到算子:get_points_ellipse( : : Angle, Row, Column, Phi, Radius1, Radius2 : RowPoint, ColPoint)、gen_ellipse_contour_xld( : ContEllipse : Row, Column, Phi, Radius1, Radius2, StartPhi, EndPhi, PointOrder, Resolution : )、gen_contour_polygon_xld( : Contour : Row, Col : )、disp_arc( : : WindowHandle, CenterRow, CenterCol, Angle, BeginRow, BeginCol : )、gen_measure_arc( : : CenterRow, CenterCol, Radius, AngleStart, AngleExtent, AnnulusRadius, Width, Height, Interpolation : MeasureHandle)
下面将用一个简单例子解释这几个主要算子含义以及应用
一、样例
*读取图片
read_image (Zeiss1, 'zeiss1')
*获取图片长宽
get_image_size (Zeiss1, Width, Height)
*关闭所有窗口
dev_close_window ()
*打开一个新的窗口,其中宽Width / 2,高Height / 2,窗口句柄WindowHandle
dev_open_window (0, 0, Width / 2, Height / 2, 'black', WindowHandle)
*设定窗口字体参数
set_display_font (WindowHandle, 14, 'mono', 'true', 'false')
*显示图像
dev_display (Zeiss1)
*显示按键F5继续信息
disp_continue_message (WindowHandle, 'black', 'true')
*暂停程序,等待按键F5输入
stop ()
* 准备生成椭圆的一些参数
R