Romanian OCR in C# and .NET
Otras versiones de este documento:
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 for .NET:
- Rumanía
- RumaníaBest
- RumaníaFast
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);
}
Imports IronOcr
' Ensure you have installed the Romanian OCR package using the following NuGet command:
' PM> Install-Package IronOcr.Languages.Romanian
Dim Ocr As New IronTesseract()
Ocr.Language = OcrLanguage.Romanian
Using Input As 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 Using
El código anterior muestra cómo configurar IronOCR para leer texto en rumano a partir de 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 de OCR. Por último, el texto reconocido se almacena en la variable AllText, que luego se imprime en la consola. Recuerda sustituir "images\Romanian.png" por la ruta de tu archivo de imagen.

