Romanian OCR in C# and .NET
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 romeno. 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.Languages.Romanian
Este pacote contém 49 idiomas de OCR for .NET:
- Romeno
- Melhor Romeno
- Romeno Rápido
Baixar
Pacote de idioma romeno [limba română]
Instalação
A primeira coisa que precisamos fazer é instalar nosso pacote de OCR romeno em seu projeto .NET.
Install-Package IronOcr.Languages.Romanian
Exemplo de código
Este exemplo de código C# lê texto em romeno a partir de uma imagem ou 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
O código acima demonstra como configurar o IronOCR para ler texto em romeno a partir de um arquivo de imagem. IronTesseract() inicializa uma nova instância do mecanismo OCR, e OcrInput() carrega a imagem para processamento. O método Read() realiza a operação de OCR. Finalmente, o texto reconhecido é armazenado na variável AllText, que é então impressa no console. Lembre-se de substituir "images\Romanian.png" pelo caminho para o seu arquivo de imagem.

