跟我学机器视觉--example精选.docVIP

  1. 1、本文档共13页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
跟我学机器视觉--example精选

HALCON学习例程中文-IC引脚测量C:\ProgramFiles\MVTec\HALCON-10.0\examples\hdevelop\Applications\Measuring-2D\measure_pin.hdev Lead Measurement: Example for the application of the measure object including a lot of visualization operators. First, the length of the leads is measured, then, their width and distance from each other. First, read in the image and initialize the program Read_image (Image, icpin) ****取得图像第一通道的指针,同时得到图像宽度高度** Getimage_pointer1 (Image, Pointer, Type, Width, Height) *get_image_pointer1 ( Image : : : Pointer, Type, Width, Height ) ;获得图像的数据。如:类型(= 字节, ,uint2 int2 等等) 和图像的尺寸( 的宽度和高度)Dev_close_window () dev_close_window ( : : : )? ? 关闭活跃的图形窗口。Dev_open_window_fit_image (Image, 0, 0, 509, 509, WindowHandle) 设置窗口自适应图片,获得句柄 Set_display_font (WindowHandle, 14, mono, true, false) 内部程序,设置字体dev_display (Image) ****显示图像如下:************ Define and display the rectangular ROIs within which the edges will be detected //ROI设置 Dev_set_draw (margin) Dev_se_tline_width (3) Row := 55 RowBottom := 955 Column := 200 Phi := rad(-90) Length1 := 50 Length2 := 35 devsetcolor (gray) gen_rectangle2 (Rectangle, Row, Column, Phi, Length1, Length2) gen_rectangle2 (Rectangle, RowBottom, Column, Phi, Length1, Length2) 创建ROI的矩形显示区域 *******测量位置如绿色矩形所示下:******** Disp_continue_message (WindowHandle, black, true) 显示‘继续’信息 stop () Create a measure object for the ROI at the top of the image. *获取一阶灰度剖面图的插值方法,测量矩形框与图像坐标系之间有角度时生效* Interpolation := nearest_neighbor ********生成测量矩形框,先测上部******** Genmeasure_rectangle2 (Row, Column, Phi, Length1, Length2, Width, Height, Interpolation, MeasureHandle) Determine all edges and calculate the lead height at the top of the image//垂直与矩形的直线边缘的提取。 Sigma := 1.0 Threshold := 30 Transition := all Select := all ***********进行测量********* measure_pos (Image, MeasureHandle, Sigma, Threshold, Transition, Select, RowEdge, ColumnEdge, Amplitude, Distance)LeadLength1 := Distance Display the results devsetcolor (white) **********将测量结果画出******** disp_line (WindowHandle, RowEd

文档评论(0)

tazhiq2 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档