Overview
ALPRIM Ver1.0 is an document image analysis library released in 1999. It can handle
normal documents and more complicated document like drafts or maps. It can separate
text from graphics easily. Ver 1.0 provide functions as follows,
- Abstract text blocks
ALPRIM can abstract text block from complicated documents. It can abstract text lines of
any angle. It supports both vertical and horizontal paragraph. It infer angle of paragraph
and horizontalize/verticalize text paragraph.
- Table handling
This library supports abstraction of wide viriety of tables, huge table, inclined table
and even support flowchart or state transition table.
- Graphic recognition
It can classify frames, lines circles and paited polygons from other elements
of document.
These functions are performed by methods library provides.
- It transform monochrome bitmap into "primitive structure".
We define connected components as "primitive" linking by 4 direction connectivity
or 8 direction connectivity. Components of bit 0(white, background image) and bit 1
(black, foreground image) can be primitive. Normal document contains from tens of
thousands to handreds of thousands primitive.
- It can abstract a set of primitives as a cluster. ALPRIM abstracts cluster
by using parameters, size of primitive, area of primitive or/and distance between
primitives. For document image processing, cluster can handle as a text paragraph.
Of course, you can define any set of primitives as a cluster that in not text paragraph.
- ALPRIM can calculate minimum size bounding box, which surround a cluster.
There are two methods , one is to infer angle of cluster and the other is to specify
the angle of cluster.
- Table abstraction
ALPRIM abstracts tables. Table is defined as an area which has more than one cluster
and is separated by grid lines. Flow chart or state transition table is also accepted
as a table by ALPRIM library.
Example of table
only one cell
nomal table
without outmost frame
handwritten table
this also is a table
- Layer support
Every primitive can be moved to any layers. There are 255 layers.
How to move primitive from layer A to layer B is as follows.
- Select primitives inside right-angled rectangle. Primitives that touch frame
are not selected.
- Select primitives inside right-angled rectangle and primitives on the frame.
- Select primitives inside any-angle rectangle. Primitives that touch frame
are not selected.
- Select primitives inside any-angle rectangle and primitives on the frame.
- Select primitives that touch line.
- Select primitives that touch line and neighbour primitives.
This function is act as selecting one line text.
- Calculate features, size, area, length of outline, moment, circleness and
line width of primitives.
- Classify primitives by feature value.
Move primitives to other layer that meet the feature range conditions.
- Delete primitives in some layer.
You can use this function as noise reduction of document image.
- Simple layer movement
For example, if you move text elements to layer 1 and delete that layer, you
can get images without text
- You can transform primitives in some layer into bitmap.
For example, if you move text elements to layer 1 and make bitmap of the layer,
you can get text only image
- Get bitmaps of specified rectangle and specified layer and specified magnification.
There are two methods, one is to get a bitmap of layer as monochrome image and
the other is to get bitmap of whole layers as 255 palette color image. You can show
the classified image as 255 color indexed color image.
Advantage
- High speed
Even on Pentium 166MHz machine, this library can work well. For example
you can abstract text paragraphs from A4 size 400dpi image within one
second on slow CPU machine.
- Low memory resource
ALPRIM can encode monochrome bitmap image losslessly. The size of transformed
primitive array is normally less than the size of original image.
- Big image
Coordinates values are 4 bytes. It easily handles A0 image.
user's manual
reference manual