GestureRecognitionToolkit
Version: 0.2.5
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 | getCxx11Enabled () |
static bool | sleep (const unsigned int &numMilliseconds) |
static Float | scale (const Float &x, const Float &minSource, const Float &maxSource, const Float &minTarget, const Float &maxTarget, const bool constrain=false) |
static std::string | timeAsString (const bool includeDate=true) |
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 float &v) |
static std::string | toString (const double &v) |
static std::string | toString (const long double &v) |
static int | stringToInt (const std::string &s) |
static double | stringToDouble (const std::string &s) |
static Float | stringToFloat (const std::string &s) |
static bool | stringToBool (const std::string &s) |
static bool | stringEndsWith (const std::string &str, const std::string &ending) |
static Float | limit (const Float value, const Float minValue, const Float maxValue) |
static Float | sum (const VectorFloat &x) |
static Float | dotProduct (const VectorFloat &a, const VectorFloat &b) |
static Float | euclideanDistance (const VectorFloat &a, const VectorFloat &b) |
static Float | squaredEuclideanDistance (const VectorFloat &a, const VectorFloat &b) |
static Float | manhattanDistance (const VectorFloat &a, const VectorFloat &b) |
static Float | cosineDistance (const VectorFloat &a, const VectorFloat &b) |
static VectorFloat | scale (const VectorFloat &x, const Float minSource, const Float maxSource, const Float minTarget=0, const Float maxTarget=1, const bool constrain=false) |
static VectorFloat | normalize (const VectorFloat &x) |
static VectorFloat | limit (const VectorFloat &x, const Float minValue, const Float maxValue) |
static Float | getMin (const VectorFloat &x) |
static unsigned int | getMinIndex (const VectorFloat &x) |
static Float | getMax (const VectorFloat &x) |
static unsigned int | getMaxIndex (const VectorFloat &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 Float x, const Float y, Float &r, Float &theta) |
static void | polarToCart (const Float r, const Float theta, Float &x, Float &y) |
static bool | parseDirectory (const std::string directoryPath, const std::string type, std::vector< std::string > &filenames) |
Parses a directory and returns a list of filenames in that directory that match the file type. A wildcard (.*) can be used to indicate any file in the directory. Multiple filetypes can be searched for by seperating the file type via |. For example: *.csv|*.grt will return any CSV or GRT files in the directory. More... | |
|
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.
a | the first vector for the cosine distance |
b | 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.
a | the first vector for the dot product |
b | 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.
a | the first vector for the euclidean distance |
b | the second vector for the euclidean distance |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Gets the index of the minimum value in the input vector.
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.
value | the input value that should be limited |
minValue | the minimum value that should be limited |
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.
x | the vector of values you want to limit |
minValue | the minimum value |
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.
a | the first vector for the manhattan distance |
b | the second vector for the manhattan distance |
|
static |
|
static |
Parses a directory and returns a list of filenames in that directory that match the file type. A wildcard (.*) can be used to indicate any file in the directory. Multiple filetypes can be searched for by seperating the file type via |. For example: *.csv|*.grt will return any CSV or GRT files in the directory.
directoryPath | the path of the directory you want to search (can be relative or absolute) |
type | sets the file type that should be searched for (e.g. .csv) |
filenames | will return a list of filenames found in the directory |
|
static |
|
static |
Performs minmax scaling. The input value (x) will be scaled from the source range to the target range.
x | the input value to be scaled |
minSource | the minimum source value (that x originates from) |
maxSource | the maximum source value (that x originates from) |
minTarget | the minimum target value (that x will be scaled to) |
maxTarget | the maximum target value (that x will be scaled to) |
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
x | the input value to be scaled |
minSource | the minimum source value (that x originates from) |
maxSource | the maximum source value (that x originates from) |
minTarget | the minimum target value (that x will be scaled to) |
maxTarget | the maximum target value (that x will be scaled to) |
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 |
Computes the squared euclidean distance between the two input vectors. The two input vectors must have the same size.
a | the first vector for the euclidean distance |
b | the second vector for the euclidean distance |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Gets the current date and time as a string in the format: year_month_day_hour_minute_second_millisecond
includeDate | if true, then the date will be included in the string, otherwise the string will just contain the time |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Converts a double to a string.
v | the value you want to convert to a string |
|
static |