diva.sketch.features
Class SumOfSquaredAnglesFE

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

public class SumOfSquaredAnglesFE
extends Object
implements FeatureExtractor

SumOfSquaredAnglesFE computes the sum of squared angle values along a stroke path. This is done by calculating the angles formed by every three consecutive points in the path, squaring and summing them up. One of Rubine's features.

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

Constructor Summary
SumOfSquaredAnglesFE()
           
 
Method Summary
 double apply(TimedStroke s)
          Compute the sum of the squared angle values along the stroke path.
 String getName()
          Return the name of this feature extractor.
static double sumOfSquaredAngles(TimedStroke s)
          Compute the sum of the squared angle values along the stroke path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SumOfSquaredAnglesFE

public SumOfSquaredAnglesFE()
Method Detail

apply

public double apply(TimedStroke s)
Compute the sum of the squared angle values along the stroke path. This is done by calculating the angles formed by every three consecutive points in the path, squaring 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

sumOfSquaredAngles

public static double sumOfSquaredAngles(TimedStroke s)
Compute the sum of the squared angle values along the stroke path. This is done by calculating the angles formed by every three consecutive points in the path, squaring and summing them up. Return -1 is there are less than 3 points.



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