Irish OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

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 für .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 für .NET:

  • Irisch
  • IrishBest
  • IrishFast

Download

Irisches Sprachpaket style='white-space:default'>[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);
        }
    }
}
' Install the IronOCR Irish language package via NuGet:
' PM> Install-Package IronOCR.Languages.Irish

Imports IronOcr

Friend Class IrishOcrExample
	Shared Sub Main()
		' Create a new instance of the IronTesseract OCR engine
		Dim 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 Input = 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 = Result.Text

			' Output the recognized text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$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 verwendet, um das Bild zu laden, und die Ocr.Read-Methode verarbeitet das Bild, um den Text zu extrahieren. Der resultierende Text wird dann in der AllText-Variable gespeichert und in der Konsole ausgegeben.