OCR de frisón occidental 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 frisón occidental.

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

Contenido de IronOcr.Languages.WesternFrisian

Este paquete contiene 67 idiomas de OCR para .NET:

  • FrisónOccidental
  • FrisónOccidentalMejorado
  • FrisónOccidentalRápido

Descargar

Paquete de Idioma Frisón Occidental [Frysk]

Instalación

Lo primero que tenemos que hacer es instalar nuestro paquete OCR de Frisón Occidental en tu proyecto .NET.

Install-Package IronOCR.Languages.WesternFrisian

Ejemplo de código

Este ejemplo de código C# lee texto en frisón occidental de una imagen o documento PDF.

// Import the IronOcr library
using IronOcr;

class WesternFrisianOcrExample
{
    static void Main()
    {
        // Create a new instance of IronTesseract, which is the OCR engine 
        var Ocr = new IronTesseract();

        // Set the language to Western Frisian
        Ocr.Language = OcrLanguage.WesternFrisian;

        // Perform OCR on a given image
        using (var Input = new OcrInput(@"images\WesternFrisian.png"))
        {
            // Read the input image and store the result
            var Result = Ocr.Read(Input);

            // Extract the text from the result
            string AllText = Result.Text;

            // Output the recognized text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr library
using IronOcr;

class WesternFrisianOcrExample
{
    static void Main()
    {
        // Create a new instance of IronTesseract, which is the OCR engine 
        var Ocr = new IronTesseract();

        // Set the language to Western Frisian
        Ocr.Language = OcrLanguage.WesternFrisian;

        // Perform OCR on a given image
        using (var Input = new OcrInput(@"images\WesternFrisian.png"))
        {
            // Read the input image and store the result
            var Result = Ocr.Read(Input);

            // Extract the text from the result
            string AllText = Result.Text;

            // Output the recognized text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr library
Imports IronOcr

Friend Class WesternFrisianOcrExample
	Shared Sub Main()
		' Create a new instance of IronTesseract, which is the OCR engine 
		Dim Ocr = New IronTesseract()

		' Set the language to Western Frisian
		Ocr.Language = OcrLanguage.WesternFrisian

		' Perform OCR on a given image
		Using Input = New OcrInput("images\WesternFrisian.png")
			' Read the input image and store the result
			Dim Result = Ocr.Read(Input)

			' Extract the text from the result
			Dim AllText As String = Result.Text

			' Output the recognized text to the console
			System.Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

En este ejemplo, nosotros:

  • Inicializamos el motor OCR IronTesseract.
  • Configuramos el proceso de OCR para reconocer texto en frisón occidental usando la opción de idioma OcrLanguage.WesternFrisian.
  • Leemos un archivo de imagen ubicado en la ruta images\WesternFrisian.png.
  • Almacenamos el texto reconocido en AllText y lo imprimimos en la consola.