| About the Authors |
|
IX | |
| Preface |
|
XI | |
| 1 Basics of Machine Vision |
|
1 | (16) |
|
|
|
1 | (4) |
|
|
|
1 | (1) |
|
|
|
2 | (1) |
|
|
|
3 | (2) |
|
1.2 Components of Imaging System |
|
|
5 | (12) |
|
|
|
6 | (4) |
|
1.2.2 Camera Bus: The Method to Connect PC and Camera |
|
|
10 | (3) |
|
|
|
13 | (2) |
|
|
|
15 | (2) |
| 2 Image Acquisition with LabVIEW |
|
17 | (16) |
|
2.1 Acquiring Images with MAX |
|
|
17 | (2) |
|
2.2 Acquiring Images Using LabVIEW |
|
|
19 | (14) |
|
|
|
19 | (2) |
|
2.2.2 Image Management Functions |
|
|
21 | (2) |
|
2.2.3 Block Diagram for Image Acquisition |
|
|
23 | (1) |
|
2.2.4 Image Acquisition from Example |
|
|
23 | (3) |
|
2.2.5 Vision Acquisition Express |
|
|
26 | (7) |
| 3 Particle Analysis |
|
33 | (42) |
|
3.1 Particle Analysis Using Vision Assistant |
|
|
34 | (13) |
|
3.1.1 Image Acquisition Using Vision Assistant |
|
|
35 | (2) |
|
3.1.2 Image Processing Functions |
|
|
37 | (1) |
|
3.1.3 Setting a ROI (Region of Interest) |
|
|
38 | (2) |
|
3.1.4 Binary Image Conversion |
|
|
40 | (3) |
|
|
|
43 | (1) |
|
|
|
44 | (3) |
|
3.2 LabVIEW Code Creation Using Vision Assistant |
|
|
47 | (8) |
|
3.2.1 Block Diagram of Created LabVIEW Code |
|
|
50 | (4) |
|
3.2.2 Image Type Modification |
|
|
54 | (1) |
|
3.3 LabVIEW Code Modification |
|
|
55 | (12) |
|
3.3.1 Sub VI for Particle Analysis |
|
|
55 | (12) |
|
3.4 Particle Analysis Using Vision Express |
|
|
67 | (4) |
|
3.4.1 Vision Acquisition Express |
|
|
67 | (1) |
|
3.4.2 Vision Assistant Express |
|
|
68 | (3) |
|
3.5 Conversion of Pixels to Real-World Units |
|
|
71 | (4) |
| 4 Edge Detection |
|
75 | (14) |
|
4.1 Edge Detection via Vision Assistant |
|
|
75 | (3) |
|
4.2 LabVIEW Code for Edge Detection |
|
|
78 | (3) |
|
4.3 VI for Real-Time-Based Edge Detection |
|
|
81 | (4) |
|
4.4 The Use of Vision Assistant Express for Real-Time Edge Detection |
|
|
85 | (4) |
| 5 Pattern Matching |
|
89 | (16) |
|
5.1 Pattern Matching Using Vision Assistant |
|
|
90 | (6) |
|
5.2 LabVIEW Code Creation and Modification |
|
|
96 | (3) |
|
5.3 Main VI for Pattern Matching |
|
|
99 | (2) |
|
5.4 Vision Assistant Express |
|
|
101 | (4) |
| 6 Color Pattern Matching |
|
105 | (12) |
|
6.1 Color Pattern Matching Using Vision Assistant Express |
|
|
105 | (12) |
|
6.1.1 Vision Acquisition Express |
|
|
107 | (1) |
|
6.1.2 Vision Assistant Express |
|
|
108 | (4) |
|
|
|
112 | (5) |
| 7 Dimension Measurement |
|
117 | (18) |
|
7.1 Dimension Measurement Using Vision Assistant Express |
|
|
117 | (9) |
|
7.1.1 Find Circular Edge Function |
|
|
119 | (1) |
|
|
|
119 | (4) |
|
|
|
123 | (3) |
|
7.2 VI Creation for Dimension Measurement |
|
|
126 | (9) |
|
7.2.1 Vision Assistant Express VI for Dimension Measurement |
|
|
126 | (1) |
|
|
|
127 | (2) |
|
7.2.3 Front Panel of Main VI |
|
|
129 | (1) |
|
7.2.4 Block Diagram of the Main VI |
|
|
130 | (5) |
| 8 Dimension Measurement Using Coordinate System |
|
135 | (14) |
|
8.1 Measurement Based on a Reference Coordinate System Using Vision Assistant Express |
|
|
135 | (10) |
|
|
|
137 | (1) |
|
|
|
138 | (3) |
|
8.1.3 Dimension Measurement Using the Clamp Function |
|
|
141 | (1) |
|
8.1.4 Measurement of Circle Edge |
|
|
142 | (3) |
|
8.2 Conversion of Vision Assistant Express to a Standard VI |
|
|
145 | (4) |
| 9 Geometric Matching |
|
149 | (16) |
|
9.1 Geometric Matching Using Vision Assistant Express |
|
|
150 | (8) |
|
9.1.1 Geometric Matching for Circles |
|
|
151 | (4) |
|
9.1.2 Geometric Matching for Ellipses |
|
|
155 | (3) |
|
9.2 VI Creation for Geometric Matching |
|
|
158 | (1) |
|
|
|
159 | (6) |
| 10 Binary Shape Matching |
|
165 | (12) |
|
10.1 Accessing Previously Saved Images with Vision Acquisition Express |
|
|
166 | (2) |
|
10.2 Binary Shape Matching Using Vision Assistant |
|
|
168 | (4) |
|
10.2.1 Binary Template Images |
|
|
169 | (1) |
|
10.2.2 Binary Shape Matching |
|
|
170 | (2) |
|
10.3 Overlay VI Creation for Shape Matching |
|
|
172 | (1) |
|
10.4 VI for Binary Shape Matching |
|
|
173 | (4) |
| 11 OCR (Optical Character Recognition) |
|
177 | (14) |
|
11.1 OCR Using Vision Assistant |
|
|
177 | (8) |
|
11.1.1 Character Training Using Vision Assistant |
|
|
177 | (4) |
|
11.1.2 Character Identification Using Vision Assistant |
|
|
181 | (4) |
|
|
|
185 | (6) |
|
11.2.1 VI Creation for OCR Using Vision Assistant |
|
|
185 | (1) |
|
|
|
185 | (2) |
|
|
|
187 | (4) |
| 12 Binary Particle Classification |
|
191 | (18) |
|
12.1 Vision Acquisition Express to Load Image Files |
|
|
192 | (2) |
|
12.2 Vision Assistant Express for Classification |
|
|
194 | (6) |
|
12.2.1 Train for Particle Classification |
|
|
194 | (5) |
|
|
|
199 | (1) |
|
|
|
200 | (4) |
|
12.4 Overlay for Classification |
|
|
204 | (2) |
|
12.5 Main VI for Classification |
|
|
206 | (3) |
| 13 Contour Analysis |
|
209 | (18) |
|
|
|
210 | (9) |
|
13.1.1 Image Acquisition Using a USB Camera |
|
|
210 | (2) |
|
13.1.2 Contour Analysis Using Vision Assistant |
|
|
212 | (3) |
|
13.1.3 Defect Detection Using Curvature |
|
|
215 | (1) |
|
13.1.4 Defect Detection by Comparing Contours |
|
|
216 | (3) |
|
|
|
219 | (1) |
|
13.2 VIs for Contour Analysis |
|
|
219 | (8) |
|
|
|
219 | (3) |
|
13.2.2 Overlay for Defects |
|
|
222 | (3) |
|
13.2.3 Perspective Errors in Images |
|
|
225 | (2) |
| 14 Image Calibration and Correction |
|
227 | (14) |
|
14.1 Method for Creating an Image Correction File |
|
|
227 | (7) |
|
|
|
228 | (1) |
|
14.1.2 New Calibration File |
|
|
228 | (6) |
|
|
|
234 | (7) |
|
14.2.1 Image Correction Using Vision Assistant Express |
|
|
234 | (3) |
|
14.2.2 VI Creation for Image Correction |
|
|
237 | (4) |
| 15 Saving and Reading Images |
|
241 | (8) |
|
|
|
241 | (4) |
|
15.2 Image Read from File |
|
|
245 | (4) |
|
|
|
245 | (1) |
|
15.2.2 Example of Reading Image from Image Files |
|
|
246 | (3) |
| 16 AVI File Write and Read |
|
249 | (6) |
|
16.1 AVI File Creation Using Image Files |
|
|
249 | (2) |
|
16.2 AVI File Creation Based on Real-Time Image Acquisition |
|
|
251 | (1) |
|
16.3 Read Frame from AVI Files |
|
|
252 | (3) |
| 17 Tracking |
|
255 | (8) |
|
17.1 Tracking with the Use of Vision Assistant |
|
|
255 | (4) |
|
17.2 VI Creation for Tracking Objects |
|
|
259 | (4) |
| 18 LabVIEW Machine Vision Applications* |
|
263 | (8) |
|
18.1 Semiconductor Manufacturing |
|
|
263 | (1) |
|
|
|
264 | (2) |
|
18.3 Medical and Bio Applications |
|
|
266 | (2) |
|
|
|
268 | (1) |
|
|
|
269 | (2) |
| 19 Student Projects |
|
271 | (4) |
|
Project 1: Noncontact Motion Measurement and its Analysis |
|
|
271 | (1) |
|
Project 2: Intelligent Surveillance Camera |
|
|
271 | (2) |
|
Project 3: Driving a LEGO NXT Car (LEGO Mindstorm) with Finger Motion |
|
|
273 | (1) |
|
Project 4: Piano Keyboard Using Machine Vision |
|
|
273 | (2) |
| Index |
|
275 | |