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 )
获取图像生成的时间。
程序::
可以通过上述查看参数深入了解各个函数的具体意义。
dev_open_window (0, 0, 512, 512, 'black', Handle1) read_image (Image, 'G:/Halcon/机器视觉/images/autobahn.png') get_grayval (Image, 12, 66, Grayval) get_image_pointer1 (Image, Pointer, Type, Width, Height) draw_region (Region1, Handle1) reduce_domain (Image, Region1, ImageReduced) get_image_pointer1_rect (ImageReduced, PixelPointer, Width1, Height1, VerticalPitch, HorizontalBitPitch, BitsPerPixel) read_image (Image1, 'G:/Halcon/机器视觉/images/claudia.png') get_image_pointer3 (Image1, PointerRed, PointerGreen, PointerBlue, Type1, Width2, Height2) get_image_time (Image, MSecond, Second, Minute, Hour, Day, YDay, Month, Year)
注意:Image1必须是彩色图像。