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

Скачать
Страница из 119
Chapter 5
Performing Machine Vision Tasks
5-28
ni.com
Use 
imaqFindLCDSegments()
 to calculate the ROI around each digit 
in an LCD or LED. To find the area of each digit, all the segments of the 
indicator must be activated. Use 
imaqReadLCD()
 to read multiple digits of 
an LCD or LED.
Identify Parts Under Inspection
In addition to making measurements after you set regions of inspection, 
you can also identify parts using classification, optical character 
recognition (OCR), and barcode reading.
Classifying Samples
Use classification to identify an unknown object by comparing a set of its 
significant features to a set of features that conceptually represent classes 
of known objects. Typical applications involving classification include the 
following:
Sorting—Sorts objects of varied shapes. For example, sorting different 
mechanical parts on a conveyor belt into different bins.
Inspection—Inspects objects by assigning each object an identification 
score and then rejecting objects that do not closely match members of 
the training set.
Before you classify objects, you must train the classifier session with 
samples of the objects using the NI Classification Training Interface. 
Go to Start»Programs»National Instruments»Classification Training 
to launch the NI Classification Training Interface.
After you have trained samples of the objects you want to classify, use the 
following functions to classify the objects:
1.
Use 
imaqReadClassifierFile()
 to read in a classifier session that 
you created using the NI Classification Training Interface.
2.
Use 
imaqClassify()
 
to classify the object inside the ROI of the 
image under inspection into one of the classes you created using 
the NI Classification Training Interface.
3.
Use 
imaqDispose()
 
to free the resources that the classifier 
session used.