dev_close_window () read_image (Image, '测量/0.bmp') get_image_size (Image, Width, Height) dev_open_window (0, 0, Width, Height, 'black', WindowHandle) dev_display (Image) * 画圆 draw_circle (WindowHandle, Row, Column, Radius) * 创建测量句柄 create_metrology_model (MetrologyHandle) * 添加找圆工具 add_metrology_object_circle_measure (MetrologyHandle, Row, Column, Radius, 5, 0.5, 1, 30, [], [], Index) * 显示查找圆轮廓 get_metrology_object_model_contour (Circle, MetrologyHandle, 'all', 1.5) * 显示卡尺轮廓 测量之前调用时 只显示卡尺轮廓 get_metrology_object_measures (Calipers, MetrologyHandle, 'all', 'all', Row1, Column1) dev_set_color ('cyan') dev_display (Circle) dev_display (Calipers) * 测量并拟合测量模型中所有计量对象的几何形状 apply_metrology_model (Image, MetrologyHandle) * 测量之后调用时 显示卡尺轮廓和卡尺找到的点坐标 get_metrology_object_measures (Calipers, MetrologyHandle, 'all', 'all', Row1, Column1) * 获取找圆的结果 Parameter里是圆心坐标和半径 get_metrology_object_result (MetrologyHandle, 'all', 'all', 'result_type', 'all_param', Parameter) * 匹配轮廓 get_metrology_object_result_contour (Contour, MetrologyHandle, 'all', 'all', 1.5) dev_set_color ('green') dev_display (Contour)
标签:MetrologyHandle,metrology,get,object,dev,卡尺,找圆 From: https://www.cnblogs.com/Honsen/p/17622871.html