OCR rumano 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 rumano. 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.Romanian
Este paquete contiene 49 idiomas OCR para .NET:
- Rumano
- RomanianBest
- RomanianFast
Descargar
Paquete de lenguaje rumano [limba română]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete OCR Rumano en su proyecto .NET.
Install-Package IronOCR.Languages.Romanian
Ejemplo de código
Este ejemplo de código C# lee texto rumano de una imagen o documento PDF.
// Ensure you have installed the Romanian OCR package using the following NuGet command:
// PM> Install-Package IronOCR.Languages.Romanian
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Romanian;
using (var Input = new OcrInput(@"images\Romanian.png"))
{
// Perform OCR on the input image, and store the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the OCR result
var AllText = Result.Text;
// Display the recognized text
Console.WriteLine(AllText);
}// Ensure you have installed the Romanian OCR package using the following NuGet command:
// PM> Install-Package IronOCR.Languages.Romanian
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Romanian;
using (var Input = new OcrInput(@"images\Romanian.png"))
{
// Perform OCR on the input image, and store the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the OCR result
var AllText = Result.Text;
// Display the recognized text
Console.WriteLine(AllText);
}' Ensure you have installed the Romanian OCR package using the following NuGet command:
' PM> Install-Package IronOCR.Languages.Romanian
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Romanian
Using Input = New OcrInput("images\Romanian.png")
' Perform OCR on the input image, and store the result
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the OCR result
Dim AllText = Result.Text
' Display the recognized text
Console.WriteLine(AllText)
End UsingEl código anterior demuestra cómo configurar IronOCR para leer texto en rumano desde un archivo de imagen. IronTesseract() inicializa una nueva instancia del motor OCR, y OcrInput() carga la imagen para su procesamiento. El método Read() realiza la operación OCR. Finalmente, el texto reconocido se almacena en la variable AllText, que luego se imprime en la consola. Recuerde reemplazar "images\Romanian.png" con la ruta a su archivo de imagen.





