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.Croatianの内容

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

  • クロアチア語
  • クロアチアベスト
  • クロアチアファースト

ダウンロード

クロアチア語パック[クロアチア語]

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

インストール

最初のステップは、NuGet を使用してクロアチア語OCR パッケージを .NET プロジェクトにインストールすることです。

Install-Package IronOCR.Languages.Croatian

Code Example

この C# コード例は、画像または PDF ドキュメントからクロアチア語のテキストを読み取ります。

// Add the required namespace for IronOCR
using IronOcr;

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

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

        // Define the input image or PDF containing Croatian text
        using (var Input = new OcrInput(@"images\Croatian.png"))
        {
            // Perform OCR on the input
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

            // Output the recognized text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
// Add the required namespace for IronOCR
using IronOcr;

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

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

        // Define the input image or PDF containing Croatian text
        using (var Input = new OcrInput(@"images\Croatian.png"))
        {
            // Perform OCR on the input
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

            // Output the recognized text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
' Add the required namespace for IronOCR
Imports IronOcr

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

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

		' Define the input image or PDF containing Croatian text
		Using Input = New OcrInput("images\Croatian.png")
			' Perform OCR on the input
			Dim Result = Ocr.Read(Input)

			' Extract all recognized text
			Dim AllText = Result.Text

			' Output the recognized text to the console
			System.Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

説明

  • IronTesseract : これは OCR 操作を実行するために使用されるメイン クラスです。 画像や PDF からテキストを読み取り、複数の言語をサポートします。
  • OcrInput : OCR の入力ソースを表します。画像または PDF ファイルになります。
  • Ocr.Read : 指定された入力に対して OCR プロセスを実行します。
  • Result.Text : 入力から抽出されたテキストが含まれ、コンソールに出力されます。