RelGrid
typedef struct RelGrid_tag {
long grid;
long subgrid_count;
long left, top;
long width, height;
} RelGrid;
Elements:
grid
- If a given image contains lines, boxes, or combs that have to be removed during segmentation and before
recognition, an area of data structures
RelGridParm
has to be provided. The address of this area has to be
set to gridparm
in the structure ReParm
. In the same structure, gridparm_maxlen
has to be set to the dimension of the area under gridparm
, measured in data structures RelGridParm
.
In every of these structures under gridparm
the item grid
has to be set to the type of the
searched grid object (GRID_LINE_H
, GRID_BOX
,..). No more than one such type must be specified
in a grid item. If less than gridparm_maxlen
items are needed, the first unused structure has to be marked
with GRID_END
at the item grid
.
If lines- or box-removal is switched on and grid items have
been detected, and memory is provided for the results (rel_grid_maxlen 0
), then the grid detection
results are provided in a data structure RelGrid
. For every elements is in this structure under grid
the specification of GRID_LINE_H
, GRID_LINE_V
, GRID_BOX
or GRID_COMB
.
Under left
, top
, width
and height
the position of the given
image as a rectangle is delivered.
The following grid items are defined:
GRID_LINE_H | Horizontale Linie. |
GRID_LINE_V | Vertikale Linie. |
GRID_BOX | Kästchen um ein oder mehrere Zeichen. |
GRID_COMB | Kamm mit Zeichen. |
GRID_ALL | Alle Grid-Elemente. |
GRID_END | Ende der Liste gridparm. |
subgrid_count
- Numbers of subboxes of boxes and comb fields.
left, top
- Coordinates of the left, upper corner of a grid item.
width, height
- Width and height of a grid item.
Reference: