The best way to get the recognition result of a line is calling the rel_textline
function. It gives the most likely result respecting all options, the context, the positions
and others. If you are interested in all other alternatives too, you may find all
information about them in the rel_graph
and rel_result
fields of the RelData
structure.
The reason for different recognition results lies not only in different results for
single characters but also in different possibilities of segmentation of touching characters.
Therefore it is not possible to report all possibilities linearly, they are arranged in
a graph. You find this graph in the field rel_graph
. Each knot is a
RelGraph
structure and denotes a possible cut. It respects up to 4 alternatives,
any alternative is described by an intervall up to the next cut and the recognition
result for the character over this intervall. An intervall i (i=0,1,2,3) is defined
by the next cut next[i]
, where next[i]
is the index of the
corresponding knot or -1, respectively, if the intervall ends with the line. The
recognition result belonging to the knot i is a RelResult
structure, it is a
member of the rel_result
field with the index result_number[i]
.
The left example sideof a pair of touching characters bi will show how the informations
of the graph rel_graph
and the field rel_result
of the
RelData
structure can be interpreted. The recognition should be done with the
HAND.REC using the default options (different classifiers or other parameters may produce
different results, and there may be different segmentations by the feedback of the
recognition). It is recommmended to run the sample program RelWin
under the
debugger, stop it after the call of rel_do
, and look at the structure
rel
as well as their variables.
There have been determined 5 cuts, the starting point included,
so rel_graph_len=5
. The field rel_graph
contains 5 items:
result_number[0]=1 next[0]=1:
rel.rel_result[1].rec_char[0]="b_"
rel.rel_result[1].rec_value[0]=34
result_number[1]=0 next[1]=-1:
rel.rel_result[0].rec_char[0]="k_"
rel.rel_result[0].rec_value[0]=126
result_number[2]=3 next[2]=2:
rel.rel_result[3].rec_char[0]="b_"
rel.rel_result[3].rec_value[0]=25
result_number[3]=5 next[3]=3:
rel.rel_result[5].rec_char[0]="l1"
rel.rel_result[5].rec_value[0]=44
result_number[0]=2 next[0]=-1:
rel.rel_result[4].rec_char[0]="i_"
rel.rel_result[2].rec_value[0]=62
result_number[0]=4 next[0]=-1:
rel.rel_result[4].rec_char[0]="i_"
rel.rel_result[4].rec_value[0]=85
result_number[1]=8 next[1]=4:
rel.rel_result[8].rec_char[0]="uv"
rel.rel_result[8].rec_value[0]=110
result_number[2]=10 next[2]=1:
result_number[2]=10 next[2]=1:
rel.rel_result[10].rec_char[0]="._"
rel.rel_result[10].rec_value[0]=85
result_number[0]=6 next[0]=1:
rel.rel_result[6].rec_char[0]="g1"
rel.rel_result[6].rec_value[0]=145
result_number[1]=7 next[1]=-1:
rel.rel_result[7].rec_char[0]="n/"
rel.rel_result[7].rec_value[0]=122
result_number[2]=11 next[2]=2:
rel.rel_result[11].rec_char[0]="g1"
rel.rel_result[11].rec_value[0]=93
result_number[3]=12 next[3]=4:
rel.rel_result[12].rec_char[0]="g_"
rel.rel_result[12].rec_value[0]=160
result_number[0]=9 next[0]=-1:
rel.rel_result[9].rec_char[0]="i_"
rel.rel_result[9].rec_char[0]="i_"
0->E(0) k
0->1(1)->E(2) bi
0->2(3)->E(4) bi
0->2(3)->4(8)->E(9) bui
0->2(3)->1(10)->E(2) b.i
0->3(5)->E(7) ln
0->3(5)->2(11)->E(4) lgi
0->3(5)->2(11)->4(8)->E(9) lgui
0->3(5)->2(11)->1(10)->E(2) lg.i
0->3(5)->1(6)->E(2) lgi
0->3(5)->4(12)->E(9) lgi