German OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Bu belgenin diğer versiyonları:

IronOCR, .NET kodlayıcılarının 126 dil, Almanca dahil, içerisinden resimler ve PDF belgelerinden metin okumalarını sağlayan bir C# yazılım bileşenidir.

Tesseract'ın, yalnızca .NET geliştiricileri için özel olarak oluşturulmuş gelişmiş bir dalıdır ve hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakır.

IronOcr.Languages.German İçeriği

Bu paket, .NET için 61 OCR dilini içerir:

  • Almanca
  • AlmancaEn iyi
  • AlmancaFast
  • AlmancaFraktur

İndir

Almanca Dil Paketi [Deutsch]

Kurulum

Yapmamız gereken ilk şey, .NET projenize German OCR paketimizi kurmaktır.

Install-Package IronOcr.Languages.German

Kod Örneği

Bu C# kod örneği, bir Resim 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
$vbLabelText   $csharpLabel

Bu örnekte, IronTesseract, Almanca metin içeren görüntüleri veya PDF'leri işlemek için gerekli olan OCR için Almanca dilini kullanacak şekilde yapılandırılmıştır. OcrInput sınıfı, görüntü dosyasını belirtmek için kullanılır ve Read yöntemi, OCR işlemini gerçekleştirerek çıkarılan metni döndürür.