OCR del alfabeto Gurmukhi 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 en C# que permite a los codificadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el alfabeto Gurmukhi.

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

Este paquete contiene 73 idiomas OCR para .NET:

  • AlfabetoGurmukhi
  • AlfabetoGurmukhiMejorado
  • AlfabetoGurmukhiRápido

Descargar

Paquete de idioma del alfabeto Gurmukhi [Gurmukhī]

Instalación

Lo primero que tenemos que hacer es instalar nuestro paquete OCR Alfabeto Gurmukhi en tu proyecto .NET.

Install-Package IronOCR.Languages.Gurmukhi

Ejemplo de código

Este ejemplo de código C# lee texto en el alfabeto Gurmukhi de una imagen o documento PDF.

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the OCR language to Gurmukhi
        Ocr.Language = OcrLanguage.Gurmukhi;

        // Define the input source for OCR using an image file path
        using (var Input = new OcrInput(@"images\Gurmukhi.png"))
        {
            // Perform OCR on the input
            var Result = Ocr.Read(Input);

            // Retrieve 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()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the OCR language to Gurmukhi
        Ocr.Language = OcrLanguage.Gurmukhi;

        // Define the input source for OCR using an image file path
        using (var Input = new OcrInput(@"images\Gurmukhi.png"))
        {
            // Perform OCR on the input
            var Result = Ocr.Read(Input);

            // Retrieve 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()
		' Create a new instance of IronTesseract
		Dim Ocr = New IronTesseract()

		' Set the OCR language to Gurmukhi
		Ocr.Language = OcrLanguage.Gurmukhi

		' Define the input source for OCR using an image file path
		Using Input = New OcrInput("images\Gurmukhi.png")
			' Perform OCR on the input
			Dim Result = Ocr.Read(Input)

			' Retrieve 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 que las bibliotecas necesarias de IronOCR estén instaladas en tu proyecto para usar el paquete de idioma Gurmukhi.
  • Modifica la ruta "images\Gurmukhi.png" para señalar al archivo de imagen actual que deseas procesar.
  • Este programa lee texto de la imagen especificada y lo muestra en la consola.