OCR de l'alphabet gurmukhi en C# et .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

126 autres langues

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, y compris l'alphabet gurmukhi.

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.Gurmukhi

Ce package contient 73 langues OCR pour .NET :

  • Alphabet Gurmukhi
  • Meilleur alphabet Gurmukhi
  • GurmukhiAlphabetFast

Télécharger

Pack linguistique de l'alphabet Gurmukhi [Gurmukhī]

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

Installation

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

Install-Package IronOCR.Languages.Gurmukhi

Exemple de code

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

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the OCR language to Gurmukhi
        Ocr.Language = OcrLanguage.Gurmukhi;

        // Define the input source for OCR using an image file path
        using (var Input = new OcrInput(@"images\Gurmukhi.png"))
        {
            // Perform OCR on the input
            var Result = Ocr.Read(Input);

            // Retrieve the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the OCR language to Gurmukhi
        Ocr.Language = OcrLanguage.Gurmukhi;

        // Define the input source for OCR using an image file path
        using (var Input = new OcrInput(@"images\Gurmukhi.png"))
        {
            // Perform OCR on the input
            var Result = Ocr.Read(Input);

            // Retrieve the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
$vbLabelText   $csharpLabel
  • Assurez-vous que les bibliothèques IronOCR nécessaires sont installées dans votre projet pour utiliser le pack de langue Gurmukhi.
  • Modifiez le chemin d'accès "images\Gurmukhi.png" pour qu'il pointe vers le fichier image que vous souhaitez traiter. Ce programme lit le texte de l'image spécifiée et l'affiche dans la console.