资源描述:
《HALCON中文中文注解》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、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 : : : Pointer
2、Red, 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)。
3、两个相邻象素的水平距离(以比特计算)HorizontalBitPitch,每像素的比特数BitsPerPixel。5、get_image_time ( Image : : : MSecond, Second, Minute, Hour, Day, YDay,Month, Year ) 获取图像生成的时间。1.dev_open_window (0, 0, 512, 512, 'black', Handle1) 2. 3.read_image (Image, 'G:/Halcon/机器视觉/images/autobahn.png') 4. 5.get_grayval (
4、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
5、, 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) 摄像头获取图像和相关参数1、close_al
6、l_framegrabbers ( : : : ) 关闭所有图像采集设备。2、close_framegrabber ( : : AcqHandle : ) 关闭Handle为AcqHandle的图像采集设备。3、open_framegrabber ( : : Name, HorizontalResolution,VerticalResolution, ImageWidth, ImageHeight, StartRow, StartColumn,Field, BitsPerChannel, ColorSpace, Generic, ExternalTrigger,Cam
7、eraType, Device, Port, LineIn : AcqHandle ) 打开图像采集设备参数信息: Name:图像采集设备的名称 HorizontalResolution和VerticalResolution:分别指预期的图像采集接口的水平分辨率和垂直分辨率 ImageWidth和ImageHeight:指预期图像的宽度部分和高度部分。 StartRow和StartColumn:指显示预期图像的开始坐标 Field:预期图像是一半的图像或者是完整图像 Bi