Reconocimiento óptico de caracteres (OCR) en urdu en C# y .NET
Other versions of this document:
IronOCR es un componente de software C# que permite a los codificadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el urdu.
Es una rama avanzada de Tesseract, construida exclusivamente para desarrolladores de .NET y supera regularmente a otros motores de Tesseract tanto en velocidad como en precisión.
Contenido de IronOcr.Languages.Urdu
Este paquete contiene 37 idiomas OCR para .NET:
- Urdu
- UrduBest
- UrduFast
Descargar
Paquete de idioma urdu [اردو]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete OCR de Urdu en tu proyecto .NET.
Install-Package IronOCR.Languages.Urdu
Ejemplo de código
Este ejemplo de código C# lee texto en urdu de una imagen o 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
}' Install the IronOcr.Languages.Urdu package
Imports IronOcr
Private 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 Input = New OcrInput("images\Urdu.png")
Dim Result = Ocr.Read(Input) ' Perform OCR on the input
Dim AllText = Result.Text ' Extract the recognized text
' AllText now contains the Urdu text read from the image
End Using




