OCR latin en C# et .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this 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 le latin.

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.Latin

Ce package contient 40 langues OCR pour .NET :

  • Latin
  • LatinBest
  • LatinFast

Télécharger

Pack de langue latine [latin]

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

Installation

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

Install-Package IronOCR.Languages.Latin

Exemple de code

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

// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;

// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
    // Perform OCR on the input
    var Result = Ocr.Read(Input);
    // Retrieve the recognized text
    var AllText = Result.Text;
    // Log or process the recognized text
}
// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;

// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
    // Perform OCR on the input
    var Result = Ocr.Read(Input);
    // Retrieve the recognized text
    var AllText = Result.Text;
    // Log or process the recognized text
}
' Install the IronOcr.Languages.Latin package via NuGet
Imports IronOcr

Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Latin

' Create an OCR input object by specifying the image or PDF file path
Using Input = New OcrInput("images\Latin.png")
	' Perform OCR on the input
	Dim Result = Ocr.Read(Input)
	' Retrieve the recognized text
	Dim AllText = Result.Text
	' Log or process the recognized text
End Using
$vbLabelText   $csharpLabel
  • Cet exemple illustre l'initialisation de l'objet IronTesseract et la configuration de la langue OCR sur le latin.
  • L'OcrInput encapsule le fichier d'entrée, dans ce cas, une image contenant du texte latin.
  • La méthode Ocr.Read traite l'entrée et renvoie un objet OcrResult à partir duquel vous pouvez extraire le texte reconnu.