Romanian OCR in C# and .NET
Autres versions de ce 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 for .NET :
- Roumain
- RomanianBest
- RoumainFast
Télécharger
Pack de langue roumaine [langue roumaine]
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);
}
Imports IronOcr
' Ensure you have installed the Romanian OCR package using the following NuGet command:
' PM> Install-Package IronOcr.Languages.Romanian
Dim Ocr As New IronTesseract()
Ocr.Language = OcrLanguage.Romanian
Using Input As 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
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 à traiter. La méthode Read() effectue l'opération OCR. Enfin, le texte reconnu est stocké dans la variable AllText, qui est ensuite imprimée sur la console. N'oubliez pas de remplacer "images\Romanian.png" par le chemin d'accès à votre fichier image.

