dev_close_window()
read_image (Image, 'printer_chip/printer_chip_01')
zoom_image_size (Image, ImageZoom, 512, 512, 'constant')
dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle)
get_part (WindowHandle, Row11, Column11, Row21, Column21)
dev_display (Image)
get_part (WindowHandle, Row12, Column12, Row22, Column22)
dev_open_window_fit_image (ImageZoom, 0, 0, -1, -1, WindowHandle1)
dev_display (ImageZoom)
*区域的缩放
dev_close_window ()
read_image (Image, 'printer_chip/printer_chip_01')
dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle2)
get_image_size (Image, Width, Height)
get_part (WindowHandle2, Row1, Column1, Row2, Column2)
dev_display (Image)
*dev_open_window (0, 0, 512, 512, 'black', WindowHandle2)
dev_set_color ('blue')
draw_region (Region, WindowHandle2)
zoom_region (Region, RegionZoom, 2, 2)
zoom_image_factor (Image, ImageZoom,2, 2, 'constant')
dev_open_window_fit_image (ImageZoom, 0, 0, -1, -1, WindowHandle2)
get_part (WindowHandle2, Row3, Column3, Row4, Column4)
dev_clear_window()
dev_display (ImageZoom)
dev_set_draw ('margin')
*dev_set_color ('red')
*dev_display (Region)
dev_set_color ('orange')
dev_display (RegionZoom)
halcon区域缩放图像缩放测试
最新推荐文章于 2024-08-20 22:47:49 发布