OCR alemán en C# y .NET
Other versions of this document:
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 alemán.
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.German
Este paquete contiene 61 idiomas OCR para .NET:
- Alemán
- AlemánBest
- AlemánFast
- AlemánFraktur
Descargar
Paquete de idioma alemán [Deutsch]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete OCR de Alemán en tu proyecto .NET.
Install-Package IronOCR.Languages.German
Ejemplo de código
Este ejemplo de código en C# lee texto en alemán de una imagen o 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);
}En este ejemplo, IronTesseract está configurado para usar el idioma alemán para OCR, lo cual es necesario para procesar imágenes o PDFs que contienen texto en alemán. La clase OcrInput se utiliza para especificar el archivo de imagen, y el método Read realiza la operación de OCR, devolviendo el texto extraído.





