|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.sketch.toolbox.StrokeFilter
diva.sketch.toolbox.DehookingStrokeFilter
public class DehookingStrokeFilter
Eliminate the serifs at the ends of a stroke. (W.W.Loy and I.D.Landau, "An On-Line Procedure for Recognition of Handprinted Alphanumeric Characters", IEEE transactions on PAMI, Vol. PAMI-4, No.4, July 1982)
Field Summary | |
---|---|
static double |
DEFAULT_ANGLE_THRESHOLD
|
Fields inherited from class diva.sketch.toolbox.StrokeFilter |
---|
PROPERTY_KEY |
Constructor Summary | |
---|---|
DehookingStrokeFilter()
Create a dehooking stroke filter with the default parameters. |
Method Summary | |
---|---|
TimedStroke |
apply(TimedStroke s)
Apply a filtering algorithm on the specified pen stroke and return the filtered stroke. |
static TimedStroke |
dehook(TimedStroke s)
At the beginning and the end of the given stroke, calculate the general direction vectors by taking the 2/10 of the total length from each end. |
static TimedStroke |
dehook(TimedStroke s,
double angleThresh)
|
static TimedStroke |
dehook2(TimedStroke s)
|
double |
getHookAngleThresh()
Return the threshold angle value for a hook. |
void |
setHookAngleThresh(double val)
Set the threshold angle value for testing for a hook. |
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_ANGLE_THRESHOLD
Constructor Detail |
---|
public DehookingStrokeFilter()
Method Detail |
---|
public TimedStroke apply(TimedStroke s)
StrokeFilter
apply
in class StrokeFilter
public static TimedStroke dehook2(TimedStroke s)
public static TimedStroke dehook(TimedStroke s)
public static TimedStroke dehook(TimedStroke s, double angleThresh)
public void setHookAngleThresh(double val)
public double getHookAngleThresh()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |