zoukankan      html  css  js  c++  java
  • Halcon学习之一:查询图像参数

     

    1、get_grayval ( Image : : Row, Column : Grayval )

       计算Image图像中坐标为(Row,Column)的点的灰度值Grayval。

    2、get_image_pointer1 ( Image : : : Pointer, Type, Width, Height )

       计算Image图像的数据指针Pointer,图像类型Type,图像宽度Width和高度Height。Pointer指向了Image data的起点位置。

    3、get_image_pointer3 ( ImageRGB : : : PointerRed, PointerGreen,

    PointerBlue, Type, Width, Height )

       计算彩色图像ImageRGB的参数。

    4、get_image_pointer1_rect ( Image : : : PixelPointer, Width, Height,

    VerticalPitch, HorizontalBitPitch, BitsPerPixel )

       计算Image图像中定义区域的最小的长方形的区域的指针Pointer,宽度Width,高度Height,VerticalPitch代表Image的Width*(HorizontalBitPitch/8)。两个相邻象素的水平距离(以比特计算)HorizontalBitPitch,每像素的比特数BitsPerPixel。

    5、get_image_time ( Image : : : MSecond, Second, Minute, Hour, Day, YDay, Month, Year )

       获取图像生成的时间。

    程序::

    可以通过上述查看参数深入了解各个函数的具体意义。

    [c-sharp] view plain copy
     
    1. dev_open_window (0, 0, 512, 512, 'black', Handle1)  
    2.   
    3. read_image (Image, 'G:/Halcon/机器视觉/images/autobahn.png')  
    4.   
    5. get_grayval (Image, 12, 66, Grayval)  
    6.   
    7. get_image_pointer1 (Image, Pointer, Type, Width, Height)  
    8.   
    9. draw_region (Region1, Handle1)  
    10.   
    11. reduce_domain (Image, Region1, ImageReduced)  
    12.   
    13. get_image_pointer1_rect (ImageReduced, PixelPointer, Width1, Height1, VerticalPitch, HorizontalBitPitch, BitsPerPixel)  
    14.   
    15. read_image (Image1, 'G:/Halcon/机器视觉/images/claudia.png')  
    16.   
    17. get_image_pointer3 (Image1, PointerRed, PointerGreen, PointerBlue, Type1, Width2, Height2)  
    18.   
    19. get_image_time (Image, MSecond, Second, Minute, Hour, Day, YDay, Month, Year)  

    注意:Image1必须是彩色图像。

  • 相关阅读:
    如何将Sphinx生成的html文档集成进入Django
    npm提速
    Django缓存系统设置
    Django模板与Vue.js冲突问题
    CentOS7下安装配置MariaDB
    Linux下多线程下载利器 axel
    raspbian调整键盘设置
    git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
    彻底弄懂rem,px高度如何在不同的手机屏幕下自动换算
    PHP性能优化利器:生成器 yield理解(百万数据导出引申)
  • 原文地址:https://www.cnblogs.com/qqhfeng/p/7247752.html
Copyright © 2011-2022 走看看