German OCR in C# and .NET
Outras versões deste documento:
IronOCR é um componente de software C# que permite a programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo Alemão.
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.German
Este pacote contém 61 linguagens de OCR for .NET:
- Alemão
- AlemãoBest
- AlemãoFast
- AlemãoFraktur
Baixar
Pacote de Idioma Alemão [Deutsch]
Instalação
A primeira coisa que precisamos fazer é instalar nosso pacote OCR Alemão no seu projeto .NET.
Install-Package IronOcr.Languages.German
Exemplo de código
Este exemplo de código C# lê texto Alemão de uma imagem ou documento PDF.
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to German. This must match the language of the document you are scanning.
Ocr.Language = OcrLanguage.German;
using (var Input = new OcrInput(@"images\German.png"))
{
// Perform OCR on the provided image and get the result.
var Result = Ocr.Read(Input);
// Extract all recognized text from the OCR result.
var AllText = Result.Text;
// Optionally, output the recognized text to the console for verification.
Console.WriteLine(AllText);
}
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to German. This must match the language of the document you are scanning.
Ocr.Language = OcrLanguage.German;
using (var Input = new OcrInput(@"images\German.png"))
{
// Perform OCR on the provided image and get the result.
var Result = Ocr.Read(Input);
// Extract all recognized text from the OCR result.
var AllText = Result.Text;
// Optionally, output the recognized text to the console for verification.
Console.WriteLine(AllText);
}
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to German. This must match the language of the document you are scanning.
Ocr.Language = OcrLanguage.German
Using Input = New OcrInput("images\German.png")
' Perform OCR on the provided image and get the result.
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the OCR result.
Dim AllText = Result.Text
' Optionally, output the recognized text to the console for verification.
Console.WriteLine(AllText)
End Using
Neste exemplo, IronTesseract está configurado para usar o idioma alemão para OCR, o que é necessário para processar imagens ou PDFs contendo texto em alemão. A classe OcrInput é usada para especificar o arquivo de imagem, e o método Read realiza a operação de OCR, retornando o texto extraído.

