Urdu 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:

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

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údo de IronOcr.Idiomas.Urdu

Este pacote contém 37 linguagens OCR for .NET:

  • Urdu
  • UrduBest
  • UrduFast

Baixar

Pacote de idioma urdu [اردو]

Instalação

A primeira coisa que precisamos fazer é instalar nosso pacote de OCR para urdu em seu projeto .NET .

Install-Package IronOcr.Languages.Urdu

Exemplo de código

Este exemplo de código C# lê texto em urdu de uma imagem ou documento PDF.

// Install the IronOcr.Languages.Urdu package
using IronOcr;

var Ocr = new IronTesseract(); // Create a new OCR object
Ocr.Language = OcrLanguage.Urdu; // Set the language to Urdu

// Using a block that ensures the Input object gets disposed after use
using (var Input = new OcrInput(@"images\Urdu.png")) 
{
    var Result = Ocr.Read(Input); // Perform OCR on the input
    var AllText = Result.Text; // Extract the recognized text
    // AllText now contains the Urdu text read from the image
}
// Install the IronOcr.Languages.Urdu package
using IronOcr;

var Ocr = new IronTesseract(); // Create a new OCR object
Ocr.Language = OcrLanguage.Urdu; // Set the language to Urdu

// Using a block that ensures the Input object gets disposed after use
using (var Input = new OcrInput(@"images\Urdu.png")) 
{
    var Result = Ocr.Read(Input); // Perform OCR on the input
    var AllText = Result.Text; // Extract the recognized text
    // AllText now contains the Urdu text read from the image
}
$vbLabelText   $csharpLabel