Epson 5 User Manual
Page 104
NumberFound Result
Example
The following SPEL
+
language example runs a vision sequence called mtest which contains a Correlation
object called Corr01. Corr01 has been defined to find multiple features (3).
The following program will run the sequence and make sure that the proper number of features (3) was
found for Corr01 and then print the Score result in descending order.
Function main
#define NUM_TO_FIND 3
Boolean numfound
Integer score
VRun mtest
VGet mtest.Corr01.NumberFound, numfound
If numfound = NUM_TO_FIND Then
Print "The Proper Number of features(3) were found"
Else
Print "Only (", numfound, ") features were found"
Exit Function
EndIf
VGet mtest.Corr01.Score(1), score
Print "1st feature score (Best): ", score
VGet mtest.Corr01.Score(2), score
Print "2nd feature score (Medium): ", score
VGet mtest.Corr01.Score(3), score
Print "3rd feature score (Worst): ", score
Fend
90
Vision Guide 5.0 Reference (Ver.5.3) Rev.1