Halcon affine transformations to regions仿射变换

dev_close_window ()
dev_open_window (0, 0, 512, 512, 'white', WindowID)
dev_set_color ('black')

* Draw with the mouse an arbitrary region into the window
draw_region (Region, WindowID)#手动绘制,右键确定
hom_mat2d_identity (HomMat2DIdentity)#3维单位矩阵
hom_mat2d_rotate (HomMat2DIdentity, -0.3, 256, 256, HomMat2DRotate)#旋转矩阵,顺时针为负;绕(256,256)坐标顺时针旋转0.3弧度。
hom_mat2d_scale (HomMat2DRotate, 1.5, 1.5, 256, 256, HomMat2DScale)#缩放矩阵,绕(256,256)坐标,x方向和y方向都缩放1.5倍
affine_trans_region (Region, RegionAffineTrans, HomMat2DScale, 'nearest_neighbor')#执行邻近插值的仿射变换
dev_clear_window ()
dev_set_draw ('margin')
dev_set_color ('red')
dev_display (Region)
#原始图
dev_set_color ('green')
dev_display (RegionAffineTrans)
#仿射图

原始图

仿射图

 原始VS仿射轮廓图

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值