Manual of Ancient Egyptian OCR

The tool allows OCR of hand-written transcriptions of hieroglyphic. The input consists of a directory containing a number of pages, each in a separate file. Usually, these pages are scans of printed text. The images need to be in PNG format. Furthermore, the order of the pages is assumed to correspond to the lexicographical ordering of the filenames. For example, appropriate filenames could be '09.png' and '10.png', rather than '9.png' and '10.png'.

The tool will create a file 'index.xml' in the same directory, containing the (intermediate) results of OCR. There will be a subdirectory 'glyphs' containing individual glyphs (again in PNG format). After completion of the process, the resource containing the hieroglyphic encoding will be created and stored in the file 'resource.xml', again in the same directory.

One tab will be created for each page. Below each such a tab, there are two more tabs, one allowing selection of lines on a page, the other allowing editing of hieroglyphs within lines. All work below the 'lines' tab should be fully completed before work below the 'glyphs' tabs, or else efforts may be lost.

Lines

Lines can be specified manually or automatically (followed by manual fine-tuning). By analyze page, the page is analyzed, for presence of lines. By analyze all, the same is done for all pages in the project. Fully manual creation of a new line is by a number of left clicks followed by a right click.

A control point can be dragged by the mouse (left click). More points can be added by clicking on a line. A right click inside the borders of a line deletes the line.

The order of lines can be changed by clicking inside lines in the desired order.

Glyphs

At most one line for each page is the focussed line. One can change the focus by clicking on a line. The focussed line is expanded by showing the results of OCR, and eventually the formatted hieroglyphic. By a right-click on a button containing OCR results, one may attach a note to a hieroglyph; this is typically used to flag up hieroglyphs that are not in the Unicode set or that have a non-standard appearance.

With appropriate settings, OCR is activated to run in the background once lines have been selected, and new results may come in when viewing a certain focussed lines. Press update to access the latest OCR results.

The results of OCR can be corrected by choosing alternative glyphs. One may also remove glyphs by right-click inside a bounding box. Small glyphs (or specks of dust in the scan) can be removed by dragging the mouse (right button) across the relevant area. Fine-tuning of an entire line may be done by zoom, and fine-tuning of a smaller rectangle can be achieve by dragging the mouse (left button) from one corner to an opposite corner. See below for more information on the glyph editor.

Formatted hieroglyphic can be created for one individual focussed line, or for all lines on a page. Usually this is done only after all hieroglyphs are correctly identified, by OCR and subsequent manual correction. The formatted hieroglyphic is not updated by changes to the OCR results.

Buttons in the top menu

Open

Opens an OCR project. This is a directory containing images in PNG format.

Close

Closes the tool.

Prototypes

Allows administration of glyphs, for the purpose of enlarging the repertoire of glyphs available for OCR. Two windows are opened, first the existing set of prototypes, and second, after entering a number, a set of hieroglyphs extracted from the current project. The second set can be merged into the first. Further follow the help pages of the prototype administrator.

Export

Extracts hieroglyphic encoding from the OCR project.

Analyze page

Tries to identify lines on a page.

Analyze all

Tries to identify lines on all pages of the project.

Delete lines

Removes all lines from the current page.

OCR

Switches on/off OCR for existing and newly created segments. This is a short cut for the corresponding option in the Settings menu.

Update OCR

Updates the results from OCR for the line that is the current focus. For glyphs where OCR may be uncompleted as yet, a question mark may be printed.

Format line(s)

Creates formatted hieroglyphic for the line under focus, or for all lines on the current page, respectively. Numbers in the scanned document are translated to line numbers. A left mouse click on a formatted element opens an appropriate editor.

New formatted elements can be added by clicking on the +res or +num buttons between existing formatted elements.

For hieroglyphic components, a right mouse click allows one to attach notes to hieroglyphs (at most one per hieroglyph). Left mouse clicks now select hieroglyphs. With left and right one can navigate to hieroglyphs that are difficult to select by mouse clicks. Existing notes can also be moved to neighbouring hieroglyphs, with backward and forward.

Line up/down

Navigates through the lines of a page.

Glyph left/right

Navigates through a line.

Zoom

Gives detailed view of line, with glyph editor. See below for more information.

Combine

For current line, attempts to combine parts of a single glyph, represented by several connected components.

Modifiers

Attaches modifier to current glyph. The 'part' modifier means the glyph is a connected component that is part of a bigger sign; generally this modifier is not created manually but results from OCR.

Settings

Allows automatic processes, such as recognition of glyphs (connected components), OCR, and formatting. One may also set the repertoire of prototypes for OCR.

The candidates investigated represents an internal beam width. OCR is roughly twice as time-consuming for a beam that is twice as large. The candidates returned is the maximum number of candidates that is presented as the result of OCR.

Glyph editor

An enlarged view of a line, or part of a line, is given. Identified glyphs are in the upper pannel. The current focus contains zero or more glyphs, as indicated by blue borders in the upper panel and black pixels in the lower panel. More glyphs can be included in the focus by clicking on a button in the upper panel. A second click unselects glyphs again.

Pixels can be included or excluded by the paint function and dragging with the left or right mouse button (left for include, right for exclude). The paint inclusive function allows inclusion of pixels that are white in the input scan.

The glyph editor has the following buttons in the top menu.

Close

Closes the editor.

Merge

Merges all glyphs in the current focus.

Split

Splits one glyph in the current focus into several connected components. If all pixels are connected, then this function has no effect.

Copy

Creates two copies of the same glyph. This is usually followed by erasure of disjoint sets of pixels from both copies.

Delete

Deletes a glyph.

Unshade

Tries to remove diagonal lines indicating shading.

Closure

Adds all pixels connected to the pixels from the glyph that is the current focus.

Paint

Switches on/off the paint functionality, to be used with left/right mouse buttons. Pixels are added to (removed from) the current focus, or a new glyph is created.

Paint inclusive

Switches on/off the paint functionality, allowing selection of pixels that are white in the input scan. Such pixels will be made blue in the lower panel.

Radius up/down

This affects the size of the circle used by the paint functionalities.