NI Vision Builder for
Automation Inspecntion
入门教程
石鑫华
NI VBAI
视觉生成器基础教程,常用½数应用方法,
实例应用,
机器视觉案例验证。
机器视觉技术支持工
程师、
机器视觉系统集成工程师、
图像处理½件工程
师或想进入机器视觉行业人员必备装备。
石 鑫 华 视 觉 ½
Shixinhua.com
13450001061
QQ:84162741
石鑫华视觉½
http://shixinhua.com
版权声明
尊敬的读者,½您看到本页时,表示您已经获得了《NI
Vision Builder for Automation
Inspection
入门教程》的相关版本(实½版本、电子书等)
。无论½从½渠道获得本书,您
仅拥有阅读权,本教程著½权½石鑫华所有,未经石鑫华同意,您无权将本教程用于出版、
印刷、复印、扫描、½络发布等。为了维护½者的权益,分发给您的复本可½是加密的
PDF
文档,也许无法复制等;其中的图片也有可½包含水印等情况,敬请谅解!
读者利益
亲爱的读者同志,½您通过正规渠道获得《NI
Vision Builder for Automation Inspection
入门教程》的复本时,表示您遵守了相关的法律法规。同时也表示了您对知识产权的承认以
及对原½½用的尊重。
为了提升正版阅读½验,在您购买本书时,可在½者½站
shixinhua.com
论坛中注册相
关
ID,并通知½者,½者将为您提高相应的权限,以查看、下½½论坛有限制的阅读内容。
同时,您将可以获得优先的技术支持。您通过石鑫华视觉½(http://shixinhua.com)可以了
解到,
½者在机器视觉行业还算有较丰富的应用经验,
对于初学者或者是对机器视觉了解不
深的工程师,或者可以提供一些必要的帮助,让您可以少走许多弯路,更快的掌握知识,更
高效的完成您的机器视觉案例。
感谢
首先,感谢您支持½者。您是上帝,您的支持就是½者前进的动力。因此要感谢。
其次,感谢
NI。因为 NI
为我们提供了这么½的视觉应用½件,可以非常快的设计验证
视觉项目,了解机器视觉与图像处理。
第三,感谢
MV。没有 MV,我们大家也不会走进机器视觉这个圈子。因此我们大家½
要感谢
MV。
1
石鑫华视觉½
http://shixinhua.com
目½
第一章
NI Vision Builder for AI
概述
............................................................................................... 5
第二章 配½界面
................................................................................................................... 17
VBAI
配½界面基本组成
................................................................................................ 17
VBAI
菜单
........................................................................................................................ 18
VBAI
主视窗
.................................................................................................................... 25
VBAI
状态栏
.................................................................................................................... 25
VBAI
状态图视窗
............................................................................................................ 26
VBAI
检查步骤
................................................................................................................ 27
第三章 图像采集
................................................................................................................... 34
Acquire Image
采集图像
................................................................................................ 35
Calibration Wizard
标定向导
.................................................................................... 40
Acquire Image(1394,GigE,or USB)采集图像(1394,GigE,或 USB)............. 44
Read/Write Camera Attributes
读写相机属性
............................................................... 47
Acquire Image (IEEE 1394)从 1394
相机中采集图像
.................................................... 50
Simulate Acquisition
仿真采集
....................................................................................... 51
Select Image
选择图像
................................................................................................... 52
第四章 增强图像
................................................................................................................... 55
Vision Assistant
视觉助手
.............................................................................................. 56
Filter Image
图像滤波.....................................................................................................
56
Threshold Image
二值化图像
......................................................................................... 59
Segment Color Image
分割½色图像
............................................................................. 61
Color Classification Training Interface
颜色分类训练接口
............................................ 63
Calibrate Image
标定图像
.............................................................................................. 73
Create Region of Interest
创建目标区域........................................................................
73
第五章 视觉助手
................................................................................................................... 76
Image
图像选项卡
.......................................................................................................... 79
Color
½色选项卡
........................................................................................................... 93
Grayscale
灰度选项卡
.................................................................................................. 101
二值图像选项卡
........................................................................................................... 108
第六章
Locate Features
寻找特征
...................................................................................... 115
Find Edges
寻找边缘点
................................................................................................ 116
Find Straight Edge
寻找直边
......................................................................................... 124
Find Circular Edge
寻找圆
............................................................................................. 128
Match Pattern
匹配模板...............................................................................................
132
Geometric Matching
几½匹配
.................................................................................... 140
Set Coordinate System
建立坐标系
............................................................................. 148
Detect Objects
检查目标
.............................................................................................. 152
Match Color Pattern
匹配½色模板
............................................................................. 158
Adv. Straight Edge
高级直边
......................................................................................... 165
第七章
Measure Features
测量特征
................................................................................... 170
Measure Intensity
测量亮度
........................................................................................ 171
Measure Colors
测量颜色
............................................................................................ 174
2
石鑫华视觉½
http://shixinhua.com
Count Pixels
统计像素
.................................................................................................. 178
Max Caliper
最大值卡尺
.............................................................................................. 181
Caliper
卡尺
.................................................................................................................. 184
Geometry
几½
............................................................................................................. 187
第八章
Check for Presence
存在性检查
............................................................................. 191
Detect Objects
检查目标(粒子分析)
...................................................................... 193
Measure Intensity
测量亮度
........................................................................................ 193
Count Pixels
统计像素
.................................................................................................. 193
Match Colors
匹配颜色
................................................................................................ 193
Find Edges
寻找边缘
.................................................................................................... 198
Inspect Contours
检查½廓
.......................................................................................... 199
Detect Defects
检查缺陷
.............................................................................................. 209
Match Pattern
匹配模板...............................................................................................
217
Geometric Matching
几½匹配
.................................................................................... 217
Match Color Pattern
匹配½色模板
............................................................................. 217
Detect Texture Defects
检查纹理缺陷
......................................................................... 217
第九章
Identify Parts
零件识别
.......................................................................................... 232
Read/Verify Text
读取/验证字符
.................................................................................. 233
Classify Objects
分类目标
............................................................................................ 243
Classify Colors
分类颜色
............................................................................................... 258
Read 1D Barcode
读取一维条码
.................................................................................. 265
Read Data Matrix Code
读取数据矩阵二维条码
......................................................... 269
第十章 通信
Communicate ................................................................................................. 276
Read/Write I/O(NI-IMAQ I/O)
读取、写入脉冲(NI-IMAQ
I/O) ........................ 277
Generate Pulse(NI-IMAQ I/O)
生成脉冲(NI-IMAQ
I/O) ......................................... 278
Read/Write I/O
读取、写入脉冲
................................................................................ 278
Generate Pulse
生成脉冲
............................................................................................ 278
Serial I/O
串口
I/O ....................................................................................................... 278
TCP I/O .......................................................................................................................... 292
Modbus Slave Modbus
从机
......................................................................................... 292
Ethernet/IP
以太½/因特½
........................................................................................ 292
Ethernet/IP Adapter
以太½/因特½适配器
............................................................ 292
第十一章 ½用附加工具
Use Additional Tools .................................................................. 293
设½检查状态
Set Inspection status ............................................................................ 294
计算
Calculator ............................................................................................................. 294
逻辑计算
Logic Calculator ............................................................................................ 304
设½变量
Set Variable .................................................................................................. 318
索引测量
Index Measurements.................................................................................... 326
运行
LabVIEW
½数
Run LabVIEW VI ........................................................................... 329
自定义覆盖
Custom Overlay ........................................................................................ 337
显示图像
Display Image ............................................................................................... 349
延时
Delay..................................................................................................................... 352
数据记½
Data Logging ................................................................................................. 354
图像记½
Image Logging .............................................................................................. 359
3
石鑫华视觉½
http://shixinhua.com
读取/写入变量从/到
INI
文件
Read/Write Variables to INI File .................................. 363
用户输入
User Input..................................................................................................... 365
更新检查界面
Update Inspection UI............................................................................ 367
选择检查
Select Inspection .......................................................................................... 376
第十二章 综合应用
............................................................................................................. 386
文件
File ........................................................................................................................ 386
编辑
Edit ....................................................................................................................... 392
查看
View...................................................................................................................... 393
操½
Operate ................................................................................................................ 394
工具
Tools ..................................................................................................................... 399
帮助
Help ...................................................................................................................... 404
Vision Builder AI
检查界面菜单
................................................................................... 406
Vision Builder AI
其它注意事项
................................................................................... 407
更多
VBAI
实际应用
..................................................................................................... 410
4
评论