halcon区域缩放图像缩放测试

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)



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值