Class Overview
Utility functions for gesture processing & analysis, including methods for:
- feature extraction (e.g., samplers and those for calculating bounding
boxes and gesture path lengths);
- geometric transformation (e.g., translation, rotation and scaling);
- gesture similarity comparison (e.g., calculating Euclidean or Cosine
distances between two gestures).
Summary
[Expand]
Inherited Methods |
From class java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Called before the object's memory is reclaimed by the VM.
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Public Methods
public
static
OrientedBoundingBox
computeOrientedBoundingBox
(float[] originalPoints)
Computes an oriented, minimum bounding box of a set of points.
Computes an oriented, minimum bounding box of a set of points.
public
static
float[]
spatialSampling
(Gesture gesture, int bitmapSize, boolean keepAspectRatio)
Samples the gesture spatially by rendering the gesture into a 2D
grayscale bitmap. Scales the gesture to fit the size of the bitmap.
Parameters
gesture
| the gesture to be sampled |
bitmapSize
| the size of the bitmap |
keepAspectRatio
| if the scaling should keep the gesture's
aspect ratio |
Returns
- a bitmapSize x bitmapSize grayscale bitmap that is represented
as a 1D array. The float at index i represents the grayscale
value at pixel [i%bitmapSize, i/bitmapSize]
public
static
float[]
spatialSampling
(Gesture gesture, int bitmapSize)
Samples the gesture spatially by rendering the gesture into a 2D
grayscale bitmap. Scales the gesture to fit the size of the bitmap.
The scaling does not necessarily keep the aspect ratio of the gesture.
Parameters
gesture
| the gesture to be sampled |
bitmapSize
| the size of the bitmap |
Returns
- a bitmapSize x bitmapSize grayscale bitmap that is represented
as a 1D array. The float at index i represents the grayscale
value at pixel [i%bitmapSize, i/bitmapSize]
public
static
float[]
temporalSampling
(GestureStroke stroke, int numPoints)
Samples a stroke temporally into a given number of evenly-distributed
points.
Parameters
stroke
| the gesture stroke to be sampled |
numPoints
| the number of points |
Returns
- the sampled points in the form of [x1, y1, x2, y2, ..., xn, yn]