Fraktur-Alphabet-OCR in C

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

126 Weitere Sprachen

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

Es ist eine fortschrittliche Abspaltung von Tesseract, die ausschließlich für .NET-Entwickler gebaut wurde und regelmäßig andere Tesseract-Engines sowohl in Geschwindigkeit als auch Genauigkeit übertrifft.

Inhalte von IronOcr.Languages.Fraktur

Dieses Paket enthält 70 OCR-Sprachen für .NET:

  • FrakturAlphabet
  • FrakturAlphabetBest
  • FrakturAlphabetFast

Download

Fraktur-Alphabet-Sprachpaket [Generisches Fraktur]

Installation

Als Erstes müssen wir unser Fraktur-Alphabet- OCR-Paket in Ihr .NET-Projekt installieren.

Install-Package IronOCR.Languages.Fraktur

Beispielcode

Dieses C#-Codebeispiel liest Frakturschrift aus einem Bild oder einem PDF-Dokument.

// Requires the IronOcr NuGet package and the Fraktur language package to be installed.

using IronOcr;

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

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

        // Load the image containing Fraktur text
        using (var Input = new OcrInput(@"images\Fraktur.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Retrieve and display the recognized text
            var AllText = Result.Text;
            Console.WriteLine(AllText);
        }
    }
}
// Requires the IronOcr NuGet package and the Fraktur language package to be installed.

using IronOcr;

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

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

        // Load the image containing Fraktur text
        using (var Input = new OcrInput(@"images\Fraktur.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Retrieve and display the recognized text
            var AllText = Result.Text;
            Console.WriteLine(AllText);
        }
    }
}
' Requires the IronOcr NuGet package and the Fraktur language package to be installed.

Imports IronOcr

Friend Class FrakturOCRExample
	Shared Sub Main()
		' Create an instance of the IronTesseract class
		Dim Ocr = New IronTesseract()

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

		' Load the image containing Fraktur text
		Using Input = New OcrInput("images\Fraktur.png")
			' Perform OCR on the input image
			Dim Result = Ocr.Read(Input)

			' Retrieve and display the recognized text
			Dim AllText = Result.Text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

In diesem Beispiel:

  • Wir erstellen ein IronTesseract Objekt, das als unsere OCR-Engine dient.
  • Wir ändern die Spracheinstellung auf Fraktur mithilfe von OcrLanguage.Fraktur .
  • Wir laden eine Bilddatei ( @"images\Fraktur.png" ) in ein OcrInput Objekt. Die Methode Ocr.Read() verarbeitet das Eingabebild und gibt das OCR-Ergebnis zurück. Zum Schluss geben wir den extrahierten Text in der Konsole aus.