<info> <desc>Configure the OCR engines to recognize the text</desc> </info>

<app>OCRFeeder</app> uses system-wide OCR engines to extract the text from images. This means any OCR engine that can be used from the command line should also be used in <app>OCRFeeder</app>.

Automatic Detection of OCR Engines

The OCR engines (Tesseract, GOCR, Ocrad and Cuneiform) are already automatically detected and configured in most systems, the first time <app>OCRFeeder</app> is run.

If an OCR engine is installed after <app>OCRFeeder</app> had configured already an engine, it will not be automatically configured but, depending on the engine, users might easily go to the <gui>OCR Engines</gui> dialog and choose it from the list of detected engines after pressing <gui>Detect</gui>.

Already configured OCR engines might be detected again and it is up to the user to uncheck these engines if they shouldn't be added again.

Manual Configuration

The currently configured OCR engines are shown in the <gui>OCR Engines</gui> dialog which can be opened from <guiseq><gui>Tools</gui><gui>OCR Engines</gui></guiseq>.

Besides seeing the configured OCR engines, the <gui>OCR Engines</gui> dialog allows to add new engines, edit or delete the current ones and detect engines installed in the system.

When adding or editing an OCR engine (by pressing the <gui>Add</gui> or <gui>Edit</gui> buttons, respectively), a dialog is shown with the following fields:

<list> <item>

<gui>Name</gui>: The engine's name. This name will be used in throughout the UI when referring to the engine;

</item> <item>

<gui>Image format</gui>: The image format that the engine recognizes (for example, TIF in the case of Tesseract);

</item> <item>

<gui>Failure string</gui>: Some engines replace unrecognized characters by another, pre-defined character (for example, _ in the case of GOCR).

</item> <item>

<gui>Engine path</gui>: The path in the system to the engine's executable (for example, /usr/bin/tesseract).

</item> <item>

<gui>Engine arguments</gui>: The arguments that feed an image to the engine and make it output the recognized text to the standard output. <app>OCRFeeder</app> runs the engine with these arguments as if it was in the command line and looks for the recognized text in the standard output. Some engines already do this, like Ocrad and GOCR while other, like Tesseract, write the text into a file.

Since the image's path to be read is always needed, a special argument $IMAGE is provided for this and will be replaced by the image path when the engine is run. For the cases where a file name is needed, like the one mentioned previously, a special argument $FILE is provided and will be replaced by a temporary file name.

So, in case of Tesseract (which writes the recognized text into a file), the arguments would be $IMAGE $FILE; cat $FILE.txt; rm $FILE.

</item>

</list>

The engines' configuration is stored in their own XML file in the user's home under .config/ocrfeeder/engines/.