Table of Contents

Namespace Egami.Ocr

Classes

Alto

Reads and writes ALTO (Analyzed Layout and Text Object), the XML format of library digitization that ABBYY, Tesseract and Transkribus write: pages (Page), lines (TextLine) and words (String) with their positions, WC confidence and LANG.

CommandOcrEngine

An IOcrEngine that runs an OCR program for each image and reads the hOCR or ALTO it writes, such as tesseract {image} {output} -l {langs} --dpi {dpi} hocr. Egami ships no engine and links none: the program is yours.

CommandOcrOptions

Options for CommandOcrEngine.

Hocr

Reads and writes hOCR, the HTML format that Tesseract, OCRopus, kraken and others write: pages (ocr_page), lines (ocr_line and its kin) and words (ocrx_word) with their bbox, x_wconf, textangle and lang.

OcrEngineException

Thrown when an OCR engine fails, such as a program that exits with an error, times out or writes no result.

OcrEngineInfo

What an IOcrEngine can do. Callers such as a PDF driver read it to size and schedule their requests.

OcrLine

One line of text: its words, in reading order.

OcrReadOptions

Limits for reading hOCR and ALTO files, which may come from an untrusted engine or file.

OcrRequest

One image to recognize, with how to read it.

OcrResult

The text an engine found in one image: lines of words, in reading order.

OcrWord

One recognized word.

Structs

OcrQuad

The four corners of a word, in pixels with the origin at the top left of the image, named as the word reads: a word that runs up the page has its TopLeft at the bottom left of its bounds. Rotated and skewed words keep their shape.

Interfaces

IOcrEngine

A text recognition (OCR) engine: an image in, words with their boxes out. Egami ships no engine; plug one in, such as CommandOcrEngine for any program that writes hOCR or ALTO, or your own class around an OS or cloud service.

Enums

OcrOutputFormat

What an OCR program writes, for Output.