Irish OCR in C# and .NET

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

IronOCR ist eine C#-Softwarekomponente, die es .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Irisch, zu lesen.

Es ist eine erweiterte Abspaltung von Tesseract, die exklusiv for .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Bezug auf Geschwindigkeit als auch Genauigkeit übertrifft.

Inhalt von IronOcr.Languages.Irish

Dieses Paket enthält 40 OCR-Sprachen for .NET:

  • Irisch
  • IrischBest
  • IrischFast

Download

Irisches Sprachpaket [Gaeilge]

Installation

Das Erste, was wir tun müssen, ist, unser irisches OCR-Paket für Ihr .NET-Projekt zu installieren.

Install-Package IronOcr.Languages.Irish

Beispielcode

Dieses C#-Beispiel liest irische Texte aus einem Bild oder PDF-Dokument.

// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOcr.Languages.Irish

using IronOcr;

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

        // Set the language to Irish for OCR processing
        Ocr.Language = OcrLanguage.Irish;

        // Using the OCR input, specify the path to the image containing Irish text
        using (var Input = new OcrInput(@"images\Irish.png"))
        {
            // Perform OCR to read the Irish text from the image
            var Result = Ocr.Read(Input);

            // Get the recognized text as a string from the OCR result
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Install the IronOCR Irish language package via NuGet:
// PM> Install-Package IronOcr.Languages.Irish

using IronOcr;

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

        // Set the language to Irish for OCR processing
        Ocr.Language = OcrLanguage.Irish;

        // Using the OCR input, specify the path to the image containing Irish text
        using (var Input = new OcrInput(@"images\Irish.png"))
        {
            // Perform OCR to read the Irish text from the image
            var Result = Ocr.Read(Input);

            // Get the recognized text as a string from the OCR result
            var AllText = Result.Text;

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

Module IrishOcrExample

    Sub Main()
        ' Create a new instance of the IronTesseract OCR engine
        Dim Ocr As New IronTesseract()

        ' Set the language to Irish for OCR processing
        Ocr.Language = OcrLanguage.Irish

        ' Using the OCR input, specify the path to the image containing Irish text
        Using Input As New OcrInput("images\Irish.png")
            ' Perform OCR to read the Irish text from the image
            Dim Result = Ocr.Read(Input)

            ' Get the recognized text as a string from the OCR result
            Dim AllText As String = Result.Text

            ' Output the recognized text
            Console.WriteLine(AllText)
        End Using
    End Sub

End Module
$vbLabelText   $csharpLabel

In diesem Beispiel verwenden wir die IronTesseract-Klasse aus der IronOCR-Bibliothek, um OCR auf einem Bild durchzuführen, das im irischen Sprachraum verfassten Text enthält. Das OcrInput-Objekt wird zum Laden des Bildes verwendet, und die Ocr.Read-Methode verarbeitet das Bild, um Text zu extrahieren. Der resultierende Text wird dann in der Variablen AllText gespeichert und über PRINT in die Konsole ausgegeben.