|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.sketch.recognition.VotingStrokeRecognizer
public class VotingStrokeRecognizer
Voting gesture recognizer is a composite recognizer which allows multiple sub-recognizers to vote and interact with one another to classify a given gesture.
For each gesture, the voting recognizer can produce one or more classifications. The algorithm works as follows:
Field Summary | |
---|---|
static int |
ALL_VOTES
A constant which says that votes are not filtered by the "n-highest" rule. |
Constructor Summary | |
---|---|
VotingStrokeRecognizer(StrokeRecognizer[] children)
Construct a voting recognizer with the following children recognizers. |
Method Summary | |
---|---|
List |
children()
Return the children as a list. |
void |
clearBuffer()
Clear the buffer after every stroke finishes by setting every entry in the buffer to NO_RECOGNITION. |
double |
getMinConfidence()
Return the minimum confidence value which is necessary for a type to get considered in the vote. |
int |
getNHighest()
Return the "n-highest" value, which says that the n-highest classifications will get passed on when the child recognizers vote. |
void |
setMinConfidence(double val)
Set the minimum confidence classifications that will get passed on when the child recognizers vote. |
void |
setNHighest(int n)
Set the "n-highest" value, which says that the n-highest classifications will get passed on when the child recognizers vote. |
RecognitionSet |
strokeCompleted(TimedStroke s)
Pass the event to the child recognizers, tally the vote, clear the buffer, and return the consensus. |
RecognitionSet |
strokeModified(TimedStroke s)
Pass the event to the child recognizers, tally the vote, and return the consensus. |
RecognitionSet |
strokeStarted(TimedStroke s)
Pass the event to the child recognizers, tally the vote, and return the consensus. |
protected RecognitionSet |
vote()
Tally all of the votes of the sub-recognizers and emit them all into a recognition. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int ALL_VOTES
setNHighest(int)
Constructor Detail |
---|
public VotingStrokeRecognizer(StrokeRecognizer[] children)
Method Detail |
---|
public List children()
public void clearBuffer()
public double getMinConfidence()
public int getNHighest()
public void setMinConfidence(double val)
public void setNHighest(int n)
public RecognitionSet strokeCompleted(TimedStroke s)
strokeCompleted
in interface StrokeRecognizer
public RecognitionSet strokeModified(TimedStroke s)
strokeModified
in interface StrokeRecognizer
public RecognitionSet strokeStarted(TimedStroke s)
strokeStarted
in interface StrokeRecognizer
protected RecognitionSet vote()
getNHighest()
,
getMinConfidence()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |