Latin OCR in C# and .NET
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
}
' Install the IronOcr.Languages.Latin package via NuGet
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Latin
' Create an OCR input object by specifying the image or PDF file path
Using Input = New OcrInput("images\Latin.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' Log or process the recognized text
End Using
- Este exemplo demonstra a inicialização do objeto
IronTesseracte a configuração do idioma OCR para Latim. - O
OcrInputencapsula o arquivo de entrada, neste caso, uma imagem contendo texto em Latim. - O método
Ocr.Readprocessa a entrada e retorna um objetoOcrResultdo qual você pode extrair o texto reconhecido.

