|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.lri.swingstates.gestures.AbstractClassifier
public abstract class AbstractClassifier
The base class for a gesture classifier.
| Constructor Summary | |
|---|---|
AbstractClassifier()
|
|
| Method Summary | |
|---|---|
int |
addClass(java.lang.String className)
Adds a class of gestures to this classifier. |
abstract void |
addExample(java.lang.String className,
Gesture example)
Adds a gesture example to this classifier. |
abstract java.lang.String |
classify(Gesture g)
Recognizes a gesture. |
java.util.ArrayList<java.lang.String> |
getClassesNames()
|
abstract java.util.Vector<Gesture> |
getExamples(java.lang.String className)
Returns the vector of gesture examples for a given class. |
abstract CPolyLine |
getRepresentative(java.lang.String className)
Returns a graphical representation for a given class of gestures. |
java.util.Vector<java.awt.geom.Point2D> |
getTemplate(java.lang.String className)
|
java.util.ArrayList<java.util.Vector<java.awt.geom.Point2D>> |
getTemplates()
|
void |
removeClass(java.lang.String className)
Removes a class of gestures from this classifier. |
abstract void |
removeExample(Gesture gesture)
Removes a gesture example from this classifier. |
void |
renameClass(java.lang.String previousClassName,
java.lang.String newClassName)
Renames a class of gestures. |
void |
reset()
Resets this classifier (i.e. |
void |
save(java.io.File filename)
Saves the definition of this classifier in a file. |
void |
setTemplate(java.lang.String className,
java.util.Vector<java.awt.geom.Point2D> template)
Sets the template gesture for a given existing class of gestures in this classifier. |
abstract java.util.Vector<Score> |
sortedClasses(Gesture g)
Computes a sorted list of classes contained in this recognizer from the best match to the the worst match given a gesture. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractClassifier()
| Method Detail |
|---|
public abstract void removeExample(Gesture gesture)
throws java.lang.UnsupportedOperationException
gesture - the gesture to remove
java.lang.UnsupportedOperationExceptionpublic abstract CPolyLine getRepresentative(java.lang.String className)
className - the name of the gesture class.
className.public int addClass(java.lang.String className)
className - The name of the class of gestures to add.
public abstract void addExample(java.lang.String className,
Gesture example)
throws java.lang.UnsupportedOperationException
className - the gesture example's classexample - the gesture example
java.lang.UnsupportedOperationException
public abstract java.util.Vector<Gesture> getExamples(java.lang.String className)
throws java.lang.UnsupportedOperationException
className - The name of the class
className.
java.lang.UnsupportedOperationExceptionpublic void removeClass(java.lang.String className)
className - The name of the class of gestures to remove.
public void renameClass(java.lang.String previousClassName,
java.lang.String newClassName)
previousClassName - The current name of this class of gesturesnewClassName - The new name of this class of gesturespublic abstract java.lang.String classify(Gesture g)
g - The gesture to recognize
public abstract java.util.Vector<Score> sortedClasses(Gesture g)
g - The gesture
public void save(java.io.File filename)
filename - The name of the file where to write the definition of the
classifier.public void reset()
public void setTemplate(java.lang.String className,
java.util.Vector<java.awt.geom.Point2D> template)
className - the name of the class of gestures.template - the template for the class className.public java.util.Vector<java.awt.geom.Point2D> getTemplate(java.lang.String className)
className - the name of the class of gestures.
public java.util.ArrayList<java.lang.String> getClassesNames()
public java.util.ArrayList<java.util.Vector<java.awt.geom.Point2D>> getTemplates()
getClassesNames).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||