Cebuano OCR in C#

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

另外 126 種語言

IronOCR是一個C#軟件元件,允許.NET程式設計人員從圖像和PDF文件中讀取文字,支持包括宿務語在內的126種語言。它是Tesseract的一個高級分支,專為.NET開發人員構建,在速度和準確性上通常超越其他Tesseract引擎。

IronOcr.Languages.Cebuano的內容

此套件包含 .NET 的46種 OCR 語言:

  • 宿務語
  • 宿務語Best
  • 宿務語Fast

下載

宿務語語言包 style='white-space:default'>[Bisaya]

安裝

我們要做的第一件事是將我們的宿務語 OCR包安裝到你的.NET專案中。

Install-Package IronOCR.Languages.Cebuano

代碼示例

這個C#代碼示例從圖像或PDF文件中讀取宿務語文字。

// Install the IronOCR Cebuano language package via NuGet package manager 
// PM> Install-Package IronOcr.Languages.Cebuano

using IronOcr;

class Program
{
    static void Main()
    {
        // Instantiate an IronTesseract object
        var Ocr = new IronTesseract();

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

        // Define the input source containing the image or PDF with Cebuano text
        using (var Input = new OcrInput(@"images\Cebuano.png"))
        {
            // Perform OCR to read the text from the input source
            var Result = Ocr.Read(Input);

            // Extract and display the recognized text
            var AllText = Result.Text;
            Console.WriteLine(AllText);
        }
    }
}
// Install the IronOCR Cebuano language package via NuGet package manager 
// PM> Install-Package IronOcr.Languages.Cebuano

using IronOcr;

class Program
{
    static void Main()
    {
        // Instantiate an IronTesseract object
        var Ocr = new IronTesseract();

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

        // Define the input source containing the image or PDF with Cebuano text
        using (var Input = new OcrInput(@"images\Cebuano.png"))
        {
            // Perform OCR to read the text from the input source
            var Result = Ocr.Read(Input);

            // Extract and display the recognized text
            var AllText = Result.Text;
            Console.WriteLine(AllText);
        }
    }
}
' Install the IronOCR Cebuano language package via NuGet package manager 
' PM> Install-Package IronOcr.Languages.Cebuano

Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Instantiate an IronTesseract object
		Dim Ocr = New IronTesseract()

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

		' Define the input source containing the image or PDF with Cebuano text
		Using Input = New OcrInput("images\Cebuano.png")
			' Perform OCR to read the text from the input source
			Dim Result = Ocr.Read(Input)

			' Extract and display the recognized text
			Dim AllText = Result.Text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

上述代碼片段演示了如何使用IronOCR使用C#和.NET從圖像中讀取宿務語文字。 首先設置OCR引擎並指定宿務語,然後處理圖像文件並輸出提取的文字。 確保在您的專案環境中正確指定圖像路徑。