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,
  1. 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.

  2. Table handling
    This library supports abstraction of wide viriety of tables, huge table, inclined table and even support flowchart or state transition table.

  3. Graphic recognition
    It can classify frames, lines circles and paited polygons from other elements of document.
function overview
These functions are performed by methods library provides.
  1. 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.
    4 direction connectivity and 8 direction connectivity

  2. 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.
    Cluster abstraction

  3. 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.

  4. 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
    example of table 1only one cell
    example of table 2nomal table
    example of table 3without outmost frame
    example of table 4handwritten table
    example of table 5this also is a table

  5. 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.

    1. Select primitives inside right-angled rectangle. Primitives that touch frame are not selected.
    2. Select primitives inside right-angled rectangle and primitives on the frame.
    3. Select primitives inside any-angle rectangle. Primitives that touch frame are not selected.
    4. Select primitives inside any-angle rectangle and primitives on the frame.
    5. Select primitives that touch line.
    6. Select primitives that touch line and neighbour primitives.
      This function is act as selecting one line text.

  6. Calculate features, size, area, length of outline, moment, circleness and line width of primitives.

  7. Classify primitives by feature value.
    Move primitives to other layer that meet the feature range conditions.

  8. Delete primitives in some layer.
    You can use this function as noise reduction of document image.
  9. Simple layer movement
    For example, if you move text elements to layer 1 and delete that layer, you can get images without text

  10. 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
    layer classification

  11. 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.
    pseudo color image


  1. 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.
  2. 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.
  3. Big image
    Coordinates values are 4 bytes. It easily handles A0 image.
user's manual

reference manual