RePageParm, RePageResult, RePageData
typedef struct RePageParm_tag {
RepData rep;
ReSpellData respell1;
ReSpellData respell2;
ReRect application_area;
} RePageParm_tag;
typedef struct RePageResult_tag {
ReRect subimage;
long result_flag;
long filler1;
ReImageHandle h_result_image_bw;
short block_number;
short rep_result_len;
short filler2[2];
RepResult *rep_result;
} RePageResult_tag;
typedef struct RePageData_tag {
ReImage image_in;
ong parameter;
long filler1;
ReImage image_deskewed;
ReImageHandle h_image_deskewed;
ReRect content;
short re_page_deskew;
short re_page_parm_len;
short filler2[2];
RePageParm *re_page_parm;
short block_count;
short re_page_result_len;
short filler3[2];
RePageResult *re_page_result;
} RePageData;
Elements:
rep
- initialized classifier and parameters for recognition. Do not set
rep.init.rep_memory
or rep.init.rep_memory_size
as re_page()
will do this internally but set
rep.init.rel_grid_maxlen
, .rel_graph_maxlen
, and .rel_result_maxlen
.
respell1
- Initialized spellchecker number one or zeroed memory.
respell2
- Initialized spellchecker number two or zeroed memory.
application_area
- Area of application for this classifierand the spellcheckers, related to the deskewed content image.
subimage
- Position of the segmented or found area in the provided input image or position in the deskewed
input image if the input image had to be deskewed.
result_flag
- Specifies the type of the found area.
RESULT_FLAG_NOTEXT | picture, graphics or something else |
RESULT_FLAG_GRID | line, box, grid of lines, or something like this |
RESULT_FLAG_UNDERLINE | underline of a text line |
RESULT_FLAG_TEXT | area of text lines |
filler1
- 8 byte alignment.
h_result_image_bw
- Image handle of a black and white version of the segmented subimage. Call
re_imagehandle2image()
to get this black and white result_image
. Call re_freeimage(*.h_result_image_bw)
to free the
related memory.
block_number
- the paragraphs of a page are grouped into blocks.
block_number==0
means the paragraph is a
block of its own.
rep_result_len
- Number of items in
rep_result
if result_flag==RESULT_FLAG_TEXT
.
filler2
- 8 byte alignment.
*rep_result
- Results of line recognition if
result_flag==RESULT_FLAG_TEXT
.
image_in
- Image to be analyzed for layout.
parameter
LAYOUT_OPTIONS_FAST_GRID
image_deskewed
- If the given image isn't correctly horizontally positioned, the corrected, deskewed image will be
provided here.
h_image_deskewedler
- Image handle of the deskewed image, if this value or
re_layout_deskew
is different from 0.
Call re_freeimage(*.h_image_deskewed)
to free the allocated memory.
content
- Found global area of interest in the given image, containing all results.
re_page_deskew
- Corrected skew of
image_in
. If different from 0, image_deskewed with h_image_deskewed
is provided.
re_page_parm_len
- Number of items in re_page_parm, to be set before calling
re_page()
.
filler2[2]
- 8 byte alignment.
re_page_parm
- Parameters for page recognition, to be set before calling
re_page()
.
block_count
- The paragraphs of a page are grouped into blocks; number of found real blocks +1.
re_page_result_len
- Number of items in
re_page_result
.
filler3
- 8 byte alignment.
*re_page_result
- Array of results of layout analysis. Call
free(*.re_page_result
) to free memory.
Reference: