Halcon 卡尺找边

dev_close_window ()
read_image (Image2, '无标题')
get_image_size (Image2, Width, Height)
dev_open_window_fit_image (Image2, 0, 0, -1, -1, WindowHandle)
dev_display (Image2)
dev_set_line_width (2)
draw_line (3600, Row1, Column1, Row2, Column2)
Line:=[Row1, Column1, Row2, Column2]
create_metrology_model (MetrologyHandle)
set_metrology_model_image_size (MetrologyHandle, Width, Height)
add_metrology_object_generic (MetrologyHandle, 'line', Line, 20, 5, 1, 30, [], [], Index)
dev_set_color ('green')
apply_metrology_model (Image2, MetrologyHandle)
get_metrology_object_measures (Contours, MetrologyHandle, 'all', 'all', Row, Column)
dev_set_color ('red')
gen_cross_contour_xld (Cross, Row, Column, 6, 0.785398)
get_metrology_object_result (MetrologyHandle, 'all', 'all', 'result_type', 'all_param', Parameter)
get_metrology_object_model_contour (Contour, MetrologyHandle, 'all', 1.5)
clear_metrology_model (MetrologyHandle)

Halcon 卡尺找边_第1张图片

你可能感兴趣的:(Halcon)