Home   Index   About
Ultimate Pack


Custom Search
SYG

  1. 0 2.0

A symbol graph, which represents the possible interpretations identified by the recognizer.

typedef struct {

POINT rgpntHotSpots[MAXHOTSPOT];

int cHotSpot;

int nFirstBox;

LONG lRecogVal;

LPSYE lpsye;

int cSye;

LPSYC lpsyc;

int cSyc;

SYV syv;

LONG lRecogVal;

CL cl;

int iSyc;

UINT wStrokeFirst;

UINT wPntFirst;

UINT wStrokeLast;

UINT wPntLast;

BOOL fLastSyc;

} SYG;

Members

rgpntHotSpots[MAXHOTSPOT]

Hot spots of the symbol (if any). MAXHOTSPOT is defined as 8.

cHotSpot

Number of valid hot spots in rgpntHotSpots.

nFirstBox

Row-major index to box of first character in result.

lRecogVal

Reserved.

lpsye

Pointer to array of SYE structures representing nodes of symbol graph.

cSye

Number of SYE structures in array lpsye.

lpsyc

Pointer to corresponding array of SYC symbol ink structures.

cSyc

Number of SYC structures in symbol graph.

Comments

All indexes are zero-based.

If a single entity recognized by the recognizer is mapped to a string of several symbol values, the recognizer creates multiple SYE. This is the case for recognizers that can recognize highly stylized sequences of characterspics/PENAPI00090001.giffor example, "ing"pics/PENAPI00090001.gifin which the individual characters are not necessarily recognized.

The nFirstBox member has no meaning for gestures. A gesture is applied to the location indicated by its hot spot.

The SYG, SYE, and SYC structures define the relationship between raw pen data and recognized results. However, in version 2.0 of the Pen API they are rarely of interest to applications for two reasons. First, API functions return recognition results without forcing the application to deal with the complexities of raw pen data. And second, SYG, SYE, and SYC apply mainly to recognizers.

All nontrivial recognizers should somehow track the pen strokes that form each character in the returned results. To be compatible with version 1.0, a recognizer must use the SYG, SYE, and SYC structures and return a symbol graphpics/PENAPI00090001.gifan SYG structurepics/PENAPI00090001.gifas a member of the RCRESULT structure. Version 2.0 does not mandate how a recognizer should map pen data to symbols. However, these three structures represent a viable method. Recognizer developers writing for version 2.0 may want to use the structures or create variations.

The following information applies to version 1.0 applications and recognizers, and to version 2.0 recognizers that employ symbol graphs to relate strokes to recognized symbols. For further information about SYG, SYE, and SYC, see "Returning Results" in Chapter 8, "Writing a Recognizer."

A symbol graph is a representation of the possible interpretations identified by the recognizer. The RC Manager processes the symbol graph using the dictionary path to identify the best interpretation. This best interpretation is returned in the results message along with the symbol graph.

A symbol value is a 32-bit value that represents a glyph (such as a character or a gesture) recognized by a recognizer. This is sometimes referred to as a symbol. A symbol string is an array of symbols terminated with SYV_NULL.

Each element of the symbol graph, an SYE, contains information about the recognized characterpics/PENAPI00090001.giffor example, bounding rectangle and hot spots. The SYC structure maps SYE structures back to the corresponding raw data. If two or more consecutive SYE structures map to the same SYC, they represent an indivisible unit. For example, the user might teach the system of "th" with the crossbar of the "t" connected to the "h." SYC structures are used primarily for training.

A version 1.0 application generally does not use the symbol graph directly. Instead, it uses the hSyv member of RCRESULT, which contains a symbol string that represents the best interpretation from the symbol graph. SYE and SYC structures work together with the HPENDATA memory block to identify strokes and meanings for ink. The following table lists the basic functions of these structures.

Structure
Description
HPENDATA
Contains raw data information: strokes, pen up, pen down, points, and so on.
SYC
A symbol character map. SYC structures delimit strokes in an HPENDATA. A single shape can be identified
by one or more SYC structures. Each SYC identifies a starting stroke, an ending stroke, a starting point, and an ending point. A flag also indicates whether subsequent SYC structures in the array contain additional strokes for the shape. (This feature is used for delayed strokes, such as the cross stroke of the letter "t.")
SYE
A symbol element. An SYE contains a symbol, which can be a character, a gesture, or a string. The symbol
is denoted by an SYV. The SYE contains an index into an array of SYC structures; this array identifies the
raw data that makes up the symbol. It is possible for several SYEs to use the same SYC structures. The
SYC structures contain indexes into the raw data.
SYV
A symbol value.
SYG
A symbol graph.

A set of SYEs and SYCs, together with an HPENDATA structure, is sufficient to define ink and specify how that ink should be interpreted. The training functions TrainContext and TrainInk use this information in training.


Last news from Greatis Software

Nostalgia .Net     Nostalgia .Net     .Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes.  More »

Recommended software for developers

Ultimate Pack for Delphi and C++ Builder     Ultimate Pack     Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price.  More »

Form Designer .Net     Form Designer .Net     Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro!  More »

Print Suite .Net     Print Suite .Net     Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available  More »

Gradient Controls .Net     Gradient Controls .Net     Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available  More »

iGrid     Greatis iGrid     iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors.  More »


All the contacts and projects

Dmitry Vasiliev (just.dmitry)

Related Links

Software for Visual Studio .NET developers
Software for Delphi and C++ Builder developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET

More Online Helps

Win32 Programmer's Reference
Win32 Multimedia Programmer's Reference
OLE Programmer's Reference
Microsoft Windows Pen API Programmer's Reference
Microsoft Windows Sockets 2 Reference
Microsoft Windows Telephony API (TAPI) Programmer's Reference
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008-2012 Free Tech Secrets ;) greatis just4fun network just4fun