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.
RangeTracker Class Reference

Public Member Functions

 RangeTracker ()
 
 RangeTracker (UINT numDimensions)
 
 RangeTracker (const RangeTracker &rhs)
 
 ~RangeTracker ()
 
RangeTrackeroperator= (const RangeTracker &rhs)
 
void clear ()
 
bool setNumDimensions (UINT numDimensions)
 
bool enableTracking (bool trackData)
 
bool update (VectorFloat sample)
 
bool trackingData ()
 
bool saveRangeDataToFile (std::string filename)
 
bool loadRangeDataFromFile (std::string filename)
 
UINT getNumDimensions ()
 
ULONG getNumSamplesViewed ()
 
Vector< MinMaxgetRanges ()
 

Detailed Description

Definition at line 40 of file RangeTracker.h.

Constructor & Destructor Documentation

GRT_BEGIN_NAMESPACE RangeTracker::RangeTracker ( )

Default Constructor.

Definition at line 25 of file RangeTracker.cpp.

RangeTracker::RangeTracker ( UINT  numDimensions)

Constructor, sets the number of dimensions of the data.

Parameters
UINTnumDimensions: the number of dimensions of the data, should be an unsigned integer greater than 0

Definition at line 31 of file RangeTracker.cpp.

RangeTracker::RangeTracker ( const RangeTracker rhs)

Copy Constructor, copies the RangeTracker from the rhs instance to this instance

Parameters
constRangeTracker &rhs: another instance of the RangeTracker class from which the data will be copied to this instance

Definition at line 36 of file RangeTracker.cpp.

RangeTracker::~RangeTracker ( )

Default Destructor

Definition at line 43 of file RangeTracker.cpp.

Member Function Documentation

void RangeTracker::clear ( )

Clears any previous ranges and counters

Definition at line 45 of file RangeTracker.cpp.

bool RangeTracker::enableTracking ( bool  trackData)
inline

Sets the if the RangeTracker should look at new data when the update function is called.

Parameters
booltrackData: sets if the RangeTracker should look at new data when the update function is called
Returns
true if the trackData variable was set, false otherwise

Definition at line 104 of file RangeTracker.h.

UINT RangeTracker::getNumDimensions ( )
inline

Gets the number of dimensions of the data.

Returns
an unsigned int representing the number of dimensions in the data

Definition at line 143 of file RangeTracker.h.

ULONG RangeTracker::getNumSamplesViewed ( )
inline

Gets the number of samples viewed thus far.

Returns
an unsigned int representing the total number of samples in the classification data

Definition at line 150 of file RangeTracker.h.

Vector< MinMax > RangeTracker::getRanges ( )

Gets the ranges of the data.

Returns
a Vector of minimum and maximum values for each dimension of the data

Definition at line 156 of file RangeTracker.cpp.

bool RangeTracker::loadRangeDataFromFile ( std::string  filename)

Load the range data from a file.

Returns
true if the range data was loaded from a file, false otherwise

Definition at line 102 of file RangeTracker.cpp.

RangeTracker& RangeTracker::operator= ( const RangeTracker rhs)
inline

Sets the equals operator, copies the data from the rhs instance to this instance

Parameters
constRangeTracker &rhs: another instance of the RangeTracker class from which the data will be copied to this instance
Returns
a reference to this instance of the RangeTracker

Definition at line 73 of file RangeTracker.h.

bool RangeTracker::saveRangeDataToFile ( std::string  filename)

Save the range data to a file.

Returns
true if the range data was saved to a file, false otherwise

Definition at line 80 of file RangeTracker.cpp.

bool RangeTracker::setNumDimensions ( UINT  numDimensions)

Sets the number of dimensions in the data. This should be an unsigned integer greater than zero. This will clear any previous ranges and counters.

Parameters
UINTnumDimensions: the number of dimensions of the data. Must be an unsigned integer greater than zero
Returns
true if the number of dimensions was correctly updated, false otherwise

Definition at line 52 of file RangeTracker.cpp.

bool RangeTracker::trackingData ( )
inline

Returns if the range tracker is tracking the values of new samples.

Returns
true if the RangeTracker is tracking the values of new samples, false otherwise

Definition at line 121 of file RangeTracker.h.

bool RangeTracker::update ( VectorFloat  sample)

This is the main RangeTracker function, use this function to track the ranges of new data. The data will only be tracked if the tracking has been enabled (use the enableTracking function to control this). Tracking is enabled by default. The dimensionality of the input sample must match the number of dimensions the range tracker has been set to track.

Returns
true if the RangeTracker was correctly updated, false otherwise

Definition at line 66 of file RangeTracker.cpp.


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