zoukankan      html  css  js  c++  java
  • Halcon学习之七:改变图像的现实方式和大小

    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
  • 相关阅读:
    Java EE 和 Java Web
    09-盒模型
    08-层叠性权重相同处理
    07-css的继承性和层叠性
    06-伪元素选择器
    05-伪类选择器
    04-属性选择器
    03-高级选择器
    02-css的选择器
    01-css的引入方式
  • 原文地址:https://www.cnblogs.com/qqhfeng/p/7247803.html
Copyright © 2011-2022 走看看