C# と .NET でのグルムキー文字 OCR

This article was translated from English: Does it need improvement?
Translated
View the article in English

他126の言語

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

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

IronOcr.Languages.Gurmukhi の内容

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

  • グルムキー文字
  • グルムキーアルファベットベスト
  • グルムキーアルファベット高速

ダウンロード

グルムキー文字言語パック[Gurmukhī]

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

インストール

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

Install-Package IronOCR.Languages.Gurmukhi

Code Example

この C# コード例は、画像または PDF ドキュメントからグルムキー アルファベットのテキストを読み取ります。

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the OCR language to Gurmukhi
        Ocr.Language = OcrLanguage.Gurmukhi;

        // Define the input source for OCR using an image file path
        using (var Input = new OcrInput(@"images\Gurmukhi.png"))
        {
            // Perform OCR on the input
            var Result = Ocr.Read(Input);

            // Retrieve the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the OCR language to Gurmukhi
        Ocr.Language = OcrLanguage.Gurmukhi;

        // Define the input source for OCR using an image file path
        using (var Input = new OcrInput(@"images\Gurmukhi.png"))
        {
            // Perform OCR on the input
            var Result = Ocr.Read(Input);

            // Retrieve the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Create a new instance of IronTesseract
		Dim Ocr = New IronTesseract()

		' Set the OCR language to Gurmukhi
		Ocr.Language = OcrLanguage.Gurmukhi

		' Define the input source for OCR using an image file path
		Using Input = New OcrInput("images\Gurmukhi.png")
			' Perform OCR on the input
			Dim Result = Ocr.Read(Input)

			' Retrieve the recognized text
			Dim AllText = Result.Text

			' Output the recognized text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Gurmukhi 言語パックを使用するには、必要な IronOCR ライブラリがプロジェクトにインストールされていることを確認します。
  • 処理する実際の画像ファイルを指すようにパス"images\Gurmukhi.png"を変更します。
  • このプログラムは指定された画像からテキストを読み取り、コンソールに出力します。