RecAPI
|
Structure of a line. More...
Public Attributes | |
POINT | start |
POINT | end |
unsigned short | width |
RLSTYLE | style |
REC_COLOR | color |
RLTYPES | type |
unsigned short | flag |
DWORD | plist |
Structure of a line.
The lines of an image are stored in the line list of the HPAGE. Only nearly horizontal and vertical lines are detected. There are three functions for filling this list: kRecLineRemoval, kRecLocateZones, kRecRecognize. They use different algorithms for searching lines. Thus, their outputs are different.
The functions kRecLineRemoval
and kRecLocateZones
do not find dotted and dashed lines. In addition, they render double lines as one or two solid lines. Thus, after these functions, the style is always LS_SOLID.
The function kRecLineRemoval
works on the image II_BW; because of this, the line color is always REC_DEFAULT_COLOR.
The function kRecRecognize
provides only the lines outside OCR zones. It detects the lines only when the decomp method is DCM_STANDARD. After this function, the line list stores the coordinates of the middle line of the bounding box of the detected lines, which are given on the image II_BW. The other two functions store the end points of the lines (in the coordinate system of the II_BW). The HPAGE stores the result of the latest run function, the previous results are lost.
When a kRecRecognize
runs after a kRecLocateZones
, the line list will be more accurate, since kRecLocateZones
may find lines that are parts of graphics or large letters, and does not search dotted or dashed lines. In this case, kRecRecognize
removes the lines from inside OCR zones, because they become underlines, table splitters or leaders. It also modifies the coordinates of the lines making them exactly horizontal or vertical.
Running of line detection depends on page descriptor. In the case of default page descriptor, when there are no user zones, the above functions search lines on the whole page; when there are user zones, they search within only WT_FLOW, WT_TABLE and WT_AUTO zones. Otherwise, they search outside of the user zones, if the page descriptor says that flow text or table zones should be detected there.
Color of the line. It is set only when RETAINCOLOR_YES is set and with color images.
POINT RLINE::end |
Ending point of the line (in the middle of the rule line).
unsigned short RLINE::flag |
Only for internal use.
DWORD RLINE::plist |
Only for internal use.
POINT RLINE::start |
Starting point of the line (in the middle of the rule line).
Style.
RLTYPES RLINE::type |
Only for internal use.
unsigned short RLINE::width |
Width of the line in pixels.