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#ソフトウェアコンポーネントです。ラテン語を含みます。

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

IronOcr.Languages.Latinの内容

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

  • ラテン語
  • ラテンベスト
  • ラテンファスト

ダウンロード

ラテン語パック [latine]

インストール

最初に行うことは、.NETプロジェクトにラテンOCRパッケージをインストールすることです。

Install-Package IronOCR.Languages.Latin

Code Example

このC#コード例は、画像またはPDFドキュメントからラテン文字を読み取ります。

// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;

// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
    // Perform OCR on the input
    var Result = Ocr.Read(Input);
    // Retrieve the recognized text
    var AllText = Result.Text;
    // Log or process the recognized text
}
// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;

// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
    // Perform OCR on the input
    var Result = Ocr.Read(Input);
    // Retrieve the recognized text
    var AllText = Result.Text;
    // Log or process the recognized text
}
' Install the IronOcr.Languages.Latin package via NuGet
Imports IronOcr

Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Latin

' Create an OCR input object by specifying the image or PDF file path
Using Input = New OcrInput("images\Latin.png")
	' Perform OCR on the input
	Dim Result = Ocr.Read(Input)
	' Retrieve the recognized text
	Dim AllText = Result.Text
	' Log or process the recognized text
End Using
$vbLabelText   $csharpLabel
  • この例では、IronTesseractオブジェクトの初期化とOCR言語をラテンに設定する方法を示しています。
  • OcrInputは入力ファイルをカプセル化し、この場合、ラテン文字を含む画像です。
  • Ocr.Readメソッドは入力を処理し、認識されたテキストを抽出できるOcrResultオブジェクトを返します。