OCR latino en C# y .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

IronOCR es un componente de software en C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el latín.

Es una versión avanzada de Tesseract, construida exclusivamente para desarrolladores de .NET y que supera regularmente a otros motores Tesseract tanto en velocidad como en precisión.

Contenido de IronOcr.Languages.Latin

Este paquete contiene 40 idiomas OCR para .NET:

  • Latin
  • LatinBest
  • LatinFast

Descargar

Paquete de Idioma Latín [latine]

Instalación

Lo primero que tenemos que hacer es instalar nuestro paquete Latín OCR en su proyecto .NET.

Install-Package IronOCR.Languages.Latin

Ejemplo de código

Este ejemplo de código en C# lee texto latino de una imagen o documento 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
  • Este ejemplo demuestra la inicialización del objeto IronTesseract y la configuración del idioma OCR a Latín.
  • El OcrInput encapsula el archivo de entrada, en este caso, una imagen que contiene texto en latín.
  • El método Ocr.Read procesa la entrada y devuelve un objeto OcrResult del cual puede extraer el texto reconocido.