OCR roumain 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 roumain. 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.Romanien

Ce package contient 49 langues OCR pour .NET :

  • Roumain
  • RomanianBest
  • RoumainFast

Télécharger

Pack de langue roumaine [langue roumaine]

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

Installation

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

Install-Package IronOCR.Languages.Romanian

Exemple de code

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

// Ensure you have installed the Romanian OCR package using the following NuGet command:
// PM> Install-Package IronOCR.Languages.Romanian

using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Romanian;

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

    // Extract all recognized text from the OCR result
    var AllText = Result.Text;

    // Display the recognized text
    Console.WriteLine(AllText);
}
// Ensure you have installed the Romanian OCR package using the following NuGet command:
// PM> Install-Package IronOCR.Languages.Romanian

using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Romanian;

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

    // Extract all recognized text from the OCR result
    var AllText = Result.Text;

    // Display the recognized text
    Console.WriteLine(AllText);
}
' Ensure you have installed the Romanian OCR package using the following NuGet command:
' PM> Install-Package IronOCR.Languages.Romanian

Imports IronOcr

Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Romanian

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

	' Extract all recognized text from the OCR result
	Dim AllText = Result.Text

	' Display the recognized text
	Console.WriteLine(AllText)
End Using
$vbLabelText   $csharpLabel

Le code ci-dessus montre comment configurer IronOCR pour lire du texte en roumain à partir d'un fichier image. IronTesseract() initialise une nouvelle instance du moteur OCR, et OcrInput() charge l'image pour traitement. La méthode Read() effectue l'opération OCR. Enfin, le texte reconnu est stocké dans la variable AllText , qui est ensuite affichée dans la console. N'oubliez pas de remplacer "images\Romanian.png" par le chemin d'accès à votre fichier image.