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必须是彩色图像。

posted on 2017-07-27 22:31  qqhfeng16  阅读(680)  评论(0编辑  收藏  举报