org.wiigee.logic
Class GestureModel

java.lang.Object
  extended by org.wiigee.logic.GestureModel

public class GestureModel
extends java.lang.Object

This Class units a Quantizer-Component and an Model-Component. In this implementation a k-mean-algorithm for quantization and a hidden markov model as instance for the model has been used.


Constructor Summary
GestureModel()
          Creates a Unit (Quantizer&Model).
 
Method Summary
 double getDefaultProbability()
          Returns the model probability for bayes.
 HMM getHMM()
           
 int getNumObservations()
           
 int getNumStates()
           
 Quantizer getQuantizer()
           
 double matches(Gesture gesture)
          Returns the probability that a gesture matches to this gesture model.
 void print()
          For debug purposes or very technical interested people. :)
 void printMap()
          For debug purposes or very technical interested people. :)
 void setDefaultProbability(double prob)
           
 void setHMM(HMM hmm)
           
 void setQuantizer(Quantizer q)
           
 void train(java.util.Vector<Gesture> trainsequence)
          Trains the model to a set of motion-sequences, representing different evaluations of a gesture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GestureModel

public GestureModel()
Creates a Unit (Quantizer&Model).

Parameters:
id - int representation of a gesture "name"/class.
Method Detail

train

public void train(java.util.Vector<Gesture> trainsequence)
Trains the model to a set of motion-sequences, representing different evaluations of a gesture

Parameters:
trainsequence - a vector of gestures

matches

public double matches(Gesture gesture)
Returns the probability that a gesture matches to this gesture model.

Parameters:
gesture - a gesture to test.
Returns:
probability that the gesture belongs to this gesture model.

printMap

public void printMap()
For debug purposes or very technical interested people. :)


print

public void print()
For debug purposes or very technical interested people. :)


getNumStates

public int getNumStates()

getNumObservations

public int getNumObservations()

getDefaultProbability

public double getDefaultProbability()
Returns the model probability for bayes.

Returns:
the model probability

setDefaultProbability

public void setDefaultProbability(double prob)

getQuantizer

public Quantizer getQuantizer()

setQuantizer

public void setQuantizer(Quantizer q)

getHMM

public HMM getHMM()

setHMM

public void setHMM(HMM hmm)