Hindi OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Outras versões deste documento:

IronOCR é um componente de software C# que permite aos programadores .NET ler textos de imagens e documentos PDF em 126 idiomas, incluindo hindi.

Trata-se de uma versão avançada do Tesseract, criada exclusivamente para desenvolvedores .NET e que supera regularmente outros mecanismos do Tesseract em termos de velocidade e precisão.

Conteúdos do IronOcr.Languages.Hindi

Este pacote contém 40 idiomas de OCR for .NET:

  • Hindi
  • HindiBest
  • HindiFast

Baixar

Pacote de idioma Hindi [हिनदी]

Instalação

A primeira coisa que temos que fazer é instalar nosso pacote OCR Hindi no seu projeto .NET.

Install-Package IronOcr.Languages.Hindi

Exemplo de código

Este exemplo de código C# lê texto em hindi de uma imagem ou documento 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);
}
$vbLabelText   $csharpLabel

Nota: Certifique-se de que o caminho do arquivo para Hindi.png está correto e que os pacotes necessários estão instalados.