RepResult
typedef struct RepResult_tag {
long left, top;
long width, height;
short rel_deskew;
short rel_char_space;
short rel_blank_width;
short rel_blank_min;
short rel_grid_len;
short rel_graph_len;
short rel_result_len;
short filler1;
RelGrid *rel_grid;
RelGraph *rel_graph;
RelResult *rel_result;
void *filler2;
} RepResult;
Elements:
left, top
- Position of the line in the image.
width, height
- Height and width of the line.
rel_deskew
- Corrected skew of the image.
rel_char_space
rel_char_space
describes the mean distance of two successive characters of the text line,
i.e. the distance from the beginning of one character to the beginning of the next (see char_space_min
and char_space_max
). These values are necessary for correct reproduction of the recognized text,
especially with equidistant fonts.
rel_blank_width
rel_blank_width
is set to zero with equidistant fonts. In the case that the REL
module detects proportional spacing, it provides the computed width of the blank character.
rel_blank_min
rel_blank_min
also is set to zero with equidistant fonts. For proportional spacing
rel_blank_min
is set to the minimum width of that gaps between characters which are counted as blanks.
rel_grid_len
- These items are in the result part of the structures
RelData
and RepResult
.
Should information about grid
items be retrieved, before a call of rel_init()
or
rep_init()
a maximum value rel_grid_maxlen
must be set. Before calling rel_do()
,
rel_grid
has to refer to adequate memory for all RelGrid
structures needed. The actual
number of recognized structure elements is provided in rel_grid_len
after calls to rel_do()
.
rel_graph_len, rel_result_len
- These items are located in the result part of the structures
RelData
and RepResult
and provide the number of recognized single characters. The items rel_graph_maxlen
and
rel_result_maxlen
have to be set with maximum values before calling rel_init()
, dependent on the
size of the two arrays rel_graph
and rel_result
. This is only to protect your application
and to prevent rel_do()
from writing beyond the allocated memory. After every call of rel_do()
or rep_do()
, rel_graph_len
and rel_result_len
contain the number of actual
recognized array elements in rel_graph
and rel_result
.
filler1
- 8 byte alignment.
rel_grid
- These items are in the result part of the structures
RelData
and RepResult
.
Should information about grid
items be retrieved, before a call of rel_init()
or
rep_init()
a maximum value rel_grid_maxlen
must be set. Before calling rel_do()
,
rel_grid
has to refer to adequate memory for all RelGrid
structures needed. The actual
number of recognized structure elements is provided in rel_grid_len
after calls to rel_do()
.
rel_graph, rel_result
- These two items refer to the results of segmentation and classification. The results are contained in
arrays of type
RelGraph
and RelResult
. Before calling rel_do()
, rel_graph
and rel_result
have to be set with pointers to memory, where rel_do()
can fill in the recognition
results (see rel_graph_len
, rel_graph_maxlen
, rel_result_len
and
rel_result_maxlen
.
filler2
- 8 byte alignment.
Reference: