© 2006-2007 ETH Zurich

org.ximtec.igesture.util
Class GestureTool

java.lang.Object
  extended by org.ximtec.igesture.util.GestureTool

public class GestureTool
extends Object

Collection of commonly used static methods.

Version:
1.0, Dec 2006
Author:
Ueli Kurmann, igesture@uelikurmann.ch, Beat Signer, signer@inf.ethz.ch

Constructor Summary
GestureTool()
           
 
Method Summary
static GestureSet combine(List<GestureSet> sets)
          Combines a list of gesture set to one gesture set.
static GestureSet combineSampleData(List<GestureSet> sets)
          Combines samples (SampleDescriptor) from different gesture sets.
static TestSet combineTestSet(TestSet[] testSets)
          Combines different test sets.
static BufferedImage createCompositeImage(Constraint constraint, int width, int height)
          Creates an image from the constraint
static TestSet createNoise(GestureSet set)
          Creates a noise test set from the gesture set.
static BufferedImage createNoteImage(org.sigtec.ink.Note n, int width, int height)
          Creates an image from the note.
static BufferedImage createRecordedGesture3DImage(RecordedGesture3D gesture, int width, int height)
          Creates an image from the recordedgesture3d
static TestSet createTestSet(GestureSet set)
          Transforms a gesture set into a test set.
static double getAngle(org.sigtec.ink.Point p1, org.sigtec.ink.Point p2)
          Computes the angle between two points.
static org.sigtec.ink.Note getCharacteristicNote(org.sigtec.ink.Note note, double minAngle, double minDistance)
          Creates a characteristic note.
static org.sigtec.ink.Trace getCharacteristicTrace(org.sigtec.ink.Trace trace, double minAngle, double minDistance)
          Detects characteristic points of a trace.
static void hasSampleEnoughPoints(GestureClass gestureClass, int min)
           
static void hasSampleEnoughPoints(GestureSet set, int min)
           
static double scaleTraceTo(org.sigtec.ink.Trace trace, double maxWidth, double maxHeight)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GestureTool

public GestureTool()
Method Detail

scaleTraceTo

public static double scaleTraceTo(org.sigtec.ink.Trace trace,
                                  double maxWidth,
                                  double maxHeight)

combine

public static GestureSet combine(List<GestureSet> sets)
Combines a list of gesture set to one gesture set.

Parameters:
sets - the list of gesture sets to be combined.
Returns:
the combined gesture set.

getCharacteristicTrace

public static org.sigtec.ink.Trace getCharacteristicTrace(org.sigtec.ink.Trace trace,
                                                          double minAngle,
                                                          double minDistance)
Detects characteristic points of a trace. A point is characteristic if it is involved in a significant change of direction.

Parameters:
trace - the trace to be filtered.
minAngle - the minimal angle between two sequences.
minDistance - the minimal distance between two points.
Returns:
the filtered trace.

getCharacteristicNote

public static org.sigtec.ink.Note getCharacteristicNote(org.sigtec.ink.Note note,
                                                        double minAngle,
                                                        double minDistance)
Creates a characteristic note.

Parameters:
note - the note to be filtered.
minAngle - the minimal angle between two sequences.
minDistance - the minimal distance between two points.
Returns:
the filtered note.

getAngle

public static double getAngle(org.sigtec.ink.Point p1,
                              org.sigtec.ink.Point p2)
Computes the angle between two points.

Parameters:
p1 - the first point.
p2 - the second point.
Returns:
the angle between p1 and p2.

createNoteImage

public static BufferedImage createNoteImage(org.sigtec.ink.Note n,
                                            int width,
                                            int height)
Creates an image from the note.

Parameters:
n - the note for which an image has to be created.
width - the width of the image.
height - the height of the image.
Returns:
the buffered image.

createRecordedGesture3DImage

public static BufferedImage createRecordedGesture3DImage(RecordedGesture3D gesture,
                                                         int width,
                                                         int height)
Creates an image from the recordedgesture3d

Parameters:
gesture - the recordedgesture3d for which an image has to be created.
width - the width of the image.
height - the height of the image.
Returns:
the buffered image.

createCompositeImage

public static BufferedImage createCompositeImage(Constraint constraint,
                                                 int width,
                                                 int height)
Creates an image from the constraint

Parameters:
constraint - the constraint for which an image has to be created.
width - the width of the image.
height - the height of the image.
Returns:
the buffered image

combineSampleData

public static GestureSet combineSampleData(List<GestureSet> sets)
Combines samples (SampleDescriptor) from different gesture sets.

Parameters:
sets - a list of gesture sets.
Returns:
samples from different gesture sets.

createTestSet

public static TestSet createTestSet(GestureSet set)
Transforms a gesture set into a test set.

Parameters:
set - the gesture set to be transformed.
Returns:
the test set.

createNoise

public static TestSet createNoise(GestureSet set)
Creates a noise test set from the gesture set.

Parameters:
set - the gesture set.
Returns:
a noise test set.

combineTestSet

public static TestSet combineTestSet(TestSet[] testSets)
Combines different test sets.

Parameters:
testSets - the test sets to be combined.
Returns:
the combined test sets.

hasSampleEnoughPoints

public static void hasSampleEnoughPoints(GestureSet set,
                                         int min)

hasSampleEnoughPoints

public static void hasSampleEnoughPoints(GestureClass gestureClass,
                                         int min)

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.