- 1、本文档共9页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 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
您可能关注的文档
- 越狱、Root与刷机.pptx
- 超超临界水清洗,启动.ppt
- 超声成像仪.ppt
- 超特高压输电线路金具介绍.ppt
- 越南战争(英文).ppt
- 越南行最全攻略.doc
- 趣味听力1及时态语态复习、短文填空练习.doc
- 趣味物理实验的开发.doc
- 越狱演示_ppt.ppt
- 趣味英语讲座.ppt
- 2022年辽宁省沈阳市桃源中学高一语文模拟试卷含解析.docx
- 2023年四川省成都市姚渡中学高一语文联考试题含解析.docx
- 2023年山西省大同市北岳中学高一语文期末试卷含解析.docx
- 2023年天津滨海中学高一语文上学期期末试题含解析.docx
- 2023年安徽省安庆市程岭初级中学高一语文期末试卷含解析.docx
- 2022年湖南省怀化市龙泉岩一贯制中学高一语文模拟试卷含解析.docx
- 2023年安徽省合肥市草庙中学高一语文联考试题含解析.docx
- 2022年湖南省益阳市郭鹿坪镇中学高一语文联考试卷含解析.docx
- 2023年四川省德阳市绵竹职业中学高一语文上学期期末试题含解析.docx
- 2022年福建省三明市洋中中学高一语文上学期期末试卷含解析.docx
文档评论(0)