GestureRecognitionToolkit  Version: 0.1.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
ParticleClassifierParticleFilter Class Reference
Inheritance diagram for ParticleClassifierParticleFilter:
ParticleFilter< Particle, VectorFloat >

Public Member Functions

virtual bool preFilterUpdate (VectorFloat &data)
 
virtual bool postFilterUpdate (VectorFloat &data)
 
virtual bool predict (Particle &p)
 
virtual bool update (Particle &p, VectorFloat &data)
 
virtual bool clear ()
 
bool train (const unsigned int numParticles, const TimeSeriesClassificationData &trainingData, Float sensorNoise, Float transitionSigma, Float phaseSigma, Float velocitySigma)
 
- Public Member Functions inherited from ParticleFilter< Particle, VectorFloat >
 ParticleFilter ()
 
 ParticleFilter (const ParticleFilter &rhs)
 
virtual ~ParticleFilter ()
 
Particleoperator[] (const unsigned int &i)
 
const Particleoperator[] (const unsigned int &i) const
 
Particleoperator() (const unsigned int &i)
 
const Particleoperator() (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 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< ParticlegetParticles ()
 
Vector< ParticlegetOldParticles ()
 
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

unsigned int numInputDimensions
 
unsigned int numTemplates
 
unsigned int numClasses
 
unsigned int resampleCounter
 
Vector< ParticleClassifierGestureTemplategestureTemplates
 

Additional Inherited Members

- Public Types inherited from ParticleFilter< Particle, VectorFloat >
enum  InitModes
 
enum  EstimationModes
 
- Protected Member Functions inherited from ParticleFilter< Particle, VectorFloat >
virtual bool normalizeWeights ()
 
virtual bool computeEstimate ()
 
virtual bool checkForResample ()
 
virtual bool resample ()
 
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< Particle, 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< Particle > & particles
 A reference to the current active particle Vector.
 
Vector< ParticleparticleDistributionA
 A Vector of particles, this will either hold the particles before or after a resample.
 
Vector< ParticleparticleDistributionB
 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

Definition at line 46 of file ParticleClassifierParticleFilter.h.

Member Function Documentation

virtual bool ParticleClassifierParticleFilter::clear ( )
inlinevirtual

Clears any previous setup.

Returns
returns true if the filter was cleared successfully, false otherwise

Reimplemented from ParticleFilter< Particle, VectorFloat >.

Definition at line 127 of file ParticleClassifierParticleFilter.h.

virtual bool ParticleClassifierParticleFilter::postFilterUpdate ( VectorFloat data)
inlinevirtual

This function lets you define a custom post filter update if needed.

Parameters
SENSOR_DATA&data: a reference to the sensor data input to the main filter function.
Returns
returns true if the update was completed successfully, false otherwise

Reimplemented from ParticleFilter< Particle, VectorFloat >.

Definition at line 75 of file ParticleClassifierParticleFilter.h.

virtual bool ParticleClassifierParticleFilter::predict ( Particle 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< Particle, VectorFloat >.

Definition at line 80 of file ParticleClassifierParticleFilter.h.

virtual bool ParticleClassifierParticleFilter::preFilterUpdate ( VectorFloat data)
inlinevirtual

This function lets you define a custom pre filter update if needed.

Parameters
SENSOR_DATA&data: a reference to the sensor data input to the main filter function.
Returns
returns true if the update was completed successfully, false otherwise

Reimplemented from ParticleFilter< Particle, VectorFloat >.

Definition at line 58 of file ParticleClassifierParticleFilter.h.

virtual bool ParticleClassifierParticleFilter::update ( Particle p,
VectorFloat 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< Particle, VectorFloat >.

Definition at line 98 of file ParticleClassifierParticleFilter.h.


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