typedef struct RelGraph_tag { short leading_blanks; short filler[3]; short result_number[SEG_ALT]; short next[SEG_ALT]; short seg_value[SEG_ALT][SEG_ALT]; } RelGraph;
leading_blanks
leading_blanks
contains the count of blanks preceding the given recognized character.filler[3]
result_number
rel_result
.next
RelGraph
.seg_value
seg_value [x] [y]
, x
and y
refer to two consecutive
partial images i_x
and i_y
of a given image line. The segmentation between i_x
and i_y
can be considered safe if there is a sufficiently large distance between i_x
and
i_y
. In this case, seg_value seg_value[x][y]
is zero. The segmentation between i_x
and i_y
is considered unsafe if both fields were originally connected and shared by the KADMOS segmentation.
This gives a value of seg_value [x] [y]
not equal to zero. The segmentation between i_x
and
i_y
is considered even more uncertain if both fields have the same line thickness, were originally connected,
and their combination is the width of a normal character. There are more such cases leading to respective values of
seg_value[x][y]
.To get the results of a text line, the arrays RelGraph
and RelResult
must always
be considered as a unity. RelGraph
describes the line structure and refers to the related results in
RelResult
. The items leading_blanks
, seg_value
, result_number
, and
next
make up the description of one knot of the graph which describes the line structure. seg_value
contains a confidence value, indicating the reliability of the segmentation at this location. Which character begins at
this segmentation point depends on the subsequent segmentation point. Up to SEG_ALT
alternatives are possible.
result_number
contains the index of that element of the array rel_result
which contains the
results of recognition. For each alternative, next contains the index of the following segmentation point. If there
are no or no further alternatives, then the corresponding value of result_number
is -1. Consider for example
the word "ALLY" written in dense hand print uppercase. Possible segmentation points are at the beginning of every single
character. But at the segmentation point behind the letter 'A' there are two possibilities of continuation:
first letter L, next segmentation point before the second letter L and the letter Y.
continue with the letter U (first and second L not divided), next segmentation point before the letter Y.
And now look at the element of RelGraph that describes this segmentation point:
result_number[0]
the number of the field element in RelResult
, that describes the recognition of an L,result_number[0]
the number of the field element in RelResult
, that describes the recognition of an L,result_number[1]
the number of the field element in RelResult
, which describes the recognition of a probably well recognized U (composed from the two letters L),next[1]
the number of the field element in RelGraph
, contains the index of the segmentation point after the second L.