OCR islandés 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 islandés. Es una bifurcación avanzada de Tesseract, desarrollada exclusivamente para desarrolladores .NET, y supera regularmente a otros motores Tesseract tanto en velocidad como en precisión.

Contenido de IronOcr.Languages.Icelandic

Este paquete contiene 52 idiomas de OCR para .NET:

  • Islandés
  • IslandésBest
  • IslandésRápido

Descargar

Paquete de Idioma Islandés [Íslenska]

Instalación

Lo primero que debemos hacer es instalar nuestro paquete OCR Islandés en tu proyecto .NET.

Install-Package IronOCR.Languages.Icelandic

Ejemplo de código

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

using IronOcr;

class Program
{
    static void Main()
    {
        // Create an instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Icelandic
        Ocr.Language = OcrLanguage.Icelandic;

        // Load the image or PDF file to be processed
        using (var Input = new OcrInput(@"images\Icelandic.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);

            // Extract all recognized text from the result
            var AllText = Result.Text;

            // Print the extracted text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
using IronOcr;

class Program
{
    static void Main()
    {
        // Create an instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Icelandic
        Ocr.Language = OcrLanguage.Icelandic;

        // Load the image or PDF file to be processed
        using (var Input = new OcrInput(@"images\Icelandic.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);

            // Extract all recognized text from the result
            var AllText = Result.Text;

            // Print the extracted text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Create an instance of the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set the language to Icelandic
		Ocr.Language = OcrLanguage.Icelandic

		' Load the image or PDF file to be processed
		Using Input = New OcrInput("images\Icelandic.png")
			' Perform OCR on the input file
			Dim Result = Ocr.Read(Input)

			' Extract all recognized text from the result
			Dim AllText = Result.Text

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

Explicación

  • La clase IronTesseract es parte de la biblioteca de IronOcr, diseñada para realizar operaciones de OCR.
  • Ocr.Language = OcrLanguage.Icelandic; establece el idioma de OCR a islandés.
  • OcrInput toma la ruta al archivo de entrada (una imagen o un PDF) y lo prepara para el procesamiento.
  • Ocr.Read(Input) procesa el archivo de entrada y devuelve el resultado de OCR.
  • Result.Text recupera todo el texto reconocido del archivo procesado.

Asegúrate de tener la biblioteca IronOCR y su paquete de idioma islandés instalado en tu proyecto .NET para ejecutar este ejemplo con éxito.