diva.sketch.features
Class SumOfAnglesFE

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

public class SumOfAnglesFE
extends Object
implements FeatureExtractor

SumOfAnglesFE computes the total angle traversed by a stroke. This is done by calculating the angles formed by every three consecutive points in the path and summing them up. One of Rubine's features.

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

Constructor Summary
SumOfAnglesFE()
           
 
Method Summary
 double apply(TimedStroke s)
          Compute the total angle traversed by the stroke.
 String getName()
          Return the name of this feature extractor.
static double sumOfAngles(TimedStroke s)
          Compute the total angle traversed by the stroke.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SumOfAnglesFE

public SumOfAnglesFE()
Method Detail

apply

public double apply(TimedStroke s)
Compute the total angle traversed by the stroke. This is done by calculating the angles formed by every three consecutive points in the path and summing them up. Return -1 is there are less than 3 points.

Specified by:
apply in interface FeatureExtractor

getName

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

Specified by:
getName in interface FeatureExtractor

sumOfAngles

public static double sumOfAngles(TimedStroke s)
Compute the total angle traversed by the stroke. This is done by calculating the angles formed by every three consecutive points in the path and summing them up. Return -1 is there are less than 3 points.



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