|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.lri.swingstates.gestures.AbstractClassifier
fr.lri.swingstates.gestures.dollar1.Dollar1Classifier
public class Dollar1Classifier
A classifier that implements $1 algorithm to classify gestures.
| Constructor Summary | |
|---|---|
Dollar1Classifier()
|
|
| Method Summary | |
|---|---|
int |
addClass(java.lang.String className)
Adds a class of gestures to this classifier. |
void |
addExample(java.lang.String className,
Gesture example)
Adds a gesture example to this classifier. |
java.lang.String |
classify(Gesture g)
Recognizes a gesture. |
double |
getCurrentDistance()
|
java.util.Vector<Gesture> |
getExamples(java.lang.String className)
Returns the vector of gesture examples for a given class. |
double |
getMaximumDistance()
|
int |
getNbPoints()
|
CPolyLine |
getRepresentative(java.lang.String className)
Returns a graphical representation for a given class of gestures. |
double |
getSizeScaleToSquare()
|
static Dollar1Classifier |
newClassifier(java.io.File filename)
Builds a new classifier by loading its definition in a file. |
static Dollar1Classifier |
newClassifier(java.lang.String file)
Builds a new classifier by loading its definition in a file. |
static Dollar1Classifier |
newClassifier(java.net.URL url)
Builds a new classifier by loading its definition in a url. |
void |
removeClass(java.lang.String className)
Removes a class of gestures from this classifier. |
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 |
setMaximumDistance(double maximumDistance)
Sets a minimum score threshold for recognition. |
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 fr.lri.swingstates.gestures.AbstractClassifier |
|---|
getClassesNames, getTemplate, getTemplates, save, setTemplate |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dollar1Classifier()
| Method Detail |
|---|
public java.lang.String classify(Gesture g)
classify in class AbstractClassifierg - The gesture to recognize
public CPolyLine getRepresentative(java.lang.String className)
getRepresentative in class AbstractClassifierclassName - the name of the gesture class.
className.public static Dollar1Classifier newClassifier(java.lang.String file)
file - The name of the file containing the definition of the
classifier.
public static Dollar1Classifier newClassifier(java.io.File filename)
filename - The name of the file containing the definition of the
classifier.
public static Dollar1Classifier newClassifier(java.net.URL url)
url - The url containing the definition of the classifier.
public int addClass(java.lang.String className)
addClass in class AbstractClassifierclassName - The name of the class of gestures to add.
public void removeClass(java.lang.String className)
removeClass in class AbstractClassifierclassName - The name of the class of gestures to remove.public int getNbPoints()
public double getSizeScaleToSquare()
public double getMaximumDistance()
public void setMaximumDistance(double maximumDistance)
classify returns null.
maximumDistance - The minimum score threshold for recognition.public double getCurrentDistance()
public java.util.Vector<Score> sortedClasses(Gesture g)
sortedClasses in class AbstractClassifierg - The gesture
public void removeExample(Gesture gesture)
removeExample in class AbstractClassifiergesture - the gesture to remove
public void addExample(java.lang.String className,
Gesture example)
addExample in class AbstractClassifierclassName - the gesture example's classexample - the gesture example
public void renameClass(java.lang.String previousClassName,
java.lang.String newClassName)
renameClass in class AbstractClassifierpreviousClassName - The current name of this class of gesturesnewClassName - The new name of this class of gesturespublic void reset()
reset in class AbstractClassifier
public java.util.Vector<Gesture> getExamples(java.lang.String className)
throws java.lang.UnsupportedOperationException
getExamples in class AbstractClassifierclassName - The name of the class
className.
java.lang.UnsupportedOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||