Halcon将小图片显示在大图片的指定位置

Halcon将小图片显示在大图片的指定位置

read_image (Image, ‘C:/Users/Administrator/Desktop/test2/202118/correct.jpg’)

decompose3 (Image, ImageR, ImageG, ImageB)
get_image_size (ImageR, Width1, Height1)
change_format (ImageR, ImagePart, Width1, Height1)

*读取图像

get_image_size(ImageR, Width, Height)
*生成图像全部区域
gen_rectangle1(Rectangle, 0, 0, Height-1, Width-1)
*从区域生成所有的像素坐标
get_region_points(Rectangle, Rows, Cols)
*读取图像的全部像素
get_grayval(ImageR, Rows, Cols, Grayvals)
*生成一个2倍大小的空白图像
read_image (Image1, ‘C:/Users/Administrator/Desktop/test2/202118/lbw.tif’)

*将所有像素坐标加上偏移量

Rows:=Rows+1150 *自己确地位置
Cols:=Cols+1491
*将图像的所有像素覆盖到空白图像的指定区域
set_grayval(Image1, Rows, Cols,Grayvals)

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值