|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.sketch.toolbox.DashedPathRecognizer
public class DashedPathRecognizer
This recognizer recognizes dashed paths from sessions of individual strokes. It first checks to make sure that every stroke in the session is a straight line, then checks to see whether the stroke lengths are equal across strokes and whether endpoints of adjacent strokes are close to equidistant across all the strokes. If this check passes, it makes the segments into a path, and then runs a filter on the path to clean it up. It also saves out the average stroke length and the average distance between strokes.
Field Summary | |
---|---|
static double |
DEFAULT_ANGLE_THRESH
The default tolerance for the maximum angle error over the sum of the edges of the polygon. |
static double |
DEFAULT_DIST_THRESH
The default tolerance for the maximum distance squared between endpoints of lines. |
static double |
DEFAULT_MIN_CONFIDENCE
The default tolerance for the minimum allowable line confidence per stroke. |
Constructor Summary | |
---|---|
DashedPathRecognizer(SceneRecognizer child)
Construct a dashed path recognizer with the given child recognizer and the default threshold values DEFAULT_DIST_THRESH, DEFAULT_ANGLE_THRESH, DEFAULT_MIN_CONFIDENCE. |
|
DashedPathRecognizer(SceneRecognizer child,
double distThresh,
double angleThresh,
double minConf)
Construct a polygon recognizer with the given child recognizer that transitively invokes low-level recognition, as well as threshold tolerances for the maximum distance squared between endpoints, the maximum angle error over the polygon, and the minimum "line" confidence for each stroke in the polygon. |
Method Summary | |
---|---|
SceneDeltaSet |
sessionCompleted(StrokeElement[] session,
Scene db)
Test whether the given strokes make a dashed path. |
SceneDeltaSet |
strokeCompleted(StrokeElement stroke,
Scene db)
|
SceneDeltaSet |
strokeModified(StrokeElement stroke,
Scene db)
|
SceneDeltaSet |
strokeStarted(StrokeElement stroke,
Scene db)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT_DIST_THRESH
public static final double DEFAULT_ANGLE_THRESH
public static final double DEFAULT_MIN_CONFIDENCE
Constructor Detail |
---|
public DashedPathRecognizer(SceneRecognizer child)
DashedPathRecognizer(SceneRecognizer, double, double, double)
public DashedPathRecognizer(SceneRecognizer child, double distThresh, double angleThresh, double minConf)
Method Detail |
---|
public SceneDeltaSet strokeStarted(StrokeElement stroke, Scene db)
strokeStarted
in interface SceneRecognizer
public SceneDeltaSet strokeModified(StrokeElement stroke, Scene db)
strokeModified
in interface SceneRecognizer
public SceneDeltaSet strokeCompleted(StrokeElement stroke, Scene db)
strokeCompleted
in interface SceneRecognizer
public SceneDeltaSet sessionCompleted(StrokeElement[] session, Scene db)
sessionCompleted
in interface SceneRecognizer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |