GestureRecognitionToolkit  Version: 0.2.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
FSMParticleFilter Class Reference

#include <FSMParticleFilter.h>

Inheritance diagram for FSMParticleFilter:
ParticleFilter< FSMParticle, VectorFloat >

Public Member Functions

 FSMParticleFilter (const FSMParticleFilter &rhs)
 
virtual bool predict (FSMParticle &p)
 
virtual bool update (FSMParticle &p, VectorDouble &data)
 
bool setLookupTables (Vector< Vector< IndexedDouble > > &pt, Vector< Vector< VectorDouble > > &pe)
 
- Public Member Functions inherited from ParticleFilter< FSMParticle, VectorFloat >
 ParticleFilter ()
 
 ParticleFilter (const ParticleFilter &rhs)
 
virtual ~ParticleFilter ()
 
FSMParticleoperator[] (const unsigned int &i)
 
const FSMParticleoperator[] (const unsigned int &i) const
 
FSMParticleoperator() (const unsigned int &i)
 
const FSMParticleoperator() (const unsigned int &i) const
 
ParticleFilteroperator= (const ParticleFilter &rhs)
 
virtual bool init (const unsigned int numParticles, const Vector< VectorFloat > &initModel, const VectorFloat &processNoise, const VectorFloat &measurementNoise)
 
virtual bool initParticles (const UINT numParticles)
 
virtual bool filter (VectorFloat &data)
 
virtual bool clear ()
 
virtual bool reset ()
 
bool getInitialized () const
 
unsigned int getNumParticles () const
 
unsigned int getStateVectorSize () const
 
unsigned int getNumDeadParticles () const
 
unsigned int getInitMode () const
 
unsigned int getEstimationMode () const
 
Float getEstimationLikelihood () const
 
Float getWeightSum () const
 
VectorFloat getStateEstimation () const
 
Vector< FSMParticlegetParticles ()
 
Vector< FSMParticlegetOldParticles ()
 
VectorFloat setProcessNoise () const
 
bool setProcessNoise (const VectorFloat &processNoise)
 
bool setVerbose (const bool verbose)
 
bool setNormalizeWeights (const bool normWeights)
 
bool setResampleThreshold (const Float resampleThreshold)
 
bool setEstimationMode (const unsigned int estimationMode)
 
bool setInitMode (const unsigned int initMode)
 
bool setInitModel (const Vector< VectorFloat > initModel)
 
bool setMeasurementNoise (const VectorFloat &measurementNoise)
 

Public Attributes

Random random
 
ErrorLog errorLog
 
Vector< Vector< IndexedDouble > > * pt
 
Vector< Vector< VectorDouble > > * pe
 

Additional Inherited Members

- Public Types inherited from ParticleFilter< FSMParticle, VectorFloat >
enum  InitModes
 
enum  EstimationModes
 
- Protected Member Functions inherited from ParticleFilter< FSMParticle, VectorFloat >
virtual bool normalizeWeights ()
 
virtual bool computeEstimate ()
 
virtual bool checkForResample ()
 
virtual bool resample ()
 
virtual bool preFilterUpdate (VectorFloat &data)
 
virtual bool postFilterUpdate (VectorFloat &data)
 
Float gauss (Float x, Float mu, Float sigma)
 
Float rbf (const Float x, const Float mu, Float sigma, Float weight=1.0)
 
Float rbf (const VectorFloat &x, const VectorFloat &mu, Float sigma, Float weight=1.0)
 
Float SQR (const Float x)
 
- Protected Attributes inherited from ParticleFilter< FSMParticle, VectorFloat >
bool initialized
 A flag that indicates if the filter has been initialized.
 
bool verbose
 A flag that indicates if warning and info messages should be printed.
 
bool normWeights
 A flag that indicates if the weights should be normalized at each filter iteration.
 
unsigned int numParticles
 The number of particles in the filter.
 
unsigned int stateVectorSize
 The size of the state Vector (x)
 
unsigned int initMode
 The mode used to initialize the particles, this should be one of the InitModes enums.
 
unsigned int estimationMode
 The estimation mode (used to compute the state estimation)
 
unsigned int numDeadParticles
 
Float minimumWeightThreshold
 Any weight below this value will not be resampled.
 
Float robustMeanWeightDistance
 The distance parameter used in the ROBUST_MEAN estimation mode.
 
Float estimationLikelihood
 The likelihood of the estimated state.
 
Float wNorm
 Stores the total weight norm value.
 
Float wDotProduct
 Stores the dot product of all the weights, used to test for degeneracy.
 
Float resampleThreshold
 The threshold below which the particles will be resampled.
 
VectorFloat x
 The state estimation.
 
Vector< VectorFloatinitModel
 The noise model for the initial starting guess.
 
VectorFloat processNoise
 The noise covariance in the system.
 
VectorFloat measurementNoise
 The noise covariance in the measurement.
 
Vector< FSMParticle > & particles
 A reference to the current active particle Vector.
 
Vector< FSMParticleparticleDistributionA
 A Vector of particles, this will either hold the particles before or after a resample.
 
Vector< FSMParticleparticleDistributionB
 A Vector of particles, this will either hold the particles before or after a resample.
 
VectorFloat cumsum
 The cumulative sum Vector used for resampling the particles.
 
Random rand
 A random number generator.
 
WarningLog warningLog
 
ErrorLog errorLog
 

Detailed Description

GRT MIT License Copyright (c) <2012> <Nicholas Gillian, Media Lab, MIT>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 35 of file FSMParticleFilter.h.

Member Function Documentation

virtual bool FSMParticleFilter::predict ( FSMParticle p)
inlinevirtual

This is the main predict function. This function must be implemented in your derived class.

Parameters
PARTICLE&p: the current particle that should be passed through your prediction code
Returns
returns true if the particle prediction was updated successfully, false otherwise

Reimplemented from ParticleFilter< FSMParticle, VectorFloat >.

Definition at line 52 of file FSMParticleFilter.h.

virtual bool FSMParticleFilter::update ( FSMParticle p,
VectorDouble data 
)
inlinevirtual

This is the main update function in which the weight of the particle should be computed, based on the particles current estimated state and the latest sensor data.

This function must be implemented in your derived class.

Parameters
PARTICLE&p: the current particle
SENSOR_DATA&data: the current sensor data
Returns
returns true if the particle update was updated successfully, false otherwise

Reimplemented from ParticleFilter< FSMParticle, VectorFloat >.

Definition at line 78 of file FSMParticleFilter.h.


The documentation for this class was generated from the following file: