public class FeatureTool extends Object
| Constructor and Description |
|---|
FeatureTool() |
| Modifier and Type | Method and Description |
|---|---|
static double |
computeD1(org.sigtec.ink.Note note) |
static double |
computeD2(org.sigtec.ink.Note note) |
static double |
computeD3(org.sigtec.ink.Note note) |
static DoubleVector |
computeFeatureVector(org.sigtec.ink.Note note,
int minDistance,
Feature[] featureList)
Computes the feature vector.
|
static int |
computeMinimalNumberOfRequiredPoints(Feature[] list)
Returns the minimal number of points a note must contain to be processed.
|
static Feature |
createFeature(String classname)
Instantiates a feature of the given full qualified classname.
|
static List<Feature> |
createFeatureList(String featureList)
Creates a list of instantiated features out of a comma delimited list of
full qualified feature classnames.
|
static org.sigtec.ink.Trace |
createTrace(org.sigtec.ink.Note note)
Takes a note and returns a single trace containing all points.
|
static double |
getAngle(org.sigtec.ink.Point p1,
org.sigtec.ink.Point p2)
Computes the angle of the line p1-p2 in the unit circle.
|
static double |
getDeltaT(int i,
org.sigtec.ink.Point[] points)
Returns the difference of the timestamps in point i and i + 1.
|
static double |
getDeltaT(org.sigtec.ink.Point p1,
org.sigtec.ink.Point p2)
Returns the difference of the timestamps in point p1 and p2.
|
static double |
getDeltaX(int i,
org.sigtec.ink.Point[] points)
Returns the distance in respect to the X axis between point i and i+1.
|
static double |
getDeltaY(int i,
org.sigtec.ink.Point[] points)
Returns the distance in respect to the Y axis between point i and i+1.
|
static List<org.sigtec.ink.Trace> |
removeShortTraces(List<org.sigtec.ink.Trace> traces,
int minNumOfPoints)
Removes traces from the list with less than minNumOfPoints.
|
static double |
roh(int i,
org.sigtec.ink.Point[] points)
Computes the angle in respect to the x axis in point i and i-1.
|
public static org.sigtec.ink.Trace createTrace(org.sigtec.ink.Note note)
note - the note whose points have to be extracted.public static double getDeltaX(int i,
org.sigtec.ink.Point[] points)
i - the ith point.points - the array of points.public static double getDeltaY(int i,
org.sigtec.ink.Point[] points)
i - the ith point.points - the array of points.public static double getDeltaT(int i,
org.sigtec.ink.Point[] points)
i - the ith point.points - the array of points.public static double getDeltaT(org.sigtec.ink.Point p1,
org.sigtec.ink.Point p2)
p1 - the point p1.p2 - the point p2.public static double roh(int i,
org.sigtec.ink.Point[] points)
i - the index of the point to be used in the computation.points - the set of points.public static double getAngle(org.sigtec.ink.Point p1,
org.sigtec.ink.Point p2)
p1 - start point of the line.p2 - end point of the line.public static List<org.sigtec.ink.Trace> removeShortTraces(List<org.sigtec.ink.Trace> traces, int minNumOfPoints)
traces - the list of traces.minNumOfPoints - the minimal number of points a trace must contain.public static List<Feature> createFeatureList(String featureList)
featureList - a comma delimited list of full qualified class names.public static Feature createFeature(String classname)
classname - the full qualified class name.public static DoubleVector computeFeatureVector(org.sigtec.ink.Note note, int minDistance, Feature[] featureList) throws FeatureException
note - the note the feature vector has to be computed of.minDistance - the minimal distance between two points.featureList - an array of features.FeatureException - if the feature vector cannot be computed.public static int computeMinimalNumberOfRequiredPoints(Feature[] list)
list - the list of features.public static double computeD1(org.sigtec.ink.Note note)
public static double computeD2(org.sigtec.ink.Note note)
public static double computeD3(org.sigtec.ink.Note note)
Copyright © 2007-2012 Global Information Systems Group, ETH Zurich. All Rights Reserved.