ReLayoutResult, ReLayoutData
typedef struct ReLayoutResult_tag {
ReRect subimage;
long result_flag;
long filler;
ReImageHandle h_result_image_bw;
} ReLayoutResult;
typedef struct ReLayoutData_tag {
ReImage image_in;
ReRect *expected_areas;
short expected_areas_len;
short filler1;
long parameter;
ReImage image_deskewed;
ReImageHandle h_image_deskewed;
ReRect content;
short re_layout_deskew;
short re_layout_result_len;
short filler2[2];
ReLayoutResult *re_layout_result;
} ReLayoutData;
Elements:
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 |
filler
- 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.
image_in
- Image to be analyzed for layout.
expected_areas
- Rectangles with text are searched. If rectangles are specified (expected), then only those are
returned that correspond to the specification.
expected_areas_len
- Number of specifications that can be found under
expected_areas
.
filler1;
- 8 byte alignment.
parameter
- The default is 0. If
LAYOUT_CONTENT_ONLY
is set, the circumscribing rectangle will be
delivered for the full page. LAYOUT_OPTIONS_FAST_GRID
uses a quick search, which should only be used on dirt-free images.
image_deskewed
- If the given image isn't correctly horizontally positioned, the corrected, deskewed image will be provided here.
h_image_deskewed
- 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_layout_deskew
- Corrected skew of image_in. If different from 0, image_deskewed with h_image_deskewed is provided.
re_layout_result_len
- Number of items in re_layout_result.
filler2[2]
- 8 byte alignment.
re_layout_result
- Array of results of layout analysis. Call
free(*.re_layout_result)
to free memory.
Reference: