OCR de inglés medio en C# y .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

126 idiomas más

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

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

Contenido de IronOcr.Languages.MiddleEnglish

Este paquete contiene 64 idiomas OCR para .NET:

  • MiddleEnglish
  • MiddleEnglishBest
  • MiddleEnglishFast

Descargar

Paquete de idioma de inglés medio [English (1100-1500 AD)]

Instalación

Lo primero que tenemos que hacer es instalar nuestro paquete OCR de inglés medio en tu proyecto .NET.

Install-Package IronOCR.Languages.MiddleEnglish

Ejemplo de código

Este ejemplo de código C# lee texto en inglés medio de una imagen o documento PDF.

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Middle English
        Ocr.Language = OcrLanguage.MiddleEnglish;

        // Define the input source as an image file
        using (var Input = new OcrInput(@"images\MiddleEnglish.png"))
        {
            // Perform OCR to read the text from the input
            var Result = Ocr.Read(Input);

            // Get all the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Middle English
        Ocr.Language = OcrLanguage.MiddleEnglish;

        // Define the input source as an image file
        using (var Input = new OcrInput(@"images\MiddleEnglish.png"))
        {
            // Perform OCR to read the text from the input
            var Result = Ocr.Read(Input);

            // Get all the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Initialize the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set the language to Middle English
		Ocr.Language = OcrLanguage.MiddleEnglish

		' Define the input source as an image file
		Using Input = New OcrInput("images\MiddleEnglish.png")
			' Perform OCR to read the text from the input
			Dim Result = Ocr.Read(Input)

			' Get all the recognized text
			Dim AllText = Result.Text

			' Output the recognized text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Asegúrate de tener instalado el paquete IronOCR y el paquete de idioma apropiado.
  • Este ejemplo inicializa el motor OCR, lo configura para procesar inglés medio, lee texto de una imagen de entrada y muestra el texto reconocido.