OCR hindi 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 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 pour .NET :

  • Hindi
  • HindiBest
  • HindiFast

Télécharger

Pack de langue hindi [Hindi]

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

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
$vbLabelText   $csharpLabel

Remarque : assurez-vous que le chemin d'accès au fichier Hindi.png est correct et que les packages nécessaires sont installés.