halcon運算元之如何畫各種互動ROI圖形

艾尼瓦爾魁發表於2020-09-29

dev_open_window (0, 0, 512, 512, ‘black’, WindowHandle)

dev_set_draw (‘margin’)

*畫圓
draw_circle (WindowHandle, Row, Column, Radius)
gen_circle (Circle, Row, Column, Radius)

*畫橢圓
draw_ellipse (WindowHandle, Row1, Column1, Phi, Radius1, Radius2)
gen_ellipse (Ellipse, Row1, Column1, Phi, Radius1, Radius2)

*畫不規則區域
draw_polygon (PolygonRegion, WindowHandle)

draw_line (WindowHandle, Row12, Column12, Row21, Column21)
disp_line (WindowHandle, Row12, Column12, Row21, Column21)

*畫標準矩形
draw_rectangle1 (WindowHandle, Row11, Column11, Row2, Column2)
gen_rectangle1 (Rectangle, Row11, Column11, Row2, Column2)

*畫仿射矩形
draw_rectangle2 (WindowHandle, Row3, Column3, Phi1, Length1, Length2)
gen_rectangle2 (Rectangle1, Row3, Column3, Phi1, Length1, Length2)

*畫閉合區域
draw_region (Region, WindowHandle)

draw_line_mod (WindowHandle, Row12, Column12, Row21, Column21, Row13, Column13, Row22, Column22)
draw_ellipse_mod (WindowHandle, Row1, Column1, Phi, Radius1, Radius2, Row4, Column4, Phi2, Radius11, Radius21)

相關文章