OCR en hindi en C# y .NET
Other versions of this document:
IronOCR es un componente de software C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el hindi.
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.Hindi
Este paquete contiene 40 idiomas OCR para .NET:
- Hindi
- HindiBest
- HindiFast
Descargar
Paquete de idioma hindi [हिंदी]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete de OCR hindi en tu proyecto .NET.
Install-Package IronOCR.Languages.Hindi
Ejemplo de código
Este ejemplo de código en C# lee texto en hindi de una imagen o 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);
}Nota: Asegúrate de que la ruta del archivo a
Hindi.pngsea correcta y que los paquetes necesarios estén instalados.





