| |
CRRecognizer
category: Genie-Engine
superclass: Object
subclasses:
The class CRRecognizer is the heart of the genie recognition engine.
Instances of it control the whole process of capturing a new stroke, decomposing it into appropriate vectors and building the according feature (a subclass of CRFeature).
The recognizing process consists of two states:
1) In the first step, the points (in global display coordinates) are just added to the collection called points of the recognizer. The recognizer doesn't do much processing in this first step: It just checks wheter the new points is at least a given distance (in pixel) from the last one. If not, the point is ignored. If echo is enabled, the recognizer shows an cho feedback of the stroke on the screen (Using an array of LineMorphs).
2) In the second step, the recognizer builds the feature according to the stroke. It translates the points from global display coordinates into normalized feature coordinates (using the current display properties), it determines the siginificant points, etc. This step is more time consuming than the first, but compared to the dictionary lookup (the feature comparing algorithms) it's nothing.
NOTE: To optimize speeds on PDA, the recognizer doesn't use floating point operations. This
makes it sometimes a little bit more complicated.
Instance variables:
dictionary <CRDictionary>
The dictionary the recognizer is recognizing for. In fact, The recognizer needs not really
the dictionary but much more the associated parameters.
displayProperties <CRDisplayProperties>
The display properties the recognizer uses to translate from global screen coordinates (pixel)
into normalized feature coordinates.
points <SequenceableCollection>
The captured points in global screen coordinates.
coordinates <CRRecognizerCoordinates>
Informations about the location of the recognized stroke in global screen coordinates.
lastPoint <Point>
The last captured points that was captured. (Needs to be stored seperately because captured
points are only added to points when the distance to the last point is big enough.
startTime <SmallInteger>
Time when the recognizer started.
endTime <SmallInteger>
Time when the recognizer stopped.
directionPoints <SequenceableCollection>
Collection of all the points the recognizer considers as significant (in normalized feature
coordinates)
escapePossible <Boolean>
Is it possible to escape the recognizer by leaving the pen at the startposition for a while?
isEchoEnabled <Boolean>
Shall the recognizer generate a graphical echo of the feature?
echo <Collection>
Collection holding all the LineMorphs representing the echo




|
|