|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.sketch.toolkit.Classifier
This is the interface for a basic recognition toolkit. The Classifier will deal with single stroke input only. There is a Classifier 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 | |
static int |
COMPLEX
Constant for COMPLEX |
static int |
ELLIPSE
Constant for ELLIPSE |
protected ErrorCalculator |
error_calculator
The error calculator |
static int |
LINE
Constant for line |
static int |
POLYGON
Constant for POLYGON |
protected StrokeData |
stroke_data
The stroke data |
| Constructor Summary | |
Classifier()
|
|
| Method Summary | |
abstract int |
classify()
Returns the best fit type for the strokeData |
abstract int[] |
classify(double error_bound)
Returns the set of types that fit the stroke with error value less than the bound specified. |
abstract GeneralPath |
getComplexApproximation()
Returns the best fit Polygon for the StrokeData. |
abstract double |
getComplexError()
Returns the error between the best fit GeneralPath and the strokeData. |
abstract Ellipse |
getEllipseApproximation()
Returns the best fit Polygon for the StrokeData. |
abstract double |
getEllipseError()
Returns the error between the best fit ellipse and the strokeData. |
abstract Line |
getLineApproximation()
Returns the best fit Polygon for the StrokeData. |
abstract double |
getLineError()
Returns the error between the best fit line and the strokeData. |
abstract Polygon |
getPolygonApproximation()
Returns the best fit Polygon for the StrokeData. |
abstract double |
getPolygonError()
Returns the error between the best fit polygon and the strokeData. |
abstract boolean |
isComplex()
Returns true if the best fit for the strokeData is a complex shape. |
abstract boolean |
isComplex(double error_bound)
Returns true if the best fit complex shape has error measure less than error_bound. |
abstract boolean |
isEllipse()
Returns true if the best fit for the strokeData is an Ellipse. |
abstract boolean |
isEllipse(double error_bound)
Returns true if the best fit ellipse for the strokeData is less than error_bound. |
abstract boolean |
isLine()
Returns true if the best fit shape for the strokeData is a Line. |
abstract boolean |
isLine(double error_bound)
Returns true if the best fit line has an error of less than error_bound. |
abstract boolean |
isPolygon()
Returns true if the best fit for strokeData is a polygon. |
abstract 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 static final int POLYGON
public static final int ELLIPSE
public static final int COMPLEX
public static final int LINE
protected StrokeData stroke_data
protected ErrorCalculator error_calculator
| Constructor Detail |
public Classifier()
| Method Detail |
public abstract int classify()
public abstract int[] classify(double error_bound)
public abstract boolean isPolygon()
public abstract boolean isPolygon(double error_bound)
public abstract boolean isEllipse()
public abstract boolean isEllipse(double error_bound)
public abstract boolean isComplex()
public abstract boolean isComplex(double error_bound)
public abstract boolean isLine()
public abstract boolean isLine(double error_bound)
public abstract double getPolygonError()
public abstract double getEllipseError()
public abstract double getComplexError()
public abstract double getLineError()
public abstract Polygon getPolygonApproximation()
public abstract Ellipse getEllipseApproximation()
public abstract GeneralPath getComplexApproximation()
public abstract Line getLineApproximation()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||