*窗口坐标 宽度
dev_update_window('off')Halcon
winw:=10000
winh:=10000
dev_open_window(0, 0, 1000, 1000, 'black', WindowHandle)
dev_set_part(0,0,winw,winh)
set_system ('clip_region', 'false')
dev_clear_window()
dev_set_draw ('margin')
gen_region_line(xaxis, 0, 0, 0, winw)
gen_region_line(yaxis, 0, 0, winw, 0)
dev_set_color ('red')
dev_display(xaxis)
dev_display(yaxis)
*定义相机视野长宽
camstartrow:=5000
camstartcol:=5000
cam_width:=1000
cam_degre:=0
*定义相机左上角坐标,后面计算像素坐标用
*以Cam的左上角为0,0 坐标 相机原点在机械坐标系中的位置是 (arm_center_row-cam_width),(camstartcol-cam_width)
cam_origin_row:=camstartrow-cam_width
cam_origin_col:=camstartcol-cam_width
*生成相机区域
gen_rectangle2(camrect, camstartrow, camstartcol, cam_degre, cam_width, cam_width)