diva.sketch.features
Class MaxSpeedFE

java.lang.Object
  extended by diva.sketch.features.MaxSpeedFE
All Implemented Interfaces:
FeatureExtractor

public class MaxSpeedFE
extends Object
implements FeatureExtractor

MaxSpeedFE computes the maximum speed (squared) along the path of a stroke. This is done by taking every two data points in the path and calculates ((delta X)^2 + (delta Y)^2)/(delta time)^2. At least 2 data points must exist in the path, otherwise 0 is returned. One of Rubine's features.

Version:
$Revision: 1.9 $
Author:
Heloise Hse (hwawen@eecs.berkeley.edu)

Constructor Summary
MaxSpeedFE()
           
 
Method Summary
 double apply(TimedStroke s)
          Return the maximum speed (squared) of the specified stroke.
 String getName()
          Return the name of this feature extractor.
static double maxSpeed(TimedStroke s)
          Return the maximum speed (squared) of the specified stroke.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxSpeedFE

public MaxSpeedFE()
Method Detail

apply

public double apply(TimedStroke s)
Return the maximum speed (squared) of the specified stroke. This is done by taking every two data points in the path and calculates ((delta X)^2 + (delta Y)^2)/(delta time)^2. At least 2 data points must exist in the path, otherwise 0 is returned.

Specified by:
apply in interface FeatureExtractor

getName

public String getName()
Return the name of this feature extractor.

Specified by:
getName in interface FeatureExtractor

maxSpeed

public static double maxSpeed(TimedStroke s)
Return the maximum speed (squared) of the specified stroke. This is done by taking every two data points in the path and calculates ((delta X)^2 + (delta Y)^2)/(delta time)^2. At least 2 data points must exist in the path, otherwise 0 is returned.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.