|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GestureModel
GestureModel is an interface for classes that attempt to serve as a model structure for gestures. "Gestures" are understood in terms of acceleration data. In particular, GestureModel is based on a 3D-acceleration based approach to reading gestures. GestureModel's must be able to train with data, recognize against gesture instances, as well as record statistics relevant to measuring effectiveness of training/recognition.
| Field Summary | |
|---|---|
static int |
GESTUREHMM
This is the GestureModel type index for GestureHMM models |
static int |
NUM_TYPES_SUPPORTED
This is the number of GestureModel implementations currently supported by GestureModel. |
| Method Summary | |
|---|---|
boolean |
addAccel(int inum,
Accel3D acc)
Adds an additional Accel3D to the end of a gesture instance. |
void |
addInstance(Vector<Accel3D> instance)
Adds an entire gesture instance to the gesture set. |
void |
clearStats()
Clears all saved statistics associated with this GestureModel |
void |
correct()
Signifies a correct recognition event to the GestureModel. |
double |
getAverageRecognitionProbability()
Returns the average certainty currently associated with this GestureModel. |
double |
getDefaultProbability()
Returns a value that represents the default probability associated with this GestureModel. |
BufferedImage |
getIcon()
Returns the icon of this gesture as a BufferedImage. |
String |
getName()
Returns the name associated with this GestureModel. |
int |
getNumCorrect()
Accessor for the number correct statistic. |
int |
getNumIncorrect()
Accessor for the number incorrect statistic. |
int |
getNumNotRecognized()
Accessor for the number not recognized statistic. |
double |
getProbability(Vector<Accel3D> instance)
Computes and returns the probability with which the given gesture instance matches with this GestureModel. |
Vector<Vector<Accel3D>> |
getTrainingSet()
Accessor for the training set of gesture instances associated with this GestureModel |
int |
getType()
Accessor for the GestureModel type index. |
void |
incorrect()
Signifies an incorrect recognition event to the GestureModel. |
void |
matchedWithProbability(double prob)
Signifies a recognition event that occurred with a given probability. |
void |
notRecognized()
Signifies an unrecognized recognition event to the GestureModel. |
boolean |
removeAccel(int inum,
int anum)
Removes an acceleration value from the gesture set. |
boolean |
removeInstance(int inum)
Removes a gesture instance from the gesture set. |
void |
setIcon(byte[] imageBuffer)
Associates a byte array image with the GestureModel |
void |
setName(String n)
Associates a representative name with this GestureModel |
boolean |
train()
Trains the GestureModel, constructing everything necessary for recognition to take place. |
| Field Detail |
|---|
static final int GESTUREHMM
static final int NUM_TYPES_SUPPORTED
| Method Detail |
|---|
boolean addAccel(int inum,
Accel3D acc)
inum - The index of the gesture instance to modifyacc - The Accel3D to insert
void addInstance(Vector<Accel3D> instance)
instance - The instance to insertvoid clearStats()
void correct()
double getAverageRecognitionProbability()
matchedWithProbability(double).
double getDefaultProbability()
BufferedImage getIcon()
null if the gesture
has no icon.String getName()
int getNumCorrect()
correct()
int getNumIncorrect()
incorrect()
int getNumNotRecognized()
notRecognized()
double getProbability(Vector<Accel3D> instance)
instance - the series of acceleration vectors representing a
single gesture instance
int getType()
Vector<Vector<Accel3D>> getTrainingSet()
void incorrect()
void matchedWithProbability(double prob)
getAverageRecognitionProbability()
prob - the probability (0-1) with which the match occurredvoid notRecognized()
boolean removeAccel(int inum,
int anum)
inum - the index of the instance to accessanum - the index of the acceleration to remove
boolean removeInstance(int inum)
inum - the index of the instance to remove
void setIcon(byte[] imageBuffer)
throws IOException
imageBuffer - the byte array image
IOException - thrown if image reading failsvoid setName(String n)
n - the name to associateboolean train()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||