![]() |
GestureRecognitionToolkit
Version: 1.0 Revision: 04-03-15
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
|
Public Types | |
enum | OperatingSystems { OS_UNKNOWN =0, OS_OSX, OS_LINUX, OS_WINDOWS } |
Public Member Functions | |
Util () | |
~Util () | |
Static Public Member Functions | |
static bool | sleep (const unsigned int &numMilliseconds) |
static double | scale (const double &x, const double &minSource, const double &maxSource, const double &minTarget, const double &maxTarget, const bool constrain=false) |
static std::string | intToString (const int &i) |
static std::string | intToString (const unsigned int &i) |
static std::string | toString (const int &i) |
static std::string | toString (const unsigned int &i) |
static std::string | toString (const long &i) |
static std::string | toString (const unsigned long &i) |
static std::string | toString (const unsigned long long &i) |
static std::string | toString (const bool &b) |
static std::string | toString (const double &v) |
static std::string | toString (const long double &v) |
static std::string | toString (const float &v) |
static int | stringToInt (const std::string &s) |
static double | stringToDouble (const std::string &s) |
static bool | stringToBool (const std::string &s) |
static bool | stringEndsWith (const std::string &str, const std::string &ending) |
static double | limit (const double value, const double minValue, const double maxValue) |
static double | sum (const std::vector< double > &x) |
static double | dotProduct (const std::vector< double > &a, const std::vector< double > &b) |
static double | euclideanDistance (const std::vector< double > &a, const std::vector< double > &b) |
static double | manhattanDistance (const std::vector< double > &a, const std::vector< double > &b) |
static double | cosineDistance (const std::vector< double > &a, const std::vector< double > &b) |
static std::vector< double > | scale (const std::vector< double > &x, const double minSource, const double maxSource, const double minTarget=0, const double maxTarget=1, const bool constrain=false) |
static std::vector< double > | normalize (const std::vector< double > &x) |
static std::vector< double > | limit (const std::vector< double > &x, const double minValue, const double maxValue) |
static double | getMin (const std::vector< double > &x) |
static unsigned int | getMinIndex (const std::vector< double > &x) |
static double | getMax (const std::vector< double > &x) |
static unsigned int | getMaxIndex (const std::vector< double > &x) |
static unsigned int | getMin (const std::vector< unsigned int > &x) |
static unsigned int | getMax (const std::vector< unsigned int > &x) |
static unsigned int | getOS () |
static void | cartToPolar (const double x, const double y, double &r, double &theta) |
static void | polarToCart (const double r, const double theta, double &x, double &y) |
|
static |
|
static |
Computes the cosine distance between the two input vectors. The two input vectors must have the same size. The cosine distance can be used as a similarity measure, the distance ranges from −1 meaning exactly opposite, to 1 meaning exactly the same, with 0 usually indicating independence, and in-between values indicating intermediate similarity or dissimilarity.
const | std::vector<double> &a: the first vector for the cosine distance |
const | std::vector<double> &a: the second vector for the cosine distance |
|
static |
Computes the dot product between the two input vectors. The two input vectors must have the same size.
const | std::vector<double> &a: the first vector for the dot product |
const | std::vector<double> &a: the second vector for the dot product |
|
static |
Computes the euclidean distance between the two input vectors. The two input vectors must have the same size.
const | std::vector<double> &a: the first vector for the euclidean distance |
const | std::vector<double> &a: the second vector for the euclidean distance |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Gets the index of the minimum value in the input vector.
const | std::vector<double> &x: the vector of values you want to find the minimum index value for |
|
static |
Gets the current operating system as a Util::OperatingSystems enum.
|
static |
|
static |
|
static |
Limits the input value so it is between the range of minValue and maxValue. If the input value is below the minValue then the output of the function will be the minValue. If the input value is above the maxValue then the output of the function will be the maxValue. Otherwise, the out of the function will be the input.
const | double value: the input value that should be limited |
const | double minValue: the minimum value that should be limited |
const | double maxValue: the maximum value that should be limited |
|
static |
Limits the input data x so each element is within the range [minValue maxValue]. Returns a new vector with the limited data.
const | std::vector<double> &x: the vector of values you want to limit |
const | minValue: the minimum value |
const | maxValue: the maximum value |
|
static |
Computes the manhattan distance between the two input vectors. The two input vectors must have the same size. The manhattan distance is also known as the L1 norm, taxicab distance, city block distance, or rectilinear distance.
const | std::vector<double> &a: the first vector for the manhattan distance |
const | std::vector<double> &a: the second vector for the manhattan distance |
|
static |
|
static |
|
static |
Performs minmax scaling. The input value (x) will be scaled from the source range to the target range.
double | x: the input value to be scaled |
const | double minSource: the minimum source value (that x originates from) |
const | double maxSource: the maximum source value (that x originates from) |
const | double minTarget: the minimum target value (that x will be scaled to) |
const | double maxTarget: the maximum target value (that x will be scaled to) |
const | bool constrain: if true, then the value will be constrained to the minSource and maxSource |
|
static |
Scales the vector from a source range to the new target range
double | x: the input value to be scaled |
const | double minSource: the minimum source value (that x originates from) |
const | double maxSource: the maximum source value (that x originates from) |
const | double minTarget: the minimum target value (that x will be scaled to) |
const | double maxTarget: the maximum target value (that x will be scaled to) |
const | bool constrain: if true, then the value will be constrained to the minSource and maxSource |
|
static |
A cross platform function to cause a function to sleep for a set number of milliseconds.
const | unsigned int numMilliseconds: the number of milliseconds to sleep for, 1000 milliseconds = 1 second. |
|
static |
Checks if the string (str) ends with a specific ending (such as .csv).
const | std::string &str: the string you want to query |
const | std::string &ending: the ending you want to search for |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |