C# と .NET でのドイツ語 OCR

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

*ドイツ語

IronOCR は、.NET コーダーがドイツ語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。

これはTesseractの高度なフォークであり、.NET開発者専用に構築され、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。

IronOcr.Languages.German の内容

このパッケージには、.NET 用の 61 の OCR 言語が含まれています。

  • ドイツ語
  • ドイツベスト
  • ドイツ語高速
  • ドイツ語フラクトゥール

ダウンロード

ドイツ語言語パック[Deutsch]

  • Zip形式でダウンロード
  • NuGetでインストール

インストール

最初に、ドイツ語OCR パッケージを .NET プロジェクトにインストールする必要があります。

Install-Package IronOCR.Languages.German

Code Example

この C# コード例は、画像または 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
$vbLabelText   $csharpLabel

この例では、 IronTesseractは、ドイツ語のテキストを含む画像または PDF を処理するために必要な OCR にドイツ語を使用するように設定されています。 OcrInputクラスは画像ファイルの指定に使用され、 Readメソッドは OCR 操作を実行し、抽出されたテキストを返します。