OCR de l'alphabet Fraktur en C

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

126 autres langues

IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, y compris l'alphabet Fraktur.

Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET et qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.

Contenu de IronOcr.Languages.Fraktur

Ce package contient 70 langues OCR pour .NET :

  • Alphabet Fraktur
  • Alphabet FrakturBest
  • Alphabet FrakturFast

Télécharger

Pack de langue Fraktur Alphabet [Générique Fraktur]

  • Télécharger au format ZIP
  • Installer avec NuGet

Installation

La première chose à faire est d'installer notre package OCR Fraktur Alphabet dans votre projet .NET.

Install-Package IronOCR.Languages.Fraktur

Exemple de code

Cet exemple de code C# lit du texte en alphabet Fraktur à partir d'une image ou d'un document PDF.

// 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

Dans cet exemple :

  • Nous créons un objet IronTesseract qui nous sert de moteur OCR.
  • Nous modifions le paramètre de langue en Fraktur en utilisant OcrLanguage.Fraktur .
  • Nous chargeons un fichier image ( @"images\Fraktur.png" ) dans un objet OcrInput .
  • La méthode Ocr.Read() traite l'image d'entrée et renvoie le résultat de la reconnaissance optique de caractères (OCR). Enfin, nous affichons le texte extrait dans la console.