Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

gadget::Gesture Class Reference

Base Gadgeteer Gesture interface class. More...

#include <Gesture.h>

Inheritance diagram for gadget::Gesture:

Inheritance graph
[legend]
List of all members.

Public Methods

 Gesture ()
virtual ~Gesture ()
virtual bool config (jccl::ConfigElementPtr e)
virtual int getGestureIndex (std::string name)=0
 Retuns the id of the named gesture. More...

virtual std::string getGestureString (int id)=0
 Gets the string name of the gesture. More...

virtual int getGesture ()=0
 Gets the current gesture. More...

virtual int createGesture (std::string gestureName)=0
 This creates a new gesture with the given name. More...

virtual void addSample (int gestureId)=0
 Adds a new sample of the given gesture to the training data. More...

virtual void train ()=0
 This actually starts the training on the given data. More...

virtual void clearSamples (int gestureId=-1)=0
 Clears the samples that we have taken so far. More...

virtual void loadTrainedFile (std::string fileName)=0
 Loads trained data for the gesture object. More...

virtual void saveTrainedFile (std::string fileName)=0
 Saves a trained data file for the gesture object. More...

virtual void loadSamplesFile (std::string filename)=0
 Loads the sample training data specified. More...

virtual void saveSamplesFile (std::string filename)=0
 Saves the sample training data specified. More...


Detailed Description

Base Gadgeteer Gesture interface class.

This class is the base interface for all gesture recognition objects.

All gesture objects have two parts to their interfaces. Getting gestures and training new gestures.

In order to retrieve gesture information from the device, the user call the get functions to get the index, or string representation of the current gesture.

Definition at line 57 of file Gesture.h.


Constructor & Destructor Documentation

gadget::Gesture::Gesture   [inline]
 

Definition at line 60 of file Gesture.h.

00061    {}

virtual gadget::Gesture::~Gesture   [inline, virtual]
 

Definition at line 63 of file Gesture.h.

00064    {;}


Member Function Documentation

virtual bool gadget::Gesture::config jccl::ConfigElementPtr    e [inline, virtual]
 

Reimplemented in gadget::SimGloveGesture.

Definition at line 66 of file Gesture.h.

00067    {
00068       boost::ignore_unused_variable_warning(e);
00069       return true;
00070    }

virtual int gadget::Gesture::getGestureIndex std::string    name [pure virtual]
 

Retuns the id of the named gesture.

Returns:
-1 if the gesture name not found.

Implemented in gadget::GloveGesture.

virtual std::string gadget::Gesture::getGestureString int    id [pure virtual]
 

Gets the string name of the gesture.

If id is -1, then it returns the string name of the current gesture.

Implemented in gadget::GloveGesture.

virtual int gadget::Gesture::getGesture   [pure virtual]
 

Gets the current gesture.

Returns:
id of current gesture.

Implemented in gadget::SimGloveGesture.

virtual int gadget::Gesture::createGesture std::string    gestureName [pure virtual]
 

This creates a new gesture with the given name.

Returns the identifier of the new gesture.

Implemented in gadget::GloveGesture.

virtual void gadget::Gesture::addSample int    gestureId [pure virtual]
 

Adds a new sample of the given gesture to the training data.

Implemented in gadget::SimGloveGesture.

virtual void gadget::Gesture::train   [pure virtual]
 

This actually starts the training on the given data.

Implemented in gadget::SimGloveGesture.

virtual void gadget::Gesture::clearSamples int    gestureId = -1 [pure virtual]
 

Clears the samples that we have taken so far.

Parameters:
gestureId  = -1 (default) then we clear all gestures else we clear only the gesture that is specified.

Implemented in gadget::SimGloveGesture.

virtual void gadget::Gesture::loadTrainedFile std::string    fileName [pure virtual]
 

Loads trained data for the gesture object.

Implemented in gadget::SimGloveGesture.

virtual void gadget::Gesture::saveTrainedFile std::string    fileName [pure virtual]
 

Saves a trained data file for the gesture object.

Implemented in gadget::SimGloveGesture.

virtual void gadget::Gesture::loadSamplesFile std::string    filename [pure virtual]
 

Loads the sample training data specified.

This file contains previous samples for the gesture recognizer to train from.

Implemented in gadget::SimGloveGesture.

virtual void gadget::Gesture::saveSamplesFile std::string    filename [pure virtual]
 

Saves the sample training data specified.

This data can be loaded at a later time to do more sample training.

Implemented in gadget::SimGloveGesture.


The documentation for this class was generated from the following file:
Generated on Sun May 2 14:26:58 2004 for Gadgeteer by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002