跟我学机器视觉-HALCON学习例程中文详解-IC引脚测量.doc

跟我学机器视觉-HALCON学习例程中文详解-IC引脚测量.doc

  1. 1、本文档共9页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
跟我学机器视觉-HALCON学习例程中文详解-IC引脚测量

跟我学机器视觉-HALCON学习例程中文详解-IC引脚测量 * 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, ic_pin) *****************取得图像第一通道的指针,同时得到图像宽度高度********* get_image_pointer1 (Image, Pointer, Type, Width, Height) 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) ****************显示图像如下:**************************************** dev_set_draw (margin) dev_set_line_width (3) * * Define and display the rectangular ROIs within which the edges will be detected Row := 55 RowBottom := 955 Column := 200 Phi := rad(-90) Length1 := 50 Length2 := 35 dev_set_color (gray) gen_rectangle2 (Rectangle, Row, Column, Phi, Length1, Length2) gen_rectangle2 (Rectangle, RowBottom, Column, Phi, Length1, Length2) *************************测量位置如绿色矩形所示下:************************** disp_continue_message (WindowHandle, black, true) stop () * * Create a measure object for the ROI at the top of the image. ******获取一阶灰度剖面图的插值方法,测量矩形框与图像坐标系之间有角度时生效****** Interpolation := nearest_neighbor ****************************生成测量矩形框,先测上部**************************** gen_measure_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 dev_set_color (white) ***********************************将测量结果画出***************************** disp_line (WindowHandle, RowEdge, ColumnEdge-Length2, RowEd

文档评论(0)

dajuhyy + 关注
实名认证
内容提供者

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

1亿VIP精品文档

相关文档