|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--edu.mit.sketch.toolkit.Classifier
|
+--edu.mit.sketch.toolkit.SimpleClassifier
This class implements Classifier. The SimpleClassifier will deal with single stroke input only. There is a SimpleClassifier object associated with each stroke. In conjunction with this class is the StrokeData class. The users must creare a StrokeData object and pass it to this class.
| Field Summary | |
double |
dd_dt_average_scale
This is how much we scale the average curvature to get the threshold for curvature fit. |
Vertex[] |
direction_fit
Fit based on curvature |
int |
direction_window_width
This is the number of points to be included for deriving direction. |
Vertex[] |
final_fit
Best hybrid fit |
int |
fit_method
This is the fit method to be used when deriving the direction. |
Vertex[] |
points
Speed original points in the stroke. |
double |
polyline_vs_general_path_bias
Final fit LSQE is scaled by this, and compared against the general path LSQE. |
double |
speed_average_scale
This is how much we scale the average speed to get the threshold for the speed fit. |
Vertex[] |
speed_fit
Speed fit |
double |
test_line_scale
This controls the strictness of line classification. |
| Fields inherited from class edu.mit.sketch.toolkit.Classifier |
COMPLEX, ELLIPSE, error_calculator, LINE, POLYGON, stroke_data |
| Constructor Summary | |
SimpleClassifier(StrokeData stroke_data)
Constructs a Classifier object. |
|
| Method Summary | |
int |
classify()
Returns the best fit type for the strokeData |
int[] |
classify(double error_bound)
Returns the set of types that fit the stroke with error value less than the bound specified, (not necessarily sorted by goodness). |
Approximation[] |
classifyAndRank()
Returns an array of approximations to the input stroke sorted by their goodness. |
GeneralPath |
getComplexApproximation()
Returns the best fit GeneralPath for the StrokeData. |
double |
getComplexError()
Returns the error between the best fit GeneralPath and the strokeData. |
Ellipse |
getEllipseApproximation()
Returns the best fit Ellipse for the StrokeData. |
double |
getEllipseError()
Returns the error between the best fit ellipse and the strokeData. |
Line |
getLineApproximation()
Returns the best fit Line for the StrokeData. |
double |
getLineError()
Returns the error between the best fit line and the strokeData. |
Polygon |
getPolygonApproximation()
Returns the best fit Polygon for the StrokeData. |
double |
getPolygonError()
Returns the error between the best fit polygon and the strokeData. |
boolean |
isComplex()
Returns true if the best fit for the strokeData is a complex shape. |
boolean |
isComplex(double error_bound)
Returns true if the best fit complex shape has error measure less than error_bound. |
boolean |
isEllipse()
Returns true if the best fit for the strokeData is an Ellipse. |
boolean |
isEllipse(double error_bound)
Returns true if the best fit ellipse for the strokeData is less than error_bound. |
boolean |
isLine()
Returns true if the best fit shape for the strokeData is a Line. |
boolean |
isLine(double error_bound)
Returns true if the best fit line has an error of less than error_bound. |
boolean |
isPolygon()
Returns true if the best fit for strokeData is a polygon. |
boolean |
isPolygon(double error_bound)
Returns true if the best fit polygon has an error of less than bound. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int direction_window_width
public int fit_method
public double dd_dt_average_scale
public double speed_average_scale
public double test_line_scale
public double polyline_vs_general_path_bias
public Vertex[] final_fit
public Vertex[] speed_fit
public Vertex[] direction_fit
public Vertex[] points
| Constructor Detail |
public SimpleClassifier(StrokeData stroke_data)
| Method Detail |
public int classify()
classify in class Classifierpublic int[] classify(double error_bound)
classify in class Classifierpublic Approximation[] classifyAndRank()
public boolean isPolygon()
isPolygon in class Classifierpublic boolean isPolygon(double error_bound)
isPolygon in class Classifierpublic boolean isEllipse()
isEllipse in class Classifierpublic boolean isEllipse(double error_bound)
isEllipse in class Classifierpublic boolean isComplex()
isComplex in class Classifierpublic boolean isComplex(double error_bound)
isComplex in class Classifierpublic boolean isLine()
isLine in class Classifierpublic boolean isLine(double error_bound)
isLine in class Classifierpublic double getPolygonError()
getPolygonError in class Classifierpublic double getEllipseError()
getEllipseError in class Classifierpublic double getComplexError()
getComplexError in class Classifierpublic double getLineError()
getLineError in class Classifierpublic Polygon getPolygonApproximation()
getPolygonApproximation in class Classifierpublic Ellipse getEllipseApproximation()
getEllipseApproximation in class Classifierpublic GeneralPath getComplexApproximation()
getComplexApproximation in class Classifierpublic Line getLineApproximation()
getLineApproximation in class Classifier
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||