OCR du frison occidental en C# et .NET

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, dont le frison occidental.

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.WesternFrisian

Ce package contient 67 langues OCR pour .NET :

  • Frison occidental
  • WesternFrisianBest
  • WesternFrisianFast

Télécharger

Pack de langue frison occidental [frison]

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

Installation

La première chose à faire est d'installer notre package OCR frison occidental sur votre projet .NET.

Install-Package IronOCR.Languages.WesternFrisian

Exemple de code

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

// Import the IronOcr library
using IronOcr;

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

        // Set the language to Western Frisian
        Ocr.Language = OcrLanguage.WesternFrisian;

        // Perform OCR on a given image
        using (var Input = new OcrInput(@"images\WesternFrisian.png"))
        {
            // Read the input image and store the result
            var Result = Ocr.Read(Input);

            // Extract the text from the result
            string AllText = Result.Text;

            // Output the recognized text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr library
using IronOcr;

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

        // Set the language to Western Frisian
        Ocr.Language = OcrLanguage.WesternFrisian;

        // Perform OCR on a given image
        using (var Input = new OcrInput(@"images\WesternFrisian.png"))
        {
            // Read the input image and store the result
            var Result = Ocr.Read(Input);

            // Extract the text from the result
            string AllText = Result.Text;

            // Output the recognized text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr library
Imports IronOcr

Friend Class WesternFrisianOcrExample
	Shared Sub Main()
		' Create a new instance of IronTesseract, which is the OCR engine 
		Dim Ocr = New IronTesseract()

		' Set the language to Western Frisian
		Ocr.Language = OcrLanguage.WesternFrisian

		' Perform OCR on a given image
		Using Input = New OcrInput("images\WesternFrisian.png")
			' Read the input image and store the result
			Dim Result = Ocr.Read(Input)

			' Extract the text from the result
			Dim AllText As String = Result.Text

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

Dans cet exemple, nous :

  • Initialiser le moteur OCR IronTesseract .
  • Configurez le processus OCR pour reconnaître le texte en frison occidental à l'aide de l'option de langue OcrLanguage.WesternFrisian .
  • Lire un fichier image situé à l'emplacement images\WesternFrisian.png .
  • Stockez le texte reconnu dans AllText et affichez-le sur la console.