OCR hongrois en C# et .NET

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

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

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.Langues.Hongrois

Ce package contient 52 langues OCR pour .NET :

  • Hongrois
  • HungarianBest
  • HungarianFast

Télécharger

Pack de langue hongroise [magyar]<\/span>

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

Installation

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

Install-Package IronOCR.Languages.Hungarian

Exemple de code

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

// First, ensure you have installed the Hungarian OCR language pack
// via NuGet: Install-Package IronOcr.Languages.Hungarian

using IronOcr;

var Ocr = new IronTesseract();

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

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

    // Retrieve and store the recognized text
    var AllText = Result.Text;

    // Output the recognized text to the console (for debugging purposes)
    Console.WriteLine(AllText);
}
// First, ensure you have installed the Hungarian OCR language pack
// via NuGet: Install-Package IronOcr.Languages.Hungarian

using IronOcr;

var Ocr = new IronTesseract();

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

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

    // Retrieve and store the recognized text
    var AllText = Result.Text;

    // Output the recognized text to the console (for debugging purposes)
    Console.WriteLine(AllText);
}
' First, ensure you have installed the Hungarian OCR language pack
' via NuGet: Install-Package IronOcr.Languages.Hungarian

Imports IronOcr

Private Ocr = New IronTesseract()

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

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

	' Retrieve and store the recognized text
	Dim AllText = Result.Text

	' Output the recognized text to the console (for debugging purposes)
	Console.WriteLine(AllText)
End Using
$vbLabelText   $csharpLabel

Cet extrait de code d\u00e9montre comment configurer un lecteur OCR utilisant la biblioth\u00e8que IronOCR pour reconna\u00eetre le texte hongrois \u00e0 partir d'un fichier image sp\u00e9cifi\u00e9. Le texte extrait est stock\u00e9 dans la variable AllText<\/code>, et peut \u00eatre utilis\u00e9 selon les besoins dans votre application. L'exemple inclut également une sortie console optionnelle permettant de vérifier les résultats de la reconnaissance optique de caractères (OCR) pendant les tests.