NumberToFind Property
Example
The following SPEL
+
language example runs a vision sequence called mtest which contains a Correlation
object called Corr01. The NumberToFind value for Corr01 is set using VSet.
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
VSet mtest.Corr01.NumberToFind, NUM_TO_FIND
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
92 Vision Guide 5.0 Reference (Ver.5.3) Rev.1