German OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET yazılımcılarının, Almanca da dahil olmak üzere 126 dildeki görüntü ve PDF belgelerinden metin okumasına izin veren bir C# yazılım bileşenidir.
Tesseract'ın ileri düzey bir çatallamasıdır, yalnızca .NET geliştiricileri için oluşturulmuş olup hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakmaktadır.
IronOcr.Languages.German İçeriği
Bu paket, .NET için 61 OCR dili içerir:
- Almanca
- AlmancaBest
- AlmancaFast
- AlmancaFraktur
İndirme
Almanca Dil Paketi [Deutsch]
Kurulum
Yapmamız gereken ilk şey, Almanca OCR paketimizi .NET projenize kurmaktır.
Install-Package IronOcr.Languages.German
Kod Örneği
Bu C# kod örneği, bir görüntü veya PDF belgesinden Almanca metin okur.
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
Bu örnekte, IronTesseract Alman dili OCR icin kullanilacak sekilde yapılandirilir, bu da Alman metni iceren resim veya PDF'leri işlemek icin gereklidir. OcrInput sinifi, resim dosyasini belirtmek icin kullanilir ve Read metodu OCR işlemine yaparak cikarilan metni dondurur.

