German OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Autres versions de ce document :

IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, dont l'allemand.

Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET et qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.

Contenu de IronOcr.Langues.Allemand

Ce package contient 61 langues OCR for .NET :

  • Allemand
  • AllemandBest
  • AllemandFast
  • AllemandFraktur

Télécharger

Pack de langue allemande [Deutsch]

  • Télécharger au format ZIP
  • Installer avec NuGet

Installation

La première chose à faire est d'installer notre package OCR allemand sur votre projet .NET.

Install-Package IronOcr.Languages.German

Exemple de code

Cet exemple de code C# lit du texte allemand à partir d'une image ou d'un document PDF.

using IronOcr;

var Ocr = new IronTesseract();
// Set the OCR language to German. This must match the language of the document you are scanning.
Ocr.Language = OcrLanguage.German;

using (var Input = new OcrInput(@"images\German.png"))
{
    // Perform OCR on the provided image and get the result.
    var Result = Ocr.Read(Input);
    // Extract all recognized text from the OCR result.
    var AllText = Result.Text;
    // Optionally, output the recognized text to the console for verification.
    Console.WriteLine(AllText);
}
using IronOcr;

var Ocr = new IronTesseract();
// Set the OCR language to German. This must match the language of the document you are scanning.
Ocr.Language = OcrLanguage.German;

using (var Input = new OcrInput(@"images\German.png"))
{
    // Perform OCR on the provided image and get the result.
    var Result = Ocr.Read(Input);
    // Extract all recognized text from the OCR result.
    var AllText = Result.Text;
    // Optionally, output the recognized text to the console for verification.
    Console.WriteLine(AllText);
}
$vbLabelText   $csharpLabel

Dans cet exemple, IronTesseract est configuré pour utiliser la langue allemande pour l'OCR, ce qui est nécessaire pour traiter les images ou les PDF contenant du texte allemand. La classe OcrInput est utilisée pour spécifier le fichier image, et la méthode Read effectue l'opération OCR, renvoyant le texte extrait.