<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="ocrconfigutation">

<info>
    <link type="guide" xref="index#configuration"/>
    <link type="seealso" xref="automaticrecognition"/>
    <link type="seealso" xref="manualeditionandcorrection"/>
    <desc>Einrichten der OCR-Anwendungen zur Texterkennung</desc>
</info>

<title>OCR-Anwendungen verwalten</title>

<p><app>OCRFeeder</app> verwendet systemweit installierte OCR-Anwendungen, um Text aus Bildern auszulesen. Das bedeutet, dass jede für die Befehlszeile verfügbare OCR-Anwendung auch in <app>OCRFeeder</app> genutzt werden kann.</p>

<section>

<title>Automatische Erkennung von OCR-Anwendungen</title>

<p>Die OCR-Anwendungen (<em>Tesseract</em>, <em>GOCR</em>, <em>Ocrad</em> und <em>Cuneiform</em>) werden auf den meisten Systemen bereits automatisch erkannt und konfiguriert, wenn <app>OCRFeeder</app> zum ersten Mal gestartet wird.</p>

<p>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>.</p>

<note style="tip"><p>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.</p></note>

</section>

<section>

<title>Manuelle Konfiguration</title>

<p>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>.</p>

<p>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.</p>

<p>Beim Hinzufügen oder Bearbeiten einer OCR-Anwendung (durch Anklicken der Knöpfe <gui>Hinzufügen</gui> oder <gui>Bearbeiten</gui>) wird ein Dialog mit den folgenden Feldern angezeigt:</p>

<list>
    <item><p><gui>Name</gui>: Der Name der Anwendung. Dieser Name wird in der Benutzeroberfläche stets bezugnehmend auf diese Anwendung verwendet.</p></item>
    <item><p><gui>Bildformat</gui>: Das Bildformat, das von der Anwendung erkannt werden kann (z.B. <em>TIF</em> für <em>Tesseract</em>);</p></item>
    <item><p><gui>Failure string</gui>: Some engines replace unrecognized
    characters by another, pre-defined character (for example,
    <em>_</em> in the case of <em>GOCR</em>).</p></item>
    <item><p><gui>Engine path</gui>: The path in the system to the
    engine's executable (for example, <em>/usr/bin/tesseract</em>).</p></item>
    <item><p><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
    <em>Ocrad</em> and <em>GOCR</em> while other, like <em>Tesseract</em>,
    write the text into a file.</p>
    <p>Since the image's path to be read is always needed, a special argument
    <em>$IMAGE</em> 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 <em>$FILE</em> is provided and will be replaced by a temporary
    file name.</p>
    <p>So, in case of <em>Tesseract</em> (which writes the recognized text
    into a file), the arguments would be <em>$IMAGE $FILE; cat $FILE.txt;
    rm $FILE</em>.</p></item>

</list>

<note style="advanced"><p>The engines' configuration is stored in their own XML file
in the user's home under <em>.ocrfeeder/engines/</em>.</p></note>

</section>

</page>
