Latin OCR in C# and .NET
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 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 for .NET :
- Latin
- LatinBest
- LatinFast
Télécharger
Pack de langue latine [latin]
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
- Cet exemple montre comment initialiser l'objet
IronTesseractet définir la langue OCR sur le latin. - Le
OcrInputencapsule le fichier d'entrée, dans ce cas, une image contenant du texte latin. - La méthode
Ocr.Readtraite l'entrée et renvoie un objetOcrResultà partir duquel vous pouvez extraire le texte reconnu.

