GestureHMM Class Reference
GestureHMM is a modeling class that represents a gesture. More...
Public Member Functions | |
GestureHMM (String n) | |
Constructs a GestureHMM with a name and default training parameters. | |
GestureHMM (String n, Vector< Vector< Accel3D >> instances) | |
Constructs a GestureHMM with a name and gesture set as well as default training parameters. | |
GestureHMM (String n, GestureHMMParameters gParams) | |
Constructs a GestureHMM with a name and training parameters. | |
GestureHMM (String n, GestureHMMParameters gParams, Vector< Vector< Accel3D >> instances) | |
Constructs a GestureHMM with a name, training parameters, as well as a gesture set. | |
GestureHMM (String n, GestureHMMParameters gParams, KmeansParameters kParams) | |
Constructs a GestureHMM with a name, training parameters, and quantizer parameters (Kmeans in particular). | |
GestureHMM (String n, GestureHMMParameters gParams, KmeansParameters kParams, Vector< Vector< Accel3D >> instances) | |
Constructs a GestureHMM with a name, training parameters, quantizer parameters (Kmeans in particular), and a training set. | |
GestureHMM (String n, byte[] iconBuf) throws IOException | |
Constructs a GestureHMM with a name and image. | |
GestureHMM (String n, GestureHMMParameters gParams, byte[] iconBuf) throws IOException | |
Constructs a GestureHMM with a name, training parameters, and an image. | |
GestureHMM (String n, GestureHMMParameters gParams, Vector< Vector< Accel3D >> instances, byte[] iconBuf) throws IOException | |
Constructs a GestureHMM with a name, training parameters, a gesture set, and an image. | |
GestureHMM (String n, GestureHMMParameters gParams, KmeansParameters kParams, byte[] iconBuf) throws IOException | |
Constructs a GestureHMM with a name, training parameters, a gesture set, and an image. | |
GestureHMM (String n, GestureHMMParameters gParams, KmeansParameters kParams, Vector< Vector< Accel3D >> instances, byte[] iconBuf) throws IOException | |
Constructs a GestureHMM with a name, training parameters, a gesture set, and an image. | |
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 | getDefaultProbability () |
For GestureHMM, default probability is obtained by averaging the probabilities with which each instance in the set used to create this model match the model. | |
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. | |
int | getNumStates () |
Returns the number of hidden states in this GestureHMM. | |
double | getProbability (Vector< Accel3D > instance) |
For GestureHMM, probability is computed using the forward algorithm. | |
Vector< Vector< Accel3D > > | getTrainingSet () |
Accessor for the training set of gesture instances associated with this GestureModel. | |
double | getTrainingThreshold () |
Returns the training threshold of this GestureHMM. | |
void | incorrect () |
Signifies an incorrect recognition event to the GestureModel. | |
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 | setName (String n) |
Associates a representative name with this GestureModel. | |
boolean | train () |
Trains the GestureModel, constructing everything necessary for recognition to take place. | |
boolean | train (GestureHMMParameters gParams) |
Trains the GestureHMM with a specified set of training parameters. | |
boolean | train (GestureHMMParameters gParams, KmeansParameters kParams) |
Trains the GestureHMM with a specified set of training parameters as well as a specified set of quantizer parameters. | |
boolean | train (KmeansParameters params) |
Trains the GestureHMM with a specified set of quantizer parameters. | |
void | setIcon (byte[] imageBuffer) throws IOException |
Associates a byte array image with the GestureModel. | |
double | getAverageRecognitionProbability () |
Returns the average certainty currently associated with this GestureModel. | |
void | matchedWithProbability (double prob) |
Signifies a recognition event that occurred with a given probability. | |
int | getType () |
Accessor for the GestureModel type index. | |
Static Public Attributes | |
static final int | GESTUREHMM = 0 |
This is the GestureModel type index for GestureHMM models. | |
static final int | NUM_TYPES_SUPPORTED = 1 |
This is the number of GestureModel implementations currently supported by GestureModel. |
Detailed Description
GestureHMM is a modeling class that represents a gesture.
As a model, it requires data (gesture instances) as well as parameters for training. GestureHMM utilizes a statistical HMM (as its name suggests) model as well as a Baum-Welch training method.
Constructor & Destructor Documentation
GestureHMM | ( | String | n | ) |
Constructs a GestureHMM with a name and default training parameters.
- Parameters:
-
n a name to associate with the GestureHMM
GestureHMM | ( | String | n, | |
Vector< Vector< Accel3D >> | instances | |||
) |
Constructs a GestureHMM with a name and gesture set as well as default training parameters.
- Parameters:
-
n a name to associate with the GestureHMM instances the gesture set for training the GestureHMM
GestureHMM | ( | String | n, | |
GestureHMMParameters | gParams | |||
) |
Constructs a GestureHMM with a name and training parameters.
- Parameters:
-
n a name to associate with the GestureHMM gParams HMM parameters for training
GestureHMM | ( | String | n, | |
GestureHMMParameters | gParams, | |||
Vector< Vector< Accel3D >> | instances | |||
) |
Constructs a GestureHMM with a name, training parameters, as well as a gesture set.
- Parameters:
-
n a name to associate with the GestureHMM gParams HMM parameters for training instances the gesture set for training the GestureHMM
GestureHMM | ( | String | n, | |
GestureHMMParameters | gParams, | |||
KmeansParameters | kParams | |||
) |
Constructs a GestureHMM with a name, training parameters, and quantizer parameters (Kmeans in particular).
- Parameters:
-
n a name to associate with the GestureHMM gParams HMM parameters for training kParams Kmeans parameters for training the quantizer
GestureHMM | ( | String | n, | |
GestureHMMParameters | gParams, | |||
KmeansParameters | kParams, | |||
Vector< Vector< Accel3D >> | instances | |||
) |
Constructs a GestureHMM with a name, training parameters, quantizer parameters (Kmeans in particular), and a training set.
- Parameters:
-
n a name to associate with the GestureHMM gParams HMM parameters for training kParams Kmeans parameters for training the quantizer instances the gesture set for training the GestureHMM
GestureHMM | ( | String | n, | |
byte[] | iconBuf | |||
) | throws IOException |
Constructs a GestureHMM with a name and image.
- Parameters:
-
n a name to associate with the GestureHMM iconBuf the byte array image to associate with the GestureHMM
- Exceptions:
-
IOException thrown if image reading fails
GestureHMM | ( | String | n, | |
GestureHMMParameters | gParams, | |||
byte[] | iconBuf | |||
) | throws IOException |
Constructs a GestureHMM with a name, training parameters, and an image.
- Parameters:
-
n a name to associate with the GestureHMM gParams HMM parameters for training iconBuf the byte array image to associate with the GestureHMM
- Exceptions:
-
IOException thrown if image reading fails
GestureHMM | ( | String | n, | |
GestureHMMParameters | gParams, | |||
Vector< Vector< Accel3D >> | instances, | |||
byte[] | iconBuf | |||
) | throws IOException |
Constructs a GestureHMM with a name, training parameters, a gesture set, and an image.
- Parameters:
-
n a name to associate with the GestureHMM gParams HMM parameters for training instances the gesture set for training the GestureHMM iconBuf the byte array image to associate with the GestureHMM
- Exceptions:
-
IOException thrown if image reading fails
GestureHMM | ( | String | n, | |
GestureHMMParameters | gParams, | |||
KmeansParameters | kParams, | |||
byte[] | iconBuf | |||
) | throws IOException |
Constructs a GestureHMM with a name, training parameters, a gesture set, and an image.
- Parameters:
-
n a name to associate with the GestureHMM gParams HMM parameters for training kParams Kmeans parameters for training the quantizer iconBuf the byte array image to associate with the GestureHMM
- Exceptions:
-
IOException thrown if image reading fails
GestureHMM | ( | String | n, | |
GestureHMMParameters | gParams, | |||
KmeansParameters | kParams, | |||
Vector< Vector< Accel3D >> | instances, | |||
byte[] | iconBuf | |||
) | throws IOException |
Constructs a GestureHMM with a name, training parameters, a gesture set, and an image.
- Parameters:
-
n a name to associate with the GestureHMM gParams HMM parameters for training kParams Kmeans parameters for training the quantizer instances the gesture set for training the GestureHMM iconBuf the byte array image to associate with the GestureHMM
- Exceptions:
-
IOException thrown if image reading fails
Member Function Documentation
boolean addAccel | ( | int | inum, | |
Accel3D | acc | |||
) |
Adds an additional Accel3D to the end of a gesture instance.
- Parameters:
-
inum The index of the gesture instance to modify acc The Accel3D to insert
- Returns:
- a boolean signifying success or failure of the insertion
Implements GestureModel.
void addInstance | ( | Vector< Accel3D > | instance | ) |
Adds an entire gesture instance to the gesture set.
- Parameters:
-
instance The instance to insert
Implements GestureModel.
void clearStats | ( | ) |
Clears all saved statistics associated with this GestureModel.
Implements GestureModel.
void correct | ( | ) |
Signifies a correct recognition event to the GestureModel.
Statistics for the model are updated accordingly.
Implements GestureModel.
double getAverageRecognitionProbability | ( | ) |
Returns the average certainty currently associated with this GestureModel.
The average certainty is calculated based on all calls made to frog.GestureModel#matchedWithProbability(double).
- Returns:
- the average recognition probability (certainty)
Implements GestureModel.
double getDefaultProbability | ( | ) |
For GestureHMM, default probability is obtained by averaging the probabilities with which each instance in the set used to create this model match the model.
In other words, it average the value of getProbability obtained with each gesture instance in the training set.
Implements GestureModel.
BufferedImage getIcon | ( | ) |
Returns the icon of this gesture as a BufferedImage.
- Returns:
- the icon of this gesture; or
null
if the gesture has no icon.
Implements GestureModel.
String getName | ( | ) |
Returns the name associated with this GestureModel.
(e.g. a model for a circle might appropriately be named "Circle")
- Returns:
- the name of the GestureModel.
Implements GestureModel.
int getNumCorrect | ( | ) |
Accessor for the number correct statistic.
This value is entirely dependent on calls to frog.GestureModel#correct()
- Returns:
- the saved number of correct recognition events.
Implements GestureModel.
int getNumIncorrect | ( | ) |
Accessor for the number incorrect statistic.
This value is entirely dependent on calls to frog.GestureModel#incorrect()
- Returns:
- the saved number of incorrect recognition events.
Implements GestureModel.
int getNumNotRecognized | ( | ) |
Accessor for the number not recognized statistic.
This value is entirely dependent on calls to frog.GestureModel#notRecognized()
- Returns:
- the saved number of unrecognized recognition events.
Implements GestureModel.
int getNumStates | ( | ) |
Returns the number of hidden states in this GestureHMM.
- Returns:
- the number of hidden states in this GestureHMM.
double getProbability | ( | Vector< Accel3D > | instance | ) |
For GestureHMM, probability is computed using the forward algorithm.
Implements GestureModel.
Vector<Vector<Accel3D> > getTrainingSet | ( | ) |
Accessor for the training set of gesture instances associated with this GestureModel.
- Returns:
- the model's gesture set
Implements GestureModel.
double getTrainingThreshold | ( | ) |
Returns the training threshold of this GestureHMM.
- Returns:
- the training threshold of this GestureHMM.
int getType | ( | ) |
Accessor for the GestureModel type index.
Should return the value as specified in the GestureModel interface.
- Returns:
- the GestureModel type index.
Implements GestureModel.
void incorrect | ( | ) |
Signifies an incorrect recognition event to the GestureModel.
Statistics for the model are updated accordingly.
Implements GestureModel.
void matchedWithProbability | ( | double | prob | ) |
Signifies a recognition event that occurred with a given probability.
This updates the average recognition probability of the GestureModel, as accessed by frog.GestureModel#getAverageRecognitionProbability()
- Parameters:
-
prob the probability (0-1) with which the match occurred
Implements GestureModel.
void notRecognized | ( | ) |
Signifies an unrecognized recognition event to the GestureModel.
Statistics for the model are updated accordingly.
Implements GestureModel.
boolean removeAccel | ( | int | inum, | |
int | anum | |||
) |
Removes an acceleration value from the gesture set.
- Parameters:
-
inum the index of the instance to access anum the index of the acceleration to remove
- Returns:
- a boolean signifying success or failure of the deletion
Implements GestureModel.
boolean removeInstance | ( | int | inum | ) |
Removes a gesture instance from the gesture set.
- Parameters:
-
inum the index of the instance to remove
- Returns:
- a boolean signifying success or failure of the deletion
Implements GestureModel.
void setIcon | ( | byte[] | imageBuffer | ) | throws IOException |
Associates a byte array image with the GestureModel.
- Parameters:
-
imageBuffer the byte array image
- Exceptions:
-
IOException thrown if image reading fails
Implements GestureModel.
void setName | ( | String | n | ) |
Associates a representative name with this GestureModel.
- Parameters:
-
n the name to associate
Implements GestureModel.
boolean train | ( | KmeansParameters | params | ) |
Trains the GestureHMM with a specified set of quantizer parameters.
The Quantizer for the GestureHMM is set accordingly.
- Parameters:
-
params The K-means parameters.
- Returns:
- A boolean indicating whether training took place or not. Training will not occur if the gesture set is empty.
boolean train | ( | GestureHMMParameters | gParams, | |
KmeansParameters | kParams | |||
) |
Trains the GestureHMM with a specified set of training parameters as well as a specified set of quantizer parameters.
The Quantizer for the GestureHMM is set accordingly and the training parameters associated with the GestureHMM are set to the new values in gParams.
- Parameters:
-
gParams the training parameters kParams the Kmeans parameters
- Returns:
- a boolean indicating whether training took place or not. Training will not occur if the gesture set is empty.
boolean train | ( | GestureHMMParameters | gParams | ) |
Trains the GestureHMM with a specified set of training parameters.
The training parameters associated with the GestureHMM are set to the new values in gParams.
- Parameters:
-
gParams the training parameters
- Returns:
- a boolean indicating whether training took place or not. Training will not occur if the gesture set is empty.
boolean train | ( | ) |
Trains the GestureModel, constructing everything necessary for recognition to take place.
Implements GestureModel.
Member Data Documentation
final int GESTUREHMM = 0 [static, inherited] |
This is the GestureModel type index for GestureHMM models.
final int NUM_TYPES_SUPPORTED = 1 [static, inherited] |
This is the number of GestureModel implementations currently supported by GestureModel.
The documentation for this class was generated from the following file:
- /Users/dev/Documents/SVN brazos.cs.tcu.edu/trunk/FROG/src/frog/GestureHMM.java