Hindi OCR in C# and .NET
Autres versions de ce document :
- \u0939\u093f\u0926\u0940 \u092e
- 125 langues supplémentaires pour la reconnaissance optique de caractères (OCR)
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 l'hindi.
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.Hindi
Ce package contient 40 langues OCR for .NET :
- Hindi
- HindiBest
- HindiFast
Télécharger
Pack de langue hindi [Hindi]
Installation
La première chose à faire est d'installer notre package OCR hindi sur votre projet .NET.
Install-Package IronOcr.Languages.Hindi
Exemple de code
Cet exemple de code C# lit du texte hindi à partir d'une image ou d'un document PDF.
// Make sure to install IronOcr.Languages.Hindi package before running the code
using IronOcr;
var Ocr = new IronTesseract(); // Create a new instance of the OCR engine
Ocr.Language = OcrLanguage.Hindi; // Set the language to Hindi
// Load the image file containing Hindi text
using (var Input = new OcrInput(@"images\Hindi.png"))
{
// Perform OCR on the image
var Result = Ocr.Read(Input);
// Extract the recognized text
var AllText = Result.Text;
// Optionally, you can print the extracted text
Console.WriteLine(AllText);
}
// Make sure to install IronOcr.Languages.Hindi package before running the code
using IronOcr;
var Ocr = new IronTesseract(); // Create a new instance of the OCR engine
Ocr.Language = OcrLanguage.Hindi; // Set the language to Hindi
// Load the image file containing Hindi text
using (var Input = new OcrInput(@"images\Hindi.png"))
{
// Perform OCR on the image
var Result = Ocr.Read(Input);
// Extract the recognized text
var AllText = Result.Text;
// Optionally, you can print the extracted text
Console.WriteLine(AllText);
}
' Make sure to install IronOcr.Languages.Hindi package before running the code
Imports IronOcr
Private Ocr = New IronTesseract() ' Create a new instance of the OCR engine
Ocr.Language = OcrLanguage.Hindi ' Set the language to Hindi
' Load the image file containing Hindi text
Using Input = New OcrInput("images\Hindi.png")
' Perform OCR on the image
Dim Result = Ocr.Read(Input)
' Extract the recognized text
Dim AllText = Result.Text
' Optionally, you can print the extracted text
Console.WriteLine(AllText)
End Using
Remarque : Assurez-vous que le chemin d'accès au fichier
Hindi.pngest correct et que les packages nécessaires sont installés.

