Latin OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Outras versões deste documento:

IronOCR é um componente de software C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo Latim.

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údos de IronOcr.Languages.Latin

Este pacote contém 40 idiomas de OCR for .NET:

  • Latim
  • LatinBest
  • LatinFast

Baixar

Pacote de Idioma Latim [latine]

Instalação

A primeira coisa que precisamos fazer é instalar nosso pacote de OCR Latim no seu projeto .NET.

Install-Package IronOcr.Languages.Latin

Exemplo de código

Este exemplo de código C# lê texto em Latim de uma imagem ou documento PDF.

// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;

// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
    // Perform OCR on the input
    var Result = Ocr.Read(Input);
    // Retrieve the recognized text
    var AllText = Result.Text;
    // Log or process the recognized text
}
// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;

// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
    // Perform OCR on the input
    var Result = Ocr.Read(Input);
    // Retrieve the recognized text
    var AllText = Result.Text;
    // Log or process the recognized text
}
$vbLabelText   $csharpLabel
  • Este exemplo demonstra a inicialização do objeto IronTesseract e a configuração do idioma OCR para Latim.
  • O OcrInput encapsula o arquivo de entrada, neste caso, uma imagem contendo texto em Latim.
  • O método Ocr.Read processa a entrada e retorna um objeto OcrResult do qual você pode extrair o texto reconhecido.