|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.sketch.toolkit.StrokeData
This class stores all the data from a single stroke. Time array has the same length as points.
| Field Summary | |
boolean |
a_is_valid
|
double[] |
acceleration
Time derivative of speed |
double[] |
accumulated_length
The accumulated length of the curve upto ith vertex. |
boolean |
accumulated_length_is_valid
|
Rectangle |
bounding_box
|
Point |
center
|
double[] |
d
Direction array. |
boolean |
d_is_valid
|
double[] |
dd_dt
Derivative of the direction array (d). |
Gaussian[] |
dd_dt_gaussians
|
boolean |
dd_dt_is_valid
|
double[][] |
dd_dt_scale_space
Direction change scale space information. |
boolean |
dd_dt_scale_space_is_valid
|
int |
direction_window_width
Parameters and constants. |
int |
fit_method
|
PolarPoint[] |
polar_points
The vertices mapped to polar coordinates. |
boolean |
polar_points_is_valid
|
Dimension |
radius
|
double[] |
speed
Time derivative of position |
Gaussian[] |
speed_gaussians
The gaussian filters. |
double[][] |
speed_scale_space
Speed scale space information. |
boolean |
speed_scale_space_is_valid
|
double |
test_line_scale
|
long[] |
time
The absolute time stamps for the vertices. |
boolean |
v_is_valid
|
Vertex[] |
vertices
The vertices in this data set. |
| Constructor Summary | |
StrokeData(Point[] points)
The constructor. |
|
StrokeData(Vertex[] vertices)
The constructor. |
|
| Method Summary | |
double |
averageAbsoluteFinG(double[] f,
double[] g)
Average |
double |
averageAbsoluteFinG(double[] f,
long[] g)
Average |
double |
averageFinG(double[] f,
double[] g)
Average |
double |
averageFinG(double[] f,
long[] g)
Average |
double |
averageSpeed()
Average speed |
void |
convolveChangeInDirection(double[] filter)
Do convolution. |
void |
convolveDirection(double[] filter)
Do convolution. |
void |
derive_accumulated_length()
Compute the derive accumulated length. |
void |
derive_d(int method)
Derive direction, and fill in the d array. |
void |
derive_dd_dt_scale_space()
Compute the scale space data. |
void |
derive_dd_dt()
Find time derivative of direction, and fill in the dd_dt array. |
void |
derive_speed_scale_space()
Compute the scale space data. |
void |
deriveAcceleration()
Derive acceleration, and fill in the acceleration array. |
void |
deriveBoundingBox()
Derive the bounding box for the vertices. |
double[] |
deriveDirectionUsingRotationalSWODR(Point[] input,
int window_span)
Derive direction, and return it. |
double[] |
deriveDirectionViaSWODR(Point[] input,
int twice_window_size)
Derive direction, and fill in the d array. |
void |
derivePolarCoordinates()
Derive the polar coordinates of the vertices with respect to the center. |
void |
deriveProperties()
Derive speed, and fill in the speed array. |
void |
deriveScaleSpaces()
Derive speed, and fill in the speed array. |
void |
deriveSpeed()
Derive speed, and fill in the speed array. |
double[] |
differantiateDirection(double[] direction)
Differantiate the direction array using the current timing data. |
int[] |
filterCollinearVertices(int[] indices)
filterCollinearVertices. |
int[] |
filterVerticesByLSQE(int[] indices,
double tolerance)
filterCollinearVertices. |
Polygon |
getDataPoints()
Put the valid points in the points array in a Polygon and return it. |
Vertex[] |
getDirectionFit(double dd_dt_scale)
Find the corners of the polygon using the change in the direction. |
Ellipse |
getEllipse()
Return the ellipse fully containing the data points. |
long |
getEndTime()
|
Vertex[] |
getSpeedFit(double average_scale)
See if the input is a polygon. |
long |
getStartTime()
|
Vertex[] |
getVertices()
Return the vertices array. |
void |
invalidateCaches()
Invalidates caches |
double |
leastSquaresForCircle()
calculate the lsq error. |
double |
leastSquaresForCircle2()
calculate the lsq error. |
void |
paint(Graphics g)
Paint |
Vertex[] |
removeRedundantEndPoints(Vertex[] input_points)
Remove the redundant at the beginning and the end. |
void |
setFitMethod(int method)
Set fit method |
boolean |
testLine(double test_line_scale)
See if the input is a line. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public Vertex[] vertices
public long[] time
public transient double[] speed
public transient double[] acceleration
public transient double[] d
public transient double[] dd_dt
public transient double[] accumulated_length
public transient double[][] speed_scale_space
public transient double[][] dd_dt_scale_space
public transient Gaussian[] speed_gaussians
public transient Gaussian[] dd_dt_gaussians
public PolarPoint[] polar_points
public int direction_window_width
public int fit_method
public double test_line_scale
public Point center
public Rectangle bounding_box
public Dimension radius
public boolean v_is_valid
public boolean a_is_valid
public boolean d_is_valid
public boolean dd_dt_is_valid
public boolean polar_points_is_valid
public boolean accumulated_length_is_valid
public boolean dd_dt_scale_space_is_valid
public boolean speed_scale_space_is_valid
| Constructor Detail |
public StrokeData(Vertex[] vertices)
public StrokeData(Point[] points)
| Method Detail |
public void deriveProperties()
public void deriveScaleSpaces()
public void invalidateCaches()
public Vertex[] getVertices()
public void derivePolarCoordinates()
public void deriveBoundingBox()
public long getStartTime()
public long getEndTime()
public void deriveSpeed()
public void deriveAcceleration()
public void derive_d(int method)
public void derive_dd_dt()
public void derive_accumulated_length()
public void derive_dd_dt_scale_space()
public void derive_speed_scale_space()
public int[] filterVerticesByLSQE(int[] indices,
double tolerance)
public int[] filterCollinearVertices(int[] indices)
public double[] deriveDirectionUsingRotationalSWODR(Point[] input,
int window_span)
public double[] deriveDirectionViaSWODR(Point[] input,
int twice_window_size)
public double[] differantiateDirection(double[] direction)
public double averageSpeed()
public double averageFinG(double[] f,
double[] g)
public double averageAbsoluteFinG(double[] f,
double[] g)
public double averageFinG(double[] f,
long[] g)
public double averageAbsoluteFinG(double[] f,
long[] g)
public Polygon getDataPoints()
public Vertex[] getSpeedFit(double average_scale)
public Vertex[] getDirectionFit(double dd_dt_scale)
public boolean testLine(double test_line_scale)
public Ellipse getEllipse()
public double leastSquaresForCircle()
public double leastSquaresForCircle2()
public Vertex[] removeRedundantEndPoints(Vertex[] input_points)
public void setFitMethod(int method)
public void convolveDirection(double[] filter)
public void convolveChangeInDirection(double[] filter)
public void paint(Graphics g)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||