Справочник Пользователя для National Instruments IMAQ Vision for LabWindows TM /CVI

Скачать
Страница из 119
© National Instruments Corporation
4-1
4
Performing Particle Analysis
This chapter describes how to perform particle analysis on your images. 
Use particle analysis to find statistical information about particles—such as 
the area, location, and presence of particles. With this information, you can 
perform many machine vision inspection tasks, such as detecting flaws 
on silicon wafers or detecting soldering defects on electronic boards. 
Examples of how particle analysis can help you perform inspection tasks 
include locating structural defects on wood planks or detecting cracks on 
plastic sheets.
Figure 4-1 illustrates the steps involved in performing particle analysis.
Figure 4-1.  Steps to Performing Particle Analysis
Create a Binary Image
Threshold your grayscale or color image to create a binary image. Creating 
a binary image separates the objects that you want to inspect from the 
background. The threshold operation sets the background pixels to 0 in the 
binary image while setting the object pixels to a non-zero value. Object 
pixels have a value of 1 by default, but you can set the object pixels to any 
value you choose.
You can use different techniques to threshold your image. If all the 
objects of interest in your grayscale image fall within a continuous range 
of intensities and you can specify this threshold range manually, use 
imaqThreshold()
 to threshold your image. 
Create a Binary Image
Improve a Binary Image
Make Particle Measurements
in Pixels or Real-World Units