halcon在界面上等待鼠标拖拽任意画两根线并测出其角度
By
admin
at 2018-02-07 • 0人收藏 • 2738人看过
* Image Acquisition 01: Code generated by Image Acquisition 01 dev_close_window () read_image (Image, 'C:/Users/RD-W/Desktop/33333/222.tif') dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle) dev_display (Image) dev_set_line_width (3) dev_set_color ('green') draw_line (WindowHandle, Row1, Column1, Row2, Column2) disp_line (WindowHandle, Row1, Column1, Row2, Column2) read_image (Image, 'C:/Users/RD-W/Desktop/33333/555.tif') dev_set_color ('red') draw_line (WindowHandle, Row11, Column11, Row21, Column21) disp_line (WindowHandle, Row11, Column11, Row21, Column21) disp_line (WindowHandle, Row1, Column1, Row2, Column2) angle_ll (Row1, Column1, Row2, Column2, Row11, Column11, Row21, Column21, Angle) AngleDeg := deg(Angle) dev_get_window (WindowHandle) query_font (WindowHandle, Font) * Specify font name and size FontWithSize := Font[0]+'-20' set_font (WindowHandle, FontWithSize) dev_disp_text ('角度为: '+AngleDeg, 'window', Row11, Column11, 'black', [], [])
1 个回复 | 最后更新于 2018-02-07
![admin](/upload/avatar/middle/1.png)
admin
2018-02-07
#1
登录后方可回帖