Vietnamese 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 vietnamien.
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.Vietnamien
Ce package contient 132 langues OCR for .NET :
- Vietnamien
- Le meilleur vietnamien
- Vietnamien rapide
- Alphabet vietnamien
- Meilleur alphabet vietnamien
- Alphabet vietnamien rapide
Télécharger
Pack de langue vietnamienne
Installation
La première chose à faire est d'installer notre package OCR vietnamien sur votre projet .NET.
Install-Package IronOcr.Languages.Vietnamese
Exemple de code
Cet exemple de code C# lit du texte vietnamien à partir d'une image ou d'un document PDF.
// You need to install the IronOcr.Languages.Vietnamese package using the following NuGet command before running this code:
// PM> Install-Package IronOcr.Languages.Vietnamese
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Vietnamese
Ocr.Language = OcrLanguage.Vietnamese;
using (var Input = new OcrInput(@"images\Vietnamese.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Example: Output the extracted text to the console
Console.WriteLine(AllText);
}
// You need to install the IronOcr.Languages.Vietnamese package using the following NuGet command before running this code:
// PM> Install-Package IronOcr.Languages.Vietnamese
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Vietnamese
Ocr.Language = OcrLanguage.Vietnamese;
using (var Input = new OcrInput(@"images\Vietnamese.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Example: Output the extracted text to the console
Console.WriteLine(AllText);
}
' You need to install the IronOcr.Languages.Vietnamese package using the following NuGet command before running this code:
' PM> Install-Package IronOcr.Languages.Vietnamese
Imports IronOcr
Dim Ocr As New IronTesseract()
' Set the OCR language to Vietnamese
Ocr.Language = OcrLanguage.Vietnamese
Using Input As New OcrInput("images\Vietnamese.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Example: Output the extracted text to the console
Console.WriteLine(AllText)
End Using
Dans cet exemple de code :
- Nous créons une instance de
IronTesseract. - Définissez la langue sur vietnamien en utilisant
Ocr.Language = OcrLanguage.Vietnamese;. - Créez un objet
OcrInputavec le chemin d'accès à l'image ou au PDF. - Appelez la méthode
Readpour effectuer la reconnaissance optique de caractères (OCR) et obtenir le texte extrait. - Le texte extrait est stocké dans
AllText, qui peut être utilisé selon les besoins, par exemple pour l'afficher ou l'enregistrer dans un fichier.

