|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.mit.sketch.clocksketch.analysis.DrawingAnalyzer
public class DrawingAnalyzer
This class provides ways to analyze and identify aspects of a PenDrawing. It also organizes PenDrawings by putting Strokes into Symbols
| Nested Class Summary | |
|---|---|
static class |
DrawingAnalyzer.DigitOrder
Enums for the order in which the digits were drawn. |
| Field Summary | |
|---|---|
static java.lang.String |
ARC
|
static java.lang.String |
COMPLEX
|
static java.lang.String |
ELLIPSE
These are all simple symbol types that we classify a stroke(s) as |
static double |
handOutsideRadiusFraction
The fraction that determines how far away from the center of the clockface one end point of the hand must be in terms of the clockface's radius Determined experimentally with patient data to be, approximately, a good value. |
static double |
handWithinRadiusFraction
The fraction that determines how close the center of the clockface one end point of the hand must be in terms of the clockface's radius Determined experimentally with patient data to be, approximately, a good value. |
static int |
k
Global variable related to regression analysis. |
static java.lang.String |
LINE
|
static java.lang.String |
NOTCLASSIFIED
|
static java.lang.String |
POLYGON
|
static java.lang.String |
SPIRAL
|
| Constructor Summary | |
|---|---|
DrawingAnalyzer()
|
|
DrawingAnalyzer(PenDrawing drawingArg)
Constructs a DrawingAnalyzer with a Drawing passed in. |
|
| Method Summary | |
|---|---|
static double |
calculateAdjustedMean(double[] valuesArg,
int fraction)
Produces the equivalent of an interquartile mean, but instead of removing the lower and top fourth of the sorted data, removes 1/fraction from the top and bottom of the data The array passed in is sorted by size within the function. |
static double[] |
calculateLinearRegression(double[][] points)
Calculates the values of linear regression given the set of points. |
static void |
classifyClockfaceDrawing(PenDrawing drawing)
Goes through the strokes in the drawing and attempts to classify all of the strokes into various Clockface symbols. |
static double[] |
endPointsCorrelation(Point startPoint,
Point endPoint,
double lengthOfStroke)
Returns the x, y, and shortest-distance correlation (between 0 and 1) of how close the endpoints are given the length of the stroke. |
static int |
findValuesAbove(double[] valuesArg,
double threshold,
double thresholdmultiplier)
Given the list of values, a threshold, and a multiplier for that threshhold, returns the number of values > (threshhold*threshold multiplier) |
static double |
getDistance(Point firstPoint,
Point secondPoint)
Finds the Euclidian distance between two points. |
static double |
getDistanceWithoutHooklets(Stroke stroke)
|
static double |
getLengthWithoutHooklets(Stroke stroke)
|
static boolean |
isCircle(Stroke stroke)
|
static boolean |
isLine(Stroke stroke)
|
static double |
summedValueDistribution(double[] valuesArg,
double sigma)
Returns the sum of all the Gaussian distribution results of the values. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ELLIPSE
public static final java.lang.String ARC
public static final java.lang.String LINE
public static final java.lang.String POLYGON
public static final java.lang.String COMPLEX
public static final java.lang.String SPIRAL
public static final java.lang.String NOTCLASSIFIED
public static final int k
public static final double handWithinRadiusFraction
public static final double handOutsideRadiusFraction
| Constructor Detail |
|---|
public DrawingAnalyzer()
public DrawingAnalyzer(PenDrawing drawingArg)
drawingArg - | Method Detail |
|---|
public static void classifyClockfaceDrawing(PenDrawing drawing)
drawing -
public static int findValuesAbove(double[] valuesArg,
double threshold,
double thresholdmultiplier)
valuesArg - threshold - thresholdmultiplier -
public static double summedValueDistribution(double[] valuesArg,
double sigma)
valuesArg - sigma -
public static double calculateAdjustedMean(double[] valuesArg,
int fraction)
valuesArg - fraction - public static boolean isLine(Stroke stroke)
public static boolean isCircle(Stroke stroke)
public static double getLengthWithoutHooklets(Stroke stroke)
public static double getDistanceWithoutHooklets(Stroke stroke)
public static double getDistance(Point firstPoint,
Point secondPoint)
firstPoint - secondPoint -
public static double[] endPointsCorrelation(Point startPoint,
Point endPoint,
double lengthOfStroke)
startPoint - endPoint - lengthOfStroke -
public static double[] calculateLinearRegression(double[][] points)
points - [0] = x value, [1] = y value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||