halcon中怎么降低图像亮度_Halcon学习之七:改变图像的现实方式和大小

本文介绍了如何使用Halcon库进行图像处理,包括改变图像大小、裁剪图像的不同方法如crop_domain、crop_domain_rel、crop_part、crop_rectangle1,以及图像平铺操作如tile_channels和tile_images。通过示例代码展示了读取图像,然后进行一系列尺寸调整和裁剪操作,以适应不同的处理需求。
摘要由CSDN通过智能技术生成

change_format ( Image : ImagePart : Width, Height : ) 改变Image图像大小,而且ImagePart图像为灰度值图像。

crop_domain ( Image : ImagePart : : ) 从Image图像中裁剪一个矩形区域。这个矩形的周长最小。

crop_domain_rel ( Image : ImagePart : Top, Left, Bottom, Right : ) 删除相关区域,Top为顶端裁剪的行数,Left,Bottom,Right类似。

crop_part ( Image : ImagePart : Row, Column, Width, Height : ) 删除一个矩形图像区域。Row为右上角的列标索引。Width, Height为新图像ImagePart的宽度和高度。

crop_rectangle1 ( Image : ImagePart : Row1, Column1, Row2,Column2 : ) 删除一个矩形图像区域。

tile_channels ( Image : TiledImage : NumColumns, TileOrder : ) 将多通道图像平铺为一幅大的单通道图像。NumColumns为平铺的列数。TileOrder为平铺的方式。

tile_images ( Images : TiledImage : NumColumns, TileOrder : ) 将多通道平铺。

程序:

read_image (Image, 'G:/Halcon/机器视觉/images/brycecanyon1.png')

get_image_pointer1 (Image, Pointer, Type, Width, Height)

change_format (Image, ImagePart, Width/2, Height/2)

crop_domain (Image, ImagePart1)

crop_domain_rel (ImagePart1, ImagePart2, -20, -20, -1, -1)

crop_part (ImagePart2, ImagePart3, 100, 100, Width, Height)

crop_rectangle1 (ImagePart3, ImagePart4, 100, 100, 200, 200)

tile_channels (Image, TiledImage, 2, 'horizontal')

tile_images (Image, TiledImage1, 1, 'vertical')

tile_images_offset (Image, TiledImage2, 0, 0, 50, 50, -1, -1, Width, Height)

处理效果:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值