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 : ) 将多通道平铺。


程序:



[c-sharp]​view plain​​​ ​​copy​


  1. read_image (Image, 'G:/Halcon/机器视觉/images/brycecanyon1.png')
  2. get_image_pointer1 (Image, Pointer, Type, Width, Height)
  3. change_format (Image, ImagePart, Width/2, Height/2)
  4. crop_domain (Image, ImagePart1)
  5. crop_domain_rel (ImagePart1, ImagePart2, -20, -20, -1, -1)
  6. crop_part (ImagePart2, ImagePart3, 100, 100, Width, Height)
  7. crop_rectangle1 (ImagePart3, ImagePart4, 100, 100, 200, 200)
  8. tile_channels (Image, TiledImage, 2, 'horizontal')
  9. tile_images (Image, TiledImage1, 1, 'vertical')
  10. tile_images_offset (Image, TiledImage2, 0, 0, 50, 50, -1, -1, Width, Height)




处理效果:



顶 0 踩 0