Table of Contents

Enum OcrOutputFormat

Namespace
Egami.Ocr
Assembly
Egami.dll

What an OCR program writes, for Output.

public enum OcrOutputFormat

Fields

Alto = 2

ALTO.

Auto = 0

Tell hOCR from ALTO by the content: an alto root element is ALTO, anything else hOCR.

Hocr = 1

hOCR.

Examples

// Any OCR program that writes hOCR or ALTO is an engine. No shell runs the command, and each run has its own temp folder.
CommandOcrEngine tesseract = new("tesseract {image} {output} -l {langs} --dpi {dpi} hocr", new CommandOcrOptions
{
    Languages = ["eng"],
    Timeout = TimeSpan.FromMinutes(2),
});

try
{
    OcrResult result = await tesseract.RecognizeAsync(new OcrRequest(page), Ct);
    Console.WriteLine(result.Text);
}
catch (OcrEngineException e)
{
    Console.WriteLine($"{e.Message} {e.ErrorOutput}");
}